Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
henk huisman
Adding a dialect/language
June 26, 2012 7:44 AM
Answer

henk huisman

Rank: New Member

Posts: 11

Join Date: November 21, 2010

Recent Posts

I want to add the option to my website to switch in the language portlet to Papiemento.
(spoken on the Dutch Caribean islands and a combination of spanish, portugees, english and dutch)

I want users/guests to be able to switch to Papiemento (click the flag) so they can read the content written in that language.
I do not need a complete Papiements Liferay version!

As a start: I already have the flag icon

Can I add a language dialect or something? Like language_PA_es.properties with some basic Papiements meesages in it?

I did already read most threads on language development, but that did not bring me much further.
Also tried to log in into Pootle; did not succeed as it does not recognises my username (the one I am using here).

All in all another day in the Liferay learning curves...

Henk
Hitoshi Ozawa
RE: Adding a dialect/language
June 26, 2012 2:35 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Posting to a wrong thread. Try posting to the Translation forum.
http://www.liferay.com/community/forums/-/message_boards/category/1925364

You may get better replies if you reply to the following thread with a request that you want to be a translation leader for Papiemento language.
http://www.liferay.com/community/forums/-/message_boards/message/8035523
Sandeep Nair
RE: Adding a dialect/language
June 26, 2012 10:19 PM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

In your portal-ext.properties add the following property

locales=ar_SA,eu_ES,bg_BG,ca_AD,ca_ES,zh_CN,zh_TW,hr_HR,cs_CZ,nl_NL,nl_BE,en_US,en_GB,et_EE,fi_FI,fr_FR,gl_ES,de_DE,el_GR,iw_IL,hi_IN,hu_HU,in_ID,it_IT,ja_JP,ko_KR,nb_NO,fa_IR,pl_PL,pt_BR,pt_PT,ro_RO,ru_RU,sr_RS,sr_RS_latin,sl_SI,sk_SK,es_ES,sv_SE,tr_TR,uk_UA,vi_VN,es_PA

you have mentioned PA_es, but i suggest you to go for es_PA, since PA is a flavour of spanish language

Add es_PA.png in you custom theme/_diffs/images/language

In the web.xml of ROOT web application add the following servlet mapping

1    <servlet-mapping>
2        <servlet-name>I18n Servlet</servlet-name>
3        <url-pattern>/es_PA/*</url-pattern>
4    </servlet-mapping>


After doing these changes you should be able to see your flag in language portlet and locale selection section in Portal Settings of Control panel

Regards,
Sandeep
Hitoshi Ozawa
RE: Adding a dialect/language
June 26, 2012 11:00 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

As a start: I already have the flag icon


Sandeep, he already has a flag. He need to create "content" directory under ROOT\WEB-INF\classes directory and put his Language_es_PA.properties file there.
henk huisman
RE: Adding a dialect/language
June 27, 2012 1:57 AM
Answer

henk huisman

Rank: New Member

Posts: 11

Join Date: November 21, 2010

Recent Posts

Thanks for your replies
I put the thread in this forum as I am actually not working on translating Liferay into papiemento, just want to switch the web content to this locale.

I followed the instructions of Sandeep and so far this works. I can choose the flag and switch to ..... espanol(Panama)!

I have two more questions: the language description in the language portlet shows now Espanol(Panama) and also the html hover tag shows Espanol (Panama) if I hover over the Bonaire flag. Where can I change the property that es_PA is actually Papiemento or Espanol (Papiemento)?

Also in the URL I see that instead of ../es_PA/.. there is only ../es/..

I indeed put a language_es_PA.properties file in a content directory under WEBINF/classes .
Is there a reference file or documentation what to put in this file? I left it blank so far.

Cheers
Henk
Hitoshi Ozawa
RE: Adding a dialect/language
June 27, 2012 3:45 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I indeed put a language_es_PA.properties file in a content directory under WEBINF/classes .


It should be WEB-INF/classes/content/language_es_PA.properties

Even if you are only going to do some translation, I think liferay.com would appreciate if you contribute your translation to the community. Not all other language translations are complete. It's just a community project and people can just pitch in what they did. You'll also be able to get your translation included in the next release without doing the work of putting it in yourself again. It's not mandatory but we would appreciate if you do.
Sandeep Nair
RE: Adding a dialect/language
June 27, 2012 3:49 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

How to add a new Language

The reason you are seeing espanol(Panama) is because es_Pa is a valid locale available in java. You can see list of valid locales here
So you may have to change it something that is not used like es_Pp or something like that

Regarding the url please make sure you have added servlet mapping properly.

Regards,
Sandeep
henk huisman
RE: Adding a dialect/language
June 27, 2012 6:08 AM
Answer

henk huisman

Rank: New Member

Posts: 11

Join Date: November 21, 2010

Recent Posts

OK, thanks.
I will see what I can do with Papiemento.

Any idea how to add a nametag to for example es_PP ?

Henk
Hitoshi Ozawa
RE: Adding a dialect/language
June 30, 2012 7:13 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

ISO 630-2 code for Papiamento is pap
http://www.loc.gov/standards/iso639-2/php/code_list.php