Language library not switching on multi-language site
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Language library not switching on multi-language site
I've created a multi-language site and the language switcher seems to be working. The only problem is that the language library isn't switching. I'm trying to have the Russian library show up, but the English translations still show up.
My Russian pages with Russian content do come through, it's just the library translations that don't.
My Russian pages with Russian content do come through, it's just the library translations that don't.
- imanickam
- Joomla! Master
- Posts: 28206
- Joined: Wed Aug 13, 2008 2:57 am
- Location: Chennai, India
Re: Language library not switching on multi-language site
Could you please explain what you mean by library translation?
What is your site's URL so that others can see the behavior and offer suggestions?
Make sure that the objects such as menu items, articles, and categories are assigned to respective languages. Also, make sure that the objects are associated with other languages.
What is your site's URL so that others can see the behavior and offer suggestions?
Make sure that the objects such as menu items, articles, and categories are assigned to respective languages. Also, make sure that the objects are associated with other languages.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
What I mean is the definitions in the language libraries, such as en-GB vs ru-RU. The constants and definitions such as MOD_LOGIN="Login".
I have verified all the things you mention in your reply except I am unsure of what you mean by "objects are associated with other languages". I have identical constants in the each language in the exact same file. Is that what you mean?
The site in question can be viewed here: http://72.32.35.129/joomla/
I have verified all the things you mention in your reply except I am unsure of what you mean by "objects are associated with other languages". I have identical constants in the each language in the exact same file. Is that what you mean?
The site in question can be viewed here: http://72.32.35.129/joomla/
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
Oh, actually I do know what you mean by associating with the other language. Yes, I've done all that. Again, my pages and menus operate exactly how I want them to. It's the constants that don't change between the languages.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
For instance, if I switch from English to Russian, the English translations are still the ones that show up.
- imanickam
- Joomla! Master
- Posts: 28206
- Joined: Wed Aug 13, 2008 2:57 am
- Location: Chennai, India
Re: Language library not switching on multi-language site
If you are referring to the login module that shows up when you click on the link "Sign up or Log in", it could be because the corresponding module does not have the Russian language strings. As the module seems to be not the core module, mod_login, you have to track down the code of this module. If the text strings in the module are driven by language strings then you could create the overriding language strings in the Language Manager.
Try the following:
- Go to the Global Configuration
- In the tab System, for the options "Debug System" and "Debug Language" choose the value Yes.
With the above settings you could see the list of untranslated strings when you view the site.
Try the following:
- Go to the Global Configuration
- In the tab System, for the options "Debug System" and "Debug Language" choose the value Yes.
With the above settings you could see the list of untranslated strings when you view the site.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
I'm not talking about the login module specifically. That was just an example so you understood I was talking about the constants and definitions.
NONE of the constants in any of the Russian language files are coming through with the Russian translation. This includes core and non-core files. They ALL show up with the English definition regardless of whether I choose English or Russian.
NONE of the constants in any of the Russian language files are coming through with the Russian translation. This includes core and non-core files. They ALL show up with the English definition regardless of whether I choose English or Russian.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
I've done what you've suggested. There are no errors.
Also, to reiterate, I'm not seeing the constants that haven't been parsed or defined. I always see the English definition even if Russian is selected. It's strange.
I've left debugging on so you can see the output. When I switch to Russian, I can tell that some of the Russian .ini files are not loading and their counterpart English .ini file IS being loaded. I don't understand why the English file would load if I've selected Russian. Would it do that if there is a problem with the Russian file?
Also, to reiterate, I'm not seeing the constants that haven't been parsed or defined. I always see the English definition even if Russian is selected. It's strange.
I've left debugging on so you can see the output. When I switch to Russian, I can tell that some of the Russian .ini files are not loading and their counterpart English .ini file IS being loaded. I don't understand why the English file would load if I've selected Russian. Would it do that if there is a problem with the Russian file?
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
Any other thoughts on this? Why wouldn't the constants/definitions change with the multilanguage switch?
-
- I've been banned!
- Posts: 1498
- Joined: Fri Jul 12, 2013 5:37 pm
- Contact:
Re: Language library not switching on multi-language site
- enable plugin language in plugin manager
- create content for all languages
- create content for all languages
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sat Jul 05, 2014 11:02 pm
Re: Language library not switching on multi-language site
Thank you, however as I explained at the beginning, this wasn't my problem. All of that was setup correctly and was running fine. It was the constants in the language libraries that were not loading, specifically my custom language files for my component.
I was able to add language support to my index.php file by using getLanguage(). Then I switched the prefix based on the language loaded. Here is the code I used:
It works fine, but I don't know if this is the most elegant way of doing it. If someone has a better suggestion, please let me know.
I was able to add language support to my index.php file by using getLanguage(). Then I switched the prefix based on the language loaded. Here is the code I used:
Code: Select all
$lang = JFactory::getLanguage();
if ($lang->getName() == 'Russian') {
$lang_type = 'ru-RU';
} else {
$lang_type = 'en-GB';
}
$lang->load('<filename>', JPATH_SITE, $lang_type, true);
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language library not switching on multi-language site
As you said above: "Some" of the Russian files are loading and not others.
This means, if the files concerned are those of your custom component, that the error comes from the component itself.
(I could not see the debug as you took it off)
This means, if the files concerned are those of your custom component, that the error comes from the component itself.
(I could not see the debug as you took it off)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group