Skip to content

Adding new translations or modifying existing ones.

4Podcast is already available in 11 languages but that large list may not include your very own language. In addition, you may want to change a few or many language strings used by 4Podcast to better fit your needs.

To that effect, adding new, or overriding existing translations is possible in several ways.

Types of translations

4Podcast uses 2 types of translations files:

  • Joomla standard *.ini files are used for a few strings, mostly when 4Podcast is displayed in the Joomla extensions list or similar
  • Our own *.json language strings format, which is better suited for use in pure javacript application such as 4Podcast and contains anything you see displayed in the 4Podcast user interface

As overriding 4Podcast language strings found in *.ini is standard Joomla procedure, we won't talk about it anymore here. Please refer to Joomla own documentation for this.

The remaining of this page talks about modifying strings found in *.json files only.

Here is an example of a *.json (partial) content, from the common.json file:

{
  "base": {
    "yes": "Yes",
    "no": "No",
    "ok": "OK",
    "auto": "Auto",
    "enabled": "Enabled",
    "disabled": "Disabled",
    "none": "None",
    "details": "Details",
    "required": "required",
    "from": "From",
    "to": "To",
    "done": "Done!",
    "reset": "Reset!",
    "doNotChange": "Do not change",
    "default": "Default",
    "custom": "Custom"
  },
  "operators": {
    "equals": "=",
    "different": "Different",
    "greater": "Greater",
    "greaterEq": "Greater or =",
  ....

Source file location

All the JSON files released with 4Podcast are found in this directory:

/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales

Below this root directory, you'll see a series of subfolders, named with the corresponding language code:

/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/ar
/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/cs
/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/da
/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/de
/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/en
/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/es
....

In each folder, you'll see one or more json files such as:

admin.json
common.json

Source language

The source, official, strings are always the en directory.

Do not modify any of the files directly

If you want to change translations found in these files, or add a new language, do not do that directly in the /plugins/system/forpodcast/vendor/weeblr/forpodcast/locales directory. Any change you make here will be deleted at next update.

Please read on to learn how to safely add your own translations.

Overriding existing translations

To make the process easier, 4Podcast lets you change translations using 2 different methods:

Override translations with files

Very similar to how you can create template or layout overrides in your template, you can change existing translations by copying the source file in a given specific directory and modifying it there.

Let's look at 2 scenariis:

Change one or more strings

Assuming you want to change the French translation for base.yes, the steps are:

  • create a directory:
/libraries/weeblr/forpodcast/locales/fr/
  • create a file called:
admin.json
  • enter this content:
{
  "base": {
    "yes": "my french translation for Yes",
  }
}
  • save the file, that's all.

Pay attention to matching { and } characters exactly, else your override won't be taken into account.

Instead of creating the content of that file and adding a single override, you could also copy the entire source file and modify one or a few lines in that copy.

This works, but it not the best approach because it will prevent future improvement in our translation that we could do to work, as your overrides have priority. It's also slightly slower.

Add translation for a new language

This works exactly as the previous example except you put your translations in a new dedicated folder:

Assumning you want to add a translation for the Greek language, from Greece, which full language tag is: el-GR, do the following:

  • create one of these 2 directories:
/libraries/weeblr/forpodcast/locales/el-GR/

or

/libraries/weeblr/forpodcast/locales/el/
  • copy the source file you want to translate from:
/plugins/system/forpodcast/vendor/weeblr/forpodcast/locales/en
  • start translating this copy content

That's all!

You can have both el-GR and el directories, with different translations and content. If the Joomla site language is set exactly to el-GR, the translations in that directory will have precedence.

If the site language is set to something else, for instance el-CY, then your el-GR translation won't be used but if you have one in el, it will be used the same for el-GR and el-CY, as el is the language "family" code.

The standard Joomla language strings override mechanism

You access it through System | Language Overrides in Joomla 4+, and it lets you define a new translation for a given string key.

  • Using to override 4Podcast language strings found in *.ini is standard Joomla procedure so, again, please refer to Joomla own documentation for this.
  • Using it to override 4Podcast strings in *.json works nearly the same, except when building the string key.

Looking back at the example of a *.json file, we can see a difference in how the keys are organized compared to Joomla *.ini keys: 4Podcast keys have 2 levels, whereas Joomla keys are always one level:

PLG_SYSTEM_FORPODCAST = "System - 4Podcast"
PLG_SYSTEM_FORPODCAST_XML_DESCRIPTION = ""
PLG_SYSTEM_FORPODCAST_PRIVACY_CAPABILITIES = "4Podcast does not store private personal information."

Keys used by Weeblr's applications are 2 levels, for instance:

base.yes

Therefore, to build the language strings to use on Joomla text override page, the key for our example must be built as follows:

COM_FORPODCAST_BASE__YES

Note there are 2 _ characters between "BASE" and "YES", this is what represents the secondary level.

Aside from this quirk in selecting the key, the rest of the process is the same as usual when overriding Joomla language strings.

4Podcast translators credits

4Podcast was translated in part by a group of Joomla! enthousiasts:

Dutch

Davy Renckens

Webdesigner / offiRent verhuur van maatschappelijke zetels en virtuele kantoren in België en Nederland.

French

Yannick Gaultier

https://weeblr.com

Polish

Marcin Równicki

I teach about JOOMLA, create websites and optimizes. I am familiar with topics such as SEO, social media and marketing.

Spanish

Carlos Cámara

Web developer always interested in new projects

Turkish

Mehmet Taş

Matematik Öğretmeni, Web Tasarımcısı