Tassos Marinos Tassos Marinos Joomla Extensions

How to create Multilingual Forms in Joomla

Published in Convert Forms
Updated 22 Dec, 2021

Are you building a multilingual Joomla site? That's great! And if you're reading this doc, you must know already: you need to translate your forms too. With Convert Forms you have the ability to translate almost any word or phrase appearing in your forms using language strings making them accessible to people who speak different languages.

Let’s see how you can make that happen.

How to translate your forms into multiple languages

In Joomla, every extension can be translated into other languages using an INI language file. A language file consists of language strings, each of them consists of a key-value pair separated by an equals sign like this:

KEY=”value”

where KEY is a string to be translated and value is the translated string. For example:

ADDITIONAL_INFORMATION="Additional Information"

In Convert Forms, you can easily load the value of a language string using the {language.KEY} Smart Tag almost anywhere you can write text within the form builder.

Let’s see an example: Let’s say your site is available in both English and Spanish. Instead of having a Field Label option set to "First Name" or "Primer nombre".

You can create a language string for each language. The language string for the English translation will be:

FIRST_NAME=”First Name”

While for the Spanish translation will be:

FIRST_NAME=”Primer nombre”

Then set the Field Label option to {language.FIRST_NAME}. In that way, the field label will be automatically translated into the respective language on the front-end.

Where can you use the {language.STRING} Smart Tag?

The language Smart Tag can be used anywhere you can write text in the form editor settings. Here are some examples:

  • In any field setting
  • In the Thank you - Success message
  • In the PDF Form Submission addon
  • In the Email Notifications

How to create your language strings?

The best place to store your own language strings is inside the /language/overrides folder and specifically in the following file:

/language/overrides/[LANG_CODE].override.ini

Where [LANG_CODE] is the language code of the language you're trying to translate, eg: de-DE, es-ES

For instance, for the Greek language, place your language strings in the file below:

/language/overrides/el-GR.override.ini