Home > Articles > Web Development

  • Print
  • + Share This
From the author of Did I Remember All the Language Strings?

Did I Remember All the Language Strings?

One great thing about Joomla is that it's available in so many different languages (around 64 at my last count). To make this work, we use a language.ini file with a key, and text when we output text. When writing something new, often I won't worry about creating all of the final language keys until later in the project, when things are more stable and I'm less likely to need to change the language keys. In this scenario, it can be a challenge to go back and make sure that I didn't forget any language keys.

The language debug mode on the System tab of Global Configuration can help to speed up this process. If you enable that option and then load one of your new pages, at the bottom of the screen you'll see an Untranslated Strings section. This section tells you if your layout has any language keys that are not in the .ini file. In Figure 4, for example, we have four untranslated strings.

Figure 4 Debug language display showing untranslated strings.

With this screen, you can simply copy-and-paste from the browser to your language .ini file, and then type the correct language value for each key.

In Joomla 2.5, the language files must conform to the standard PHP .ini format. If an error is found in the file, the language debug mode shows you exactly where the error is, as shown in Figure 5.

Figure 5 Debug language display showing language file error.

  • + Share This
  • 🔖 Save To Your Account