Hi, As far as I know it is like this:
1) Every component is providing the current locale which is configured by the preferred language of the browser via #getLocale() derived from the websession or its parent (but root is from websession) I think there is no way to get a list of all languages, because each component is translating the content based on found properties (e.g myproperty_de_De) 2) If the receiver is accessing your application with it's preferred language (configured in the browser) you could simply write properties for the specific locale and generate the template without any switch / if statements - if the language is not supported you could add properties without any locale Information and apply english translations as fallback. kind regards Tobias > Am 26.02.2015 um 12:22 schrieb Maxim Solodovnik <[email protected]>: > > Hello All, > > I have couple of questions related to localization: > > 1) is there any way to list all available locales in Application? > > let's say I have Application.properties.xml, Application_de.properties.xml, > Application_ru.properties.xml, I would like to get list of Locale.EN, > Locale.DE, Locale.RU in such case, is it possible? > > 2) Is there any way to get string in given Locale different from > WebSession.locale? > > I would like to create email based on template in language of "receiver", > is it possible? > > Thanks in advance! > > -- > WBR > Maxim aka solomax --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
