-
Notifications
You must be signed in to change notification settings - Fork 34
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
translations #25
Comments
Thanks for taking the time to test out the new package. You can override all errors in your module config by a call to the xtformconfigprovider.setErrorMessages and providing each key and value. Can you not make the calls to gettext here? |
I tried that, but unfortunatly the function I need to inject is a service and you can not inject a service in a config. |
I managed to get a translation with the following statement: The disadvantage of course is that I need to add this to every input field. |
Ah right, I guess I could make a change so that setErrorMessages() can be On Mon, Jan 19, 2015 at 10:45 PM, ReinierGielen notifications@github.com
|
I'm using the famous angular-translate and I'm also adding the translation filter to each field individually. +1 for setErrorMessages() on a service level. |
The new override possibility for the error messages is nice, but enough for me as I need to make my site multi-lingual.
For the multi-lingual support we use angular-gettext.
In the previous version of xtForm I hacked the call to getText in the code and now I tried it with the new override functionality. This does not seem to work. I get an injection error when I try to use the getText command in the xtFormConfigProvider.
In the old version I used: var errString = this.gettextCatalog.getString(key);
In the function showErrors where the key is the property being validated.
I assume more people have a use for this option, so could this be included where you set it in the config which option you want to use ?
The text was updated successfully, but these errors were encountered: