angular-gettext icon indicating copy to clipboard operation
angular-gettext copied to clipboard

get string manually for a specific locale

Open morfin opened this issue 10 years ago • 0 comments

I'm using formvalidation.io with i18n module. http://formvalidation.io/addons/i18n/

Since I need to define statically the locale for each language on validation messages, I require to access manually a string for each specific language, regardless the locale being set on.

For instance, if the current locale is English, I still need to get the french string for setting up the validation error.

So something like this would come in handy: gettextCatalog.getStringByLocale("Please enter a username", "fr_FR");

Currently I'm doing it the ugly way: gettextCatalog.strings.fr_FR["Please enter a username."].$$noContext[0];

Any advice will be helpful. Thanks.

morfin avatar Aug 28 '15 01:08 morfin