Skip to content

Why not a provider #117

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

Closed
mallowigi opened this issue Oct 21, 2014 · 6 comments
Closed

Why not a provider #117

mallowigi opened this issue Oct 21, 2014 · 6 comments

Comments

@mallowigi
Copy link

Why is the gettextCatalog a service and not a provider? It seems logical to set the currentLanguage at the config phase instead of the run phase, is it not?

@ni-ka
Copy link

ni-ka commented Oct 31, 2014

+1
this causes problems if you want to use the gettext function in a service (for example containing enums), as it is difficult to have the language set before.

@rubenv
Copy link
Owner

rubenv commented Oct 31, 2014

Because we want to allow run-time language switching.

@mallowigi
Copy link
Author

But with a provider you can do both.

@rubenv
Copy link
Owner

rubenv commented Oct 31, 2014

If you can make it backwards compatible: sure, why not. Feel free to send a pull request.

@gabegorelick
Copy link
Collaborator

@mallowigi Please take a look at #140 and make sure it works for you. Thanks.

gabegorelick added a commit to gabegorelick/angular-gettext that referenced this issue Dec 9, 2014
@Yankovsky
Copy link

+1 I need to set translated texts to other providers, e.g. angular-bootstrap:
Image of Yaktocat

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

5 participants