Forums de discussion

Problem with Language_ext-en.properties when create new screens

Kha N Nguyen, modifié il y a 14 années.

Problem with Language_ext-en.properties when create new screens

Junior Member Publications: 89 Date d'inscription: 22/11/09 Publications récentes
Hi friends,

I am using EXT. I create new screens in the Login portlet: put the link on the signed in Login screen, when user click on the link, the new screen is displayed.

I have configured the language in system.properties is:
user.country=US
user.language=en
and another screens could work with the Laguage_ext-en.properties.

I also put the properties file in the correct location: ext-impl\src\content

But the new screens do not work with the Laguage_ext-en.properties file, they only work with Laguage_ext.properties.

Can you help me please?

Thanks,
Kha Nguyen
thumbnail
Nidhi Singh, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Regular Member Publications: 155 Date d'inscription: 07/10/09 Publications récentes
Kha N Nguyen:
Hi friends,

I am using EXT. I create new screens in the Login portlet: put the link on the signed in Login screen, when user click on the link, the new screen is displayed.

I have configured the language in system.properties is:
user.country=US
user.language=en
and another screens could work with the Laguage_ext-en.properties.

I also put the properties file in the correct location: ext-impl\src\content

But the new screens do not work with the Laguage_ext-en.properties file, they only work with Laguage_ext.properties.

Can you help me please?

Thanks,
Kha Nguyen



Hi,

Use hook
Or

you can follow below given steps.
1. stop server
2. copy portal-impl.jar from (liferay-portal-5.2.3\tomcat-6.0.18\webapps\ROOT\WEB-INF\lib) and extract.
3. modify language file(poral-impl/content).
4. create jar again portal-impl.
5. put in same place.
6. start server.


Thanks
Nidhi Singh
thumbnail
Sandeep Nair, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Liferay Legend Publications: 1744 Date d'inscription: 06/11/08 Publications récentes
By the way the name of the property is Language-ext_en.properties not Laguage_ext-en.properties.

Second thing i guess is the way language property works is like language-ext.properties is for your own customized property which is not there in language.property. For more locale specific property like us english it uses language-ext_en or language-ex_ar, etc.

For example suppose you have a new customized property you add it in language-ext.property, for US english locale specific u again write it in language-ext_en.

Regards,
Sandeep
Al-Mothafar Al-Hasan, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Regular Member Publications: 110 Date d'inscription: 06/12/09 Publications récentes
Hi
Its easy "in sha' allah"
First : for default language you insert your lines in portal-ext.properties that you can find it in "webapps\ROOT\WEB-INF\classes" directory , create this file if that not created yet ...


as example : i set the language and country and locales by these lines in portal-ext.properties
#
# Set the default language.
#
user.country=SA
user.language=ar

#
# Set available languages.
#
locales=ar_SA,en_US


The second : for your screens , create a folder called "content" in "webapps\ROOT\WEB-INF\classes" directory , then inside it create your custom language files for English the name of file is "Language-ext_en.properties" for Arabic is "Language-ext_ar.properties" and so ..

This way easier than your way to edit original files and jar files and etc , keep your original files safe and if you upgrade your Liferay in future you will not lose your changes as what will happened if you modified the original ...

After that restart your application server , and I hope its will work ... emoticon
Kha N Nguyen, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Junior Member Publications: 89 Date d'inscription: 22/11/09 Publications récentes
Hi all,

Everything, which you are talking, is OK. I am doing correct way, and another screens can work with the Language-ext_en.properties.

But the new screens (not new portlet) cannot work with the Language-ext_en.properties.

Thanks
Al-Mothafar Al-Hasan, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Regular Member Publications: 110 Date d'inscription: 06/12/09 Publications récentes
in which way you write a new screens in language-ext_en file , and how you calling it in vm?
Kha N Nguyen, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Junior Member Publications: 89 Date d'inscription: 22/11/09 Publications récentes
Al-Mothafar Al-Hasan:
in which way you write a new screens in language-ext_en file , and how you calling it in vm?


The way I did:

- Create the new jsp in ext-web\docroot\html\portlet\login folder, for example: change_email.jsp

- Put the link in the login.jsp to open the change_email.jsp

I do not understand what you mean "a new screens in language-ext_en file" ?
Why do I need calling it in vm ?

Thanks,
thumbnail
Faisal K, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Regular Member Publications: 138 Date d'inscription: 09/01/08 Publications récentes
Hi,

Can I get an Idea what is happening with your Language.properties

1. you added a new jsp called change_email.jsp and included in login.jsp
2. have you added a new Language key?(is this key exists in Liferay's default Language.properties or Language_en.properties)
3. If you put the key value in Language-ext_en.properties it is not being shown in your portlet?
4. but when you put your key value in Language-ext.properties then it is working?

Even you can find more details about how the Langauge bundles are loaded

http://www.liferay.com/community/wiki/-/wiki/Main/Languagedisplay%20customization;jsessionid=84030FFF2A27731A5FD7426A3975A463.node-1#section-Languagedisplay+customization-RelatedArticles
Kha N Nguyen, modifié il y a 14 années.

RE: Problem with Language_ext-en.properties when create new screens

Junior Member Publications: 89 Date d'inscription: 22/11/09 Publications récentes
Faisal K:
Hi,

Can I get an Idea what is happening with your Language.properties

1. you added a new jsp called change_email.jsp and included in login.jsp
2. have you added a new Language key?(is this key exists in Liferay's default Language.properties or Language_en.properties)
3. If you put the key value in Language-ext_en.properties it is not being shown in your portlet?
4. but when you put your key value in Language-ext.properties then it is working?

Even you can find more details about how the Langauge bundles are loaded

http://www.liferay.com/community/wiki/-/wiki/Main/Languagedisplay%20customization;jsessionid=84030FFF2A27731A5FD7426A3975A463.node-1#section-Languagedisplay+customization-RelatedArticles


Thanks for your link.

I have to use the Language-ext_en_US, not the Language-ext_en.
It works now.