A major strength of Joomla! is its built-in multilingual support. Joomla! has special language handling classes that translate strings. The default language is configured in the Language Manager. The language can be overridden by a logged-in user's preferences.
We use the static
JText class to translate text.
JText has three methods for translating text:
printf(). The method that we use most is
_(). This method is the most basic; it simply translates a string.
The next example outputs the translation of
Monday; if a translation cannot be found, the original text is returned:
JText::sprintf() method is comparable to the PHP
sprintf() function. We pass one string to translate, ...