掲示板

Theme Internationalization & Localization

thumbnail
14年前 に Vincent Olivier によって更新されました。

Theme Internationalization & Localization

Junior Member 投稿: 28 参加年月日: 09/05/28 最新の投稿
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
14年前 に Amos Fong によって更新されました。

RE: Theme Internationalization & Localization

Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
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
14年前 に Vincent Olivier によって更新されました。

RE: Theme Internationalization & Localization

Junior Member 投稿: 28 参加年月日: 09/05/28 最新の投稿
Thanks a bunch!! It works like a charm!!!!

v
14年前 に Denis Davydkov によって更新されました。

RE: Theme Internationalization & Localization

New Member 投稿: 12 参加年月日: 08/12/15 最新の投稿
It works for me too, but messages from UTF-8 encoded bundles look wrong.
What encoding should we choose for bundles?
thumbnail
14年前 に Alexey Kakunin によって更新されました。

RE: Theme Internationalization & Localization

Liferay Master 投稿: 621 参加年月日: 08/07/07 最新の投稿
you need to recode your resource bundle into ascii with using native2ascii tool from JDK
7年前 に Atul Soni によって更新されました。

RE: Theme Internationalization & Localization

New Member 投稿: 7 参加年月日: 15/02/13 最新の投稿
Is there any way to get the Lanuguage.properties value in javascript.