Foros de discusión

Different Languages in liferay

thumbnail
sujay paul, modificado hace 12 años.

Different Languages in liferay

Regular Member Mensajes: 164 Fecha de incorporación: 28/10/11 Mensajes recientes
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.
thumbnail
Rojalin Patri, modificado hace 12 años.

RE: Different Languages in liferay

Expert Mensajes: 287 Fecha de incorporación: 22/03/11 Mensajes recientes
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...
thumbnail
himanshu jain, modificado hace 12 años.

RE: Different Languages in liferay

Junior Member Mensajes: 34 Fecha de incorporación: 25/10/11 Mensajes recientes
C:\dev\Liferay\liferay-portal-6.0.6\tomcat-6.0.29\webapps\ROOT\WEB-INF\classes bt where is content....
thumbnail
sujay paul, modificado hace 12 años.

RE: Different Languages in liferay

Regular Member Mensajes: 164 Fecha de incorporación: 28/10/11 Mensajes recientes
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.
thumbnail
Rojalin Patri, modificado hace 12 años.

RE: Different Languages in liferay (Respuesta)

Expert Mensajes: 287 Fecha de incorporación: 22/03/11 Mensajes recientes
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.....
thumbnail
sujay paul, modificado hace 12 años.

RE: Different Languages in liferay

Regular Member Mensajes: 164 Fecha de incorporación: 28/10/11 Mensajes recientes
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?
thumbnail
Rojalin Patri, modificado hace 12 años.

RE: Different Languages in liferay

Expert Mensajes: 287 Fecha de incorporación: 22/03/11 Mensajes recientes
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.
thumbnail
Anuvab Ghosh, modificado hace 8 años.

RE: Different Languages in liferay

Regular Member Mensajes: 130 Fecha de incorporación: 18/04/15 Mensajes recientes
At first thanks to both of you for your beautiful solution. But I have faced another problem in case of the title / alt of the image which is placed webapps\ROOT\html\themes\classic\images\language (as mentioned by you).
Kept the name of the Image as be_IN.png with Indian Flag for Bengali Language India. When I hover the mouse on the flag there was shown some different language may be Belarusian, it looks like беларускі (India).
I think the code for the Bengali (India) is bn_IN. I have used this code and working perfectly.
I have attached an image.
thumbnail
Olaf Kock, modificado hace 8 años.

RE: Different Languages in liferay

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
Language codes are constructed and standardized. As you recognize yourself, bn is the correct code for the Bengali language. If you use be_IN, you're right that "be" denotes the belarussian language, and in your example the indian version of it - probably not too many people are there to share their experience with this local variation.

As you've figured this out correctly yourself, I'm not sure what your question is, or if there is any. Use bn_IN for implementing the bengali language and name your flag with the same name. Then you shouldn't see any more reference to belarussian.