Language library not switching on multi-language site

General questions regarding the use of languages in Joomla! 2.5.

Moderators: infograf768, 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.
Locked
ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Language library not switching on multi-language site

Post by ImageMagician1 » Sun Sep 14, 2014 11:30 pm

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.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 27307
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Language library not switching on multi-language site

Post by imanickam » Mon Sep 15, 2014 2:51 am

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.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Translations Coordination Team | Tamil (தமிழ்) Translation Team

Eegan - Support the poor and underprivileged

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Mon Sep 15, 2014 3:19 am

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/

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Mon Sep 15, 2014 3:28 am

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.

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Mon Sep 15, 2014 4:08 am

For instance, if I switch from English to Russian, the English translations are still the ones that show up.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 27307
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Language library not switching on multi-language site

Post by imanickam » Mon Sep 15, 2014 5:03 am

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.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Translations Coordination Team | Tamil (தமிழ்) Translation Team

Eegan - Support the poor and underprivileged

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Mon Sep 15, 2014 5:16 am

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.

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Mon Sep 15, 2014 5:42 am

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?

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Tue Sep 16, 2014 2:13 am

Any other thoughts on this? Why wouldn't the constants/definitions change with the multilanguage switch?

iextensions
I've been banned!
Posts: 1498
Joined: Fri Jul 12, 2013 5:37 pm
Contact:

Re: Language library not switching on multi-language site

Post by iextensions » Tue Sep 23, 2014 1:34 am

- enable plugin language in plugin manager
- create content for all languages

ImageMagician1
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sat Jul 05, 2014 11:02 pm

Re: Language library not switching on multi-language site

Post by ImageMagician1 » Tue Sep 23, 2014 2:23 pm

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:

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);
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.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18881
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language library not switching on multi-language site

Post by infograf768 » Wed Sep 24, 2014 6:34 am

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)
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Locked

Return to “Language - Joomla! 2.5”