Search code examples
liferay-7liferay-dxp

Can not add Filipino as a language in Liferay 7


I am having requirement to add below asian languages into Liferay dxp portal. I am able to add the languages except Filipino & Standard Mandarin.

  • Vietnamese
  • Thai
  • Standard Mandarin
  • English
  • Tamil
  • Malay
  • Filipino
  • Burmese
  • Indonesian
  • Malaysian
  • Khmer
  • Lao

When I am adding filipino language code "fil" in portal-ext.properties file and restart the server I am getting an error that "Filipino language code is not available for 2 char".

I think it's because of filipino language code is in ISO-3 language code.

I am not aware whether liferay supports iso-3 language code or not.

Please suggest me how to overcome this situation.


Solution

  • The language codes are not specific to Liferay but to JAVA. Liferay uses the standard Locale functionality of JAVA to identify languages.

    Try to google for the Java locale for your desired language and use that value. Something like en_GB, sk_SK...

    EDIT: You can also invent your own lang code. I once added Welsh into the portal with cy_GB and all worked fine.

    Also, note that you need to take care of the flags for the provided languages. The config UI will look quite unusable without them. See here How to add language icons in liferay DXP