Message Boards
Internationalization and Localization
Ishan Sahore, modified 11 Years ago.
Internationalization and Localization
Junior Member Posts: 56 Join Date: 4/26/12 Recent Posts
Hi,
I am not able to convert the content of my webpage from english into other languages in the portlets which I have created. Is there a way by which I can do so? I specify the locale using the language protlet but it only works for the out of the box portlets. Content of portlets created by me does not change, it remains in english. Any help is appeciated.
Thanks,
Ishan
I am not able to convert the content of my webpage from english into other languages in the portlets which I have created. Is there a way by which I can do so? I specify the locale using the language protlet but it only works for the out of the box portlets. Content of portlets created by me does not change, it remains in english. Any help is appeciated.
Thanks,
Ishan
David H Nebinger, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent PostsIshan Sahore:
I am not able to convert the content of my webpage from english into other languages in the portlets which I have created.
you're stuck. You didn't immediately start using language bundles from the get-go, so now you have to go back and backfill it in.
Hitoshi Ozawa, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
If you are using Liferay IDE, there was an option to create I18N properties file when creating a project.
David H Nebinger, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
Even if the file is there, you still have to ensure you're not using hard-coded strings for your content.
Hitoshi Ozawa, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
Following page offers the general idea. It's a little bit old and doesn't contain internationalization in Alloy UI which liferay currently uses.
https://blogs.oracle.com/mahipal/entry/how_to_i18n_and_l10n
https://blogs.oracle.com/mahipal/entry/how_to_i18n_and_l10n
Ishan Sahore, modified 11 Years ago.
RE: Internationalization and Localization
Junior Member Posts: 56 Join Date: 4/26/12 Recent PostsDavid H Nebinger:
Even if the file is there, you still have to ensure you're not using hard-coded strings for your content.
Hi,
I created the "portal-ext.properties" file in the location "liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\ROOT\WEB-INF\classes".
Tell me if any entries in that file can help.
I couldn't find resource bundles.
Ishan Sahore, modified 11 Years ago.
RE: Internationalization and Localization
Junior Member Posts: 56 Join Date: 4/26/12 Recent PostsHitoshi Ozawa:
If you are using Liferay IDE, there was an option to create I18N properties file when creating a project.
Hi, I am using Eclipse-Indigo IDE with liferay plugin to develop my portlets. I didn't come across any such option.
Where can I get any idea about this?
Hitoshi Ozawa, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
New -> Liferay Project -> (Enter project name) and press Next -> Liferay MVC (check "Create custom portlet class" <- this is the important part! )
-> (Enter portlet class name) and press Next -> There should be "Create resource bundle file". Check that.
-> (Enter portlet class name) and press Next -> There should be "Create resource bundle file". Check that.
Ishan Sahore, modified 11 Years ago.
RE: Internationalization and Localization
Junior Member Posts: 56 Join Date: 4/26/12 Recent PostsHitoshi Ozawa:
New -> Liferay Project -> (Enter project name) and press Next -> Liferay MVC (check "Create custom portlet class" <- this is the important part! )
-> (Enter portlet class name) and press Next -> There should be "Create resource bundle file". Check that.
Got the language.porperties file. But how do I go about it so that all my portlet content gets translated from one locale to another.
David H Nebinger, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
First you flush out your language bundle, putting in all the key/value pairs.
Then you modify all of your pages to refer to the language bundle rather than the hard-coded strings you have in there now.
Then you hire someone that speaks the language you want to support, and have them fill out the language bundle for that language, using your default bundle as the key.
Then you modify all of your pages to refer to the language bundle rather than the hard-coded strings you have in there now.
Then you hire someone that speaks the language you want to support, and have them fill out the language bundle for that language, using your default bundle as the key.
Hitoshi Ozawa, modified 11 Years ago.
RE: Internationalization and Localization
Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
I've already given an uri to a page explaining what you had to do in your portlet. Please read it.
https://blogs.oracle.com/mahipal/entry/how_to_i18n_and_l10n
https://blogs.oracle.com/mahipal/entry/how_to_i18n_and_l10n
asif aftab, modified 10 Years ago.
RE: Internationalization and Localization
Regular Member Posts: 123 Join Date: 9/2/13 Recent Posts
Hi
This is my blog where I have written a program working on internationalization
http://liferayasif.blogspot.in/
Thanks
asif aftab
This is my blog where I have written a program working on internationalization
http://liferayasif.blogspot.in/
Thanks
asif aftab