Message Boards

RE: Change default language flag icon

Pierre-Olivier Kaplan, modified 9 Years ago.

Change default language flag icon

New Member Posts: 10 Join Date: 10/6/14 Recent Posts
Hello dear developpers.


I'm trying to change the default english from the Language portlet.

Actually, I want to replace the US flag by the british flag for the english language.
Is there a simple way to proceed ?

Thank you, best regards !


Pierre-Olivier
thumbnail
Pankaj Kathiriya, modified 9 Years ago.

RE: Change default language flag icon

Liferay Master Posts: 722 Join Date: 8/5/10 Recent Posts
This language flag images are coming from path portal-web\docroot\html\themes\_unstyled\images\language.

So in your theme you can replace this image keeping british flag by name as en_US.png under your custom theme's images\language folder.

HTH
thumbnail
Sven Werlen, modified 9 Years ago.

RE: Change default language flag icon

Regular Member Posts: 117 Join Date: 2/25/09 Recent Posts
en_GB flag is already included in Liferay (at least in 6.2)!

If you get US flag, it's because you configured Liferay to use en_US language by default.

Make sure that your portal-ext.properties contains the following lines:
  • locales=en_GB, ...
  • locales.enabled=en_GB, ...

See documentation.

WARNING: languages should be set from the beginning when you first create your portal! If your database has already been initialized with en_US, you cannot easily switch to en_GB without impacts.
Pierre-Olivier Kaplan, modified 9 Years ago.

RE: Change default language flag icon

New Member Posts: 10 Join Date: 10/6/14 Recent Posts
Thank both of you,

Yes I already initialized my database, so the only solution was to custom the sprites.

But I'll know for the next time emoticon