Translating Custom Fields in Joomla

You are excited about Joomla custom fields and you want to add them to your multi-lingual site - then you suddenly realise that you don't know how to make the custom fields multi-lingual.

You know you could add different versions of the same field - specifying the language for each of them.  The downside of this is that it becomes complex when you want to control the layout of your articles - with so many field and language combinations the template overrides quickly become difficult to manage. 

If you use separate custom fields for each language then the relevant ones would be included in your edit pages but filtering and ordering your articles based on these custom fields then becomes very cumbersome to manage.

There is another approach - using the Joomla language overrides system.

You would create your custom field using special labels, descriptions and option values - for example:

Notice how the label, description and option texts are all capitalised and have no spaces.

If we now edit an article with this field it doesn't look very promising!

But then we start the magic - in the backend of Joomla go to Extensions -> Language(s) -> Overrides and create translations for these special strings.  Before you click 'New' make sure you change the filter on the left to the 'Administrator' version of the language you to translate

Then press 'New' and create your translation

 

 

IMPORTANT - make sure you click the checkbox 'For Both Locations' (this makes the translation available in the frontend and the backend of your site).  Then, once you have saved this translation and translated the field description and option text your article edit page is transformed.

The translated values also appear in the frontend too !!

Remember if you are using EasyLayouts to customise the ordering of your articles based on this custom field that the ordering is based on the custom field value and not the displayed text.

 

Print Email

Demo Site

You can access our demo at https://demo.easylayouts.net.

You can easily switch EasyLayouts off and on again via a special module on the demo site and can also access the backend to experiment with the layouts. The demo resets every hour so bear in mind that the demo looks a bit odd that someone else may have changed the layouts before you viewed the page.

Keep up to date

Keep up to date with news about EasyLayouts