留言板

Adding Additional Languages/Locales

Luc Foisy,修改在14 年前。

Adding Additional Languages/Locales

New Member 帖子: 9 加入日期: 09-11-11 最近的帖子
I have two files, Language_en_CA.properties and Language_fr_CA.properties

Do these need to go into the portal-impl.jar, or can I put them somewhere else that the system will read?

I have found a portal-ext.properties here: /usr/java/vennware/liferay-portal-5.2.3/tomcat-6.0.18/webapps/ROOT/WEB-INF/classes
Does that look like it would be the right file to add locales to? There is no existing locales line, so adding just the new locales would be correct?

Do I need to restart anything to get them to be loaded?

The system that I am implementing these new locales on is already in use, is there a quick way to change all existing data over to these new locales, from just the regular en and fr locales?

What database fields would I be looking for to modify if I have to manually make changes?

Where are those language/locale icons located?
thumbnail
Lisa Simpson,修改在14 年前。

RE: Adding Additional Languages/Locales

Liferay Legend 帖子: 2034 加入日期: 09-3-5 最近的帖子
You probably do need to add them to the portal-ext.properties.

And you'll have to restart Liferay to get it to take effect.
thumbnail
Nidhi Singh,修改在14 年前。

RE: Adding Additional Languages/Locales

Regular Member 帖子: 155 加入日期: 09-10-7 最近的帖子
Luc Foisy:
I have two files, Language_en_CA.properties and Language_fr_CA.properties

Do these need to go into the portal-impl.jar, or can I put them somewhere else that the system will read?

I have found a portal-ext.properties here: /usr/java/vennware/liferay-portal-5.2.3/tomcat-6.0.18/webapps/ROOT/WEB-INF/classes
Does that look like it would be the right file to add locales to? There is no existing locales line, so adding just the new locales would be correct?

Do I need to restart anything to get them to be loaded?

The system that I am implementing these new locales on is already in use, is there a quick way to change all existing data over to these new locales, from just the regular en and fr locales?

What database fields would I be looking for to modify if I have to manually make changes?

Where are those language/locale icons located?


Hi

1. stop server and copy portal-impl.jar file from liferay-portal-5.2.3\tomcat-6.0.18\webapps\ROOT\WEB-INF\lib
2. extract portal-impl.jar.

3. change language file(portal-impl/content).

4. start the server.

5. changes will be reflect.

Thanks
Nidhi Singh
thumbnail
Mohd Hanafi,修改在14 年前。

RE: Adding Additional Languages/Locales

Junior Member 帖子: 83 加入日期: 10-1-18 最近的帖子
Luc Foisy:

Where are those language/locale icons located?


Answer: html/themes/classic/images/language
Mihael Palfi,修改在13 年前。

RE: Adding Additional Languages/Locales

New Member 帖子: 3 加入日期: 10-11-15 最近的帖子
Hello

I have a problem when adding a new language. i my case a slovenian language. I have added the locales variable to the portal-ext.properties file

locales=en_US,sl_SI,de_DE,fr_FR,hu_HU,it_IT


and added the new languge file Languages_sl.properties to the ROOT/WEB-INF/lib/portal-impl.jar/content folder.

I am geting somekind of URL loop : http://localhost:10400/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/master
and the page is not displayed.


Does somewone have a solution for this problem???

Miha
Camila Inostroza,修改在12 年前。

RE: Adding Additional Languages/Locales

New Member 发布: 1 加入日期: 11-10-19 最近的帖子
Hi!
Shouldn't the selected language translate everything? I mean, the web contents too...
Because its only translating the user menu,the panel control.
Is any plugin that do that, all the translation?
Marcial Calvo,修改在10 年前。

RE: Adding Additional Languages/Locales

New Member 帖子: 4 加入日期: 12-2-7 最近的帖子
Mihael Palfi:
Hello

I have a problem when adding a new language. i my case a slovenian language. I have added the locales variable to the portal-ext.properties file

locales=en_US,sl_SI,de_DE,fr_FR,hu_HU,it_IT


and added the new languge file Languages_sl.properties to the ROOT/WEB-INF/lib/portal-impl.jar/content folder.

I am geting somekind of URL loop : http://localhost:10400/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/sl/master
and the page is not displayed.


Does somewone have a solution for this problem???

Miha



Hi Michael,

You need to modify the file "/ROOT/WEB-INF/web.xml" adding new lines of your new language.

Regards
thumbnail
Shahbaz Khan,修改在6 年前。

RE: Adding Additional Languages/Locales

Junior Member 帖子: 40 加入日期: 14-11-18 最近的帖子
Hi Mihael

Each language that Liferay supports, has its own servlet-mapping and url-pattern defined for the same in "web.xml" (which is inside LIFERAY_HOME\tomcat-<version>\webapps\ROOT\WEB-INF).
You need to add this mapping in web.xml file like

<servlet-mapping>
           <servlet-name>I18n Servlet</servlet-name>
             <url-pattern>/YOUR_NEW_LANGUAGE_KEY/*</url-pattern>
 </servlet-mapping>

<url-pattern>/YOUR_NEW_LANGUAGE_KEY/c/portal/protected</url-pattern>