17
votes
Accepted
How to manage language variables inside JavaScript?
Joomla has a certain method for this. First, in view.html.php add all strings, what needs to be translated with this:
JText::script('VALIDATION_ERROR');
This will add your string to javascript ...
6
votes
Accepted
JText - multilingual string order
Add further abstraction.
JText::sprintf('COM_MYCOMPONENT_DATETIME_AGO', $num, JText::_('SHOUT_TIME'), JText::_('SHOUT_AGO'));
English language
COM_MYCOMPONENT_DATETIME_AGO="%1$s %2$s %3$s"
German ...
6
votes
Accepted
How to adjust search keyword sanitization settings as language override?
Look for methods called set<PROPERTY>Callback on the same API documentation you linked. E.g. to override the lower limit use Joomla\CMS\Language\Language::setLowerLimitSearchWordCallback().
I'm ...
5
votes
Accepted
Joomla 3.9 not reading language override strings for English only
I was not able to duplicate your issue. I used the Joomla core Beez3 template to test this, where the template by default has the language files in main (Joomla root) Language folder and at the same ...
4
votes
Accepted
Module title not getting from language file
The problem is I need to keep the language files inside en-GB folder
<languages>
<language tag="en-GB">language/en-GB/en-GB.mod_quickwrk.ini</language>
<language tag="en-GB"...
4
votes
Accepted
Language files in a plugin
Since Joomla 3.1 it is not necessary to expand the constructor any more, like farahmand's answer.
You can easily write / set the $autoloadLanguage like
class myPlugin extends JPlugin
{
/**
*...
4
votes
Accepted
Updating component language file without reinstalling it
The language files are loaded again (from their source) on each page load. You don't need to reinstall the component each time. Are you writing to the right file?
4
votes
Accepted
Remove 'There are no articles in this category.' Text
Got to;
content > articles > options > category tab > No Articles Message > hide / show
4
votes
Accepted
language file naming conventions
Use non-prefixed filenames in J4 (3.10 also supports this). Nothing is stripping the prefix, some core manifest files just haven't been updated.
3
votes
Accepted
Save in logs files changes of Language Manager
Usually you would use "onContentBeforeSave" function of content-type plugin, but for some reason com_languages doesn't launch "onContentBeforeSave" and "onContentAfterSave" events. However there is ...
3
votes
Accepted
How to rewrite JText to get my custom text translations from Database and not from files
Instead of overwriting or modifying the JText class why not just write a function call function in your model that retrieves your translation from the database and return the string?
Echo the string ...
3
votes
Joomla 3.4.4 - URL Problems with alias of products in submenu
I FOUND THE SOLUTION!!!
Temporary change menu item type to Text Separator, modify alias to
your liking and change type back to External URL.
REFERENCE:http://www.mysysadmintips.com/other/web/...
3
votes
Remove language code from url
As far as I know what you want isn't possible.
The /en/ is needed so Joomla knows that you want to change the language. Because with www.example.com/company/contact.html Joomla would look in your ...
3
votes
Accepted
How to add a language pack (or language specific string overrides) to a template?
There are a couple of ways to deal with this.
1. Create a German language ini file for your template.
a. Go to languages folder -> EN-GB
b. Spot your template's EN-GB language file: e.g. en-GB....
3
votes
Language files in a plugin
Load the language files in the plugin's constructor like so:
function __construct(&$subject, $config) {
$lang = JFactory::getLanguage();
$lang->load('plg_system_myplugin', dirname(...
3
votes
Accepted
Home page a mix of language
This is the title of the Module - that is hand-written and editable. You can write anything you want on it.
If you go to the Modules' Manager, you will be able to find this module - click to edit it ...
3
votes
Accepted
Export language overrides
Like all languages strings, overrides are stored in .ini files in language directories:
/administrator/language/overrides/
/language/overrides/
3
votes
Accepted
Load language file in view constructor
JROOT is not a valid path constant. Change it to JPATH_ROOT. Or use JPATH_ADMINISTRATOR instead of JROOT . DS . 'administrator'
3
votes
Accepted
Using language constants in external file
Your language files are not loaded. Load them with Joomla\CMS\Language\Language::load(). This example loads administrator/language/en-GB/en-GB.com_content.ini file:
$app = JFactory::getApplication('...
2
votes
Getting current language in Joomla 3 in external script seems difficult.. but works fine in J2.5
I use the default Joomla multilingual management, no falang, no third-party plugin.
Same problem, and I spent 1 hour to find the solution.
The key is, don't try to use JFactory::getLanguage().
...
2
votes
Add text to registration form
You can find this string in this file -
/components/com_users/models/forms/registration.xml
I hope it will help you :)
2
votes
Module title not getting from language file
The proper method is like follows,
In your module's xml file it should have language file like follows:
<languages>
<language tag="en-GB">en-GB.mod_latesttweets.ini</language&...
2
votes
Localization Questions
Joomla does not support country-specific variant files.
Even with British-English and American English, there are different files:
en-GB
en-US
They way Joomla works with it's language strings is, ...
2
votes
Joomla 3.4.8 language filter "Automatic Language Change" disabled but still redirects in some cases
Blame Google my man! That's the biggest sniffer in the world, and I bet you any money that due to the fact your site is alive for a few months, it found Swedish articles on it's own and without your ...
2
votes
Accepted
Component language file is coppied but does not work
You can also ship the language files within your component in the language folder as I do with DPFields https://github.com/Digital-Peak/DPFields/blob/master/com_dpfields/admin/dpfields.xml#L48. After ...
2
votes
Component language file is coppied but does not work
Try this:
<languages folder="admin">
<language tag="en-GB">language/en-GB/en-GB.com_displaygroups.sys.ini</language>
</languages>
and remove
<folder>language</...
2
votes
Accepted
No available languages to install at the moment
I didn't spend more time to find the cause and the fix of this issue back then, but today I had to work on a site with the same issue: No Languages Available on the Languages Manager and a requirement ...
2
votes
Accepted
joomla 3.6 admin language won't change
Perhaps you've set the default admin language for your own user. Alter this setting for your user by going to your site's administration and go to users > manage > choose your user > basic settings ...
2
votes
How to add a language pack (or language specific string overrides) to a template?
So, in my case it was that the strings were hard-coded into the template through the inclusion of a single language pack in the template language folder for English. What I did was to create my own ...
2
votes
Language files in a plugin
I assume you have done the following, but just to make sure:
read https://docs.joomla.org/Creating_a_profile_plugin/en
be sure the language file exists and in the right folder
(double)check the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
language × 116joomla-3.x × 50
multilingual × 17
overrides × 15
joomla-4.x × 8
translation × 8
joomla-3.4 × 7
joomla-2.5 × 6
plugin × 6
articles × 6
custom-component × 6
module × 5
joomla-api × 4
jtext × 4
templates × 3
joomla-3.3.x × 3
template-override × 3
installation × 3
system-plugin × 3
joomla-5.x × 3
php × 2
component × 2
extensions × 2
javascript × 2
user × 2