Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Nilesh Gundecha
Portlet Title Localization
6 de Maio de 2011 06:53
Resposta

Nilesh Gundecha

Ranking: Regular Member

Mensagens: 196

Data de entrada: 30 de Novembro de 2009

Mensagens recentes

Hi Friends,

I want to do localization in my application. And am using social-networking -portlet portlets (like Summary, Wall, Meetups, etc.) in my application.

On changing the language, the content inside these portlets are getting localised, but the portlet title do not. I have checked their source and found that they dont have any language resource bundle inside the social-networking-portlet plugin.

So I created one Language_ja.properties inside the social-networking-portlet\WEB-INF\class\content\. and configured in liferay-hook.xml as below -

1
2<hook>
3    <portal-properties>portal.properties</portal-properties>
4    <language-properties>content/Language.properties</language-properties>
5    <language-properties>content/Language_ja.properties</language-properties>
6</hook>


Also added below configuration for every portlet in portlet.xml -
1
2<resource-bundle>content/Language.properties</resource-bundle>


And below are my Language_ja.properties -

 1
 2##
 3## Language settings
 4##
 5
 6lang.dir=ltr
 7lang.line.begin=left
 8lang.line.end=right
 9
10javax.portlet.title.1_WAR_social-networking-portlet=概要
11javax.portlet.title.2_WAR_social-networking-portlet=友人
12javax.portlet.title.3_WAR_social-networking-portlet=ウォル
13javax.portlet.title.4_WAR_social-networking-portlet=友達の活動
14javax.portlet.title.5_WAR_social-networking-portlet=メンバ数
15javax.portlet.title.7_WAR_social-networking-portlet=ミィートアップ
16javax.portlet.title.8_WAR_social-networking-portlet=組織活動


But am still not able to get the Portlet Title in localized language. Can any one point me what I am doing wrong anywhere?? I suspect whether I am configuring title in Language_ja.properties in wrong way.. If so, please let me know the right way to do so??

Thanks and Regards,
Nilesh.
Hitoshi Ozawa
RE: Portlet Title Localization
6 de Maio de 2011 17:04
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

This problem as well as other internationalization problems such as filling database with Japanese data has already been fixed in the Japanese version we are offering.
Nilesh Gundecha
RE: Portlet Title Localization
6 de Maio de 2011 21:40
Resposta

Nilesh Gundecha

Ranking: Regular Member

Mensagens: 196

Data de entrada: 30 de Novembro de 2009

Mensagens recentes

Hitoshi Ozawa:
This problem as well as other internationalization problems such as filling database with Japanese data has already been fixed in the Japanese version we are offering.



Dear Hitoshi San,

Thanks for the reply. Request you to please let me know from where can I download the fixed social-networking-portlet.war file?? Is it available on Liferay.com under official plugins??

Also as you said that the problem of filling database with Japanese data is also fixed, Do we need any Source Code change for achieving this?? I mean I was under impression that setting up the database with character set encoding as UTF-8, will allow me to insert Japanese character.

Actually I am developing a Product with Japanese support. I would be glad if you could provide me some guidelines for making the product to support Japanese.

Thanks and Regards,

Nilesh.
Aikon Labs Pvt Ltd.,
Realizing Ideas....
Mutahi Waruhiu
RE: Portlet Title Localization
27 de Julho de 2011 00:59
Resposta

Mutahi Waruhiu

Ranking: New Member

Mensagens: 1

Data de entrada: 26 de Maio de 2011

Mensagens recentes

Hitoshi Ozawa:
This problem as well as other internationalization problems such as filling database with Japanese data has already been fixed in the Japanese version we are offering.



Is it at all possible then to access the language properties defined in the hook?, I have a scenario where I am developing several portlets for a client and I would like to centralise the language properties files in a hook. Is this possible?, if so how?
Dave Weitzel
RE: Portlet Title Localization
19 de Agosto de 2011 13:58
Resposta

Dave Weitzel

Ranking: Regular Member

Mensagens: 204

Data de entrada: 18 de Novembro de 2009

Mensagens recentes

can I ask a question about the title?
How did you ascertain that these are the right keys to use?
What entries do you have in your liferay-portlet.xml?

I am trying to work out the right way to refer to the key
I know it is prefixed by javax.portlet.title but is the rest:
<portlet-name>_WAR_<webappname>
where portlet-name comes from liferay-portlet.xml?

I have tried using the p_p_Id from a URL but to no avail (it was above format without an "-" characters.)

This area is badly documented IMHO wit h no real examples
Dmitry Sergeev
RE: Portlet Title Localization
28 de Agosto de 2012 22:55
Resposta

Dmitry Sergeev

Ranking: Junior Member

Mensagens: 33

Data de entrada: 7 de Novembro de 2011

Mensagens recentes

Dave Weitzel:

This area is badly documented IMHO wit h no real examples

Could you please show me one single area of Liferay that is documented well? Or just documented?