Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
sujay paul
Different Languages in liferay
10 gennaio 2012 21.27
Risposta

sujay paul

Punteggio: Regular Member

Messaggi: 119

Data di Iscrizione: 28 ottobre 2011

Messaggi recenti

Hi,

I want to implement a portal using Liferay 6 in Bengali & Assamese language.

In Liferay I had seen many languages Like Hindi, english etc but there are no options for Bengali or Assamese.

Can any one help me?

Thanks in advance.
Rojalin Patri
RE: Different Languages in liferay
11 gennaio 2012 1.30
Risposta

Rojalin Patri

Punteggio: Expert

Messaggi: 287

Data di Iscrizione: 22 marzo 2011

Messaggi recenti

Hi Sujay,
the steps mentioned below needs to be followed up...
Step 1:Add the desired languages in \webapps\ROOT\WEB-INF\classes\portal-ext.properties
For example, locales=en_US,gu_IN,mr_IN (this is an example for Marathi and Gujrathi i had created...so the gu_IN represents Gujrathi)
Steps 2:Create Language-ext_<locale>.properties and Language-ext_<locale>.properties.native at \webapps\ROOT\WEB-INF\classes\content
For example,
Language-ext_be.properties (for bengali)
Language-ext_be.properties.native
step 3:Add Language Portlet, from admin login -> Add Application. Configure the languages to be shown and the display style as required.you should be able to see your added languages in the drop down.
if you want to access the locale of the user in any such specific page ,you can get it through "Locale userLocale = PortalUtil.getLocale(request);".
Hope this helps...
himanshu jain
RE: Different Languages in liferay
11 gennaio 2012 1.51
Risposta

himanshu jain

Punteggio: Junior Member

Messaggi: 34

Data di Iscrizione: 25 ottobre 2011

Messaggi recenti

C:\dev\Liferay\liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\WEB-INF\classes bt where is content....
sujay paul
RE: Different Languages in liferay
11 gennaio 2012 2.40
Risposta

sujay paul

Punteggio: Regular Member

Messaggi: 119

Data di Iscrizione: 28 ottobre 2011

Messaggi recenti

Thanks a lot Rojalin,

The problem solved.

I am modifying your Streps for Liferay 6 .they are

Step 1:
Add the desired languages in \ROOT.war\WEB-INF\classes\portal-ext.properties
For example, locales=en_US,gu_IN,mr_IN (this is an example for Marathi and Gujrathi i had created...so the gu_IN represents Gujrathi)

Steps 2:
get the Language_en_US.properties file from \webapps\ROOT\WEB-INF\lib in portal-impl.jar (Un pack the jar file)
Create Language_<Local Language>_<Country Name>.properties by copying the above file & make the necessary translations & save in utf8 format
For example, Language_be_IN.properties.
again make the jar with the new Language_be_IN.properties file.

step 3:
Login with Admin. go to control panel then portal settings then display settings & put your language in Available Languages

Step 4:
Add Language Portlet, from admin login -> Add Application. Configure the languages to be shown and the display style as required.you should be able to see your added languages in the drop down.

Rojalin thanks again for your help.
Rojalin Patri
RE: Different Languages in liferay
11 gennaio 2012 3.06
Risposta

Rojalin Patri

Punteggio: Expert

Messaggi: 287

Data di Iscrizione: 22 marzo 2011

Messaggi recenti

Hi Sujay,
sorry for the late reply.actually we shouldn't do any changes to the default jars.changing portal-impl.jar and again replacing it is not a recommended practice. when we place the xxx_ext files such as portal-ext.properties,language-ext.properties in WEB-INF/classes it overrides the default files i.e.portal.properties and language.properties present in poratl-impl.jar/content.if the content folder was not there then create a folder called content and place your language translation files over there.the same could be achieved by a language hook as well.
Glad to hear that you have achieved it some how.....
sujay paul
RE: Different Languages in liferay
12 gennaio 2012 4.18
Risposta

sujay paul

Punteggio: Regular Member

Messaggi: 119

Data di Iscrizione: 28 ottobre 2011

Messaggi recenti

Hi rojalin ,
We have done what u have said.
its Working fine.
Thanks again.

One more problem arises
I didnt find the way to add the flag image for bengali & asamese languages & name of the languages for display purpose.

Any Idea?
Rojalin Patri
RE: Different Languages in liferay
17 gennaio 2012 2.25
Risposta

Rojalin Patri

Punteggio: Expert

Messaggi: 287

Data di Iscrizione: 22 marzo 2011

Messaggi recenti

Hi Sujay,
the flag icons for different languages are located in webapps\ROOT\html\themes\classic\images\language folder.you need to place your own flag for Bengali and Assamese in the same folder.