-
Notifications
You must be signed in to change notification settings - Fork 156
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
How to get all translations for all languages for specific text? #378
Comments
Off the top of my head you can use |
Is it possible to do that in-code translation without using HttpRequest object? The |
I don't think it does:
|
The code below thrown exception
|
Sorry, I don't have time at the moment. I suggest you build against the source to see what you can come up with. |
Those suggestions above are untested BTW so not saying it should work. |
@tomasr78 for(Locale locale : i18NProvider.getProvidedLocales()){
String car = i18NProvider.getTranslation("vehicle.type.car",locale);
} Code above will take all available languages to get translation for passed value defined in its properties. |
I have several translations of the text, let's say [[[Sign-In]]]. I would like to iterate all translations and translate that text to MVC Route Table. Two problems here, I only find
HttpContext.GetText
method for in-code translation which requires HttpContext object which is not available in Routes method yet.Anyway I think I would have possibility to access Routes later in Controller context.
The main problem how to use HttpContext.GetText("[[[Sign-In]]]") and iterate all languages and get all translation available.
The text was updated successfully, but these errors were encountered: