Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate text out of angular scope #51

Open
KrakenTyio opened this issue Mar 22, 2019 · 0 comments
Open

Translate text out of angular scope #51

KrakenTyio opened this issue Mar 22, 2019 · 0 comments

Comments

@KrakenTyio
Copy link

KrakenTyio commented Mar 22, 2019

Hi,

we have few classes which contain only data, and call them Entities.
Sometimes they contain text which need to be translated but they are out of angular component/modules scope.
They are createded in services as response from API and data are transfered to Entitie and List.

Its not possible for every entities manualy link I18n to constructor.

Your I18n service is provided in root module.
We can simply after init of this service/module store this service to static function/variable/static class as translator, which in final result we can use for static transalte in this Entities.

But problem is extractor.
Is any workaroud how we can extract this text, which using forwarded service in static variable?

Or create anotation which bring from metadatas I18n service for after init static translate text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant