Forums de discussion

Theme Internationalization & Localization

thumbnail
Vincent Olivier, modifié il y a 14 années.

Theme Internationalization & Localization

Junior Member Publications: 28 Date d'inscription: 28/05/09 Publications récentes
Hi,

There are some strings I need to put in the new theme I'm developing. But I don't want to hardcode them in the Velocity templates. In which properties file should I put them? How to I call the localized strings in a Velocity template?

Thanks!

Vincent
thumbnail
Amos Fong, modifié il y a 14 années.

RE: Theme Internationalization & Localization

Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
Try adding a language hook to your theme. (http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Portal+Hook+PluginsThen get your localized strings in velocity like this:

$languageUtil.get($company_id, $locale, "add-application"))
thumbnail
Vincent Olivier, modifié il y a 14 années.

RE: Theme Internationalization & Localization

Junior Member Publications: 28 Date d'inscription: 28/05/09 Publications récentes
Thanks a bunch!! It works like a charm!!!!

v
Denis Davydkov, modifié il y a 14 années.

RE: Theme Internationalization & Localization

New Member Publications: 12 Date d'inscription: 15/12/08 Publications récentes
It works for me too, but messages from UTF-8 encoded bundles look wrong.
What encoding should we choose for bundles?
thumbnail
Alexey Kakunin, modifié il y a 14 années.

RE: Theme Internationalization & Localization

Liferay Master Publications: 621 Date d'inscription: 07/07/08 Publications récentes
you need to recode your resource bundle into ascii with using native2ascii tool from JDK
Atul Soni, modifié il y a 7 années.

RE: Theme Internationalization & Localization

New Member Publications: 7 Date d'inscription: 13/02/15 Publications récentes
Is there any way to get the Lanuguage.properties value in javascript.