language switch for language=all [Solved]

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

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.
Locked
AlirezaH
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Jul 21, 2015 3:27 pm

language switch for language=all [Solved]

Post by AlirezaH » Tue Jul 21, 2015 3:35 pm

Hi,

I want to "language switcher module" for any menu item have language=All
just change language and do not get to home.

for example item 1 is language = all

Code: Select all

http://localhost/index.php?option=com_content&Itemid=1&view=frontpage&lang=en
when change language do not go to home:

Code: Select all

http://localhost/index.php?lang=fa
and I want go to:

Code: Select all

http://localhost/index.php?option=com_content&Itemid=1&view=frontpage&lang=fa
Regards
Last edited by AlirezaH on Tue Jul 21, 2015 4:00 pm, edited 1 time in total.

AlirezaH
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Jul 21, 2015 3:27 pm

Re: language switch for language=all [Solved]

Post by AlirezaH » Tue Jul 21, 2015 4:00 pm

I find!
I edit

Code: Select all

modules/mod_languages/helper.php
line 75

Code: Select all

$language->link = JRoute::_('index.php?lang='.$language->sef.'&Itemid='.$itemid);
to

Code: Select all

$language->link = JRoute::_('&lang='.$language->sef);
and
line 78

Code: Select all

$language->link = 'index.php?lang='.$language->sef;
to

Code: Select all

$language->link = JRoute::_('&lang='.$language->sef);
Best Regards

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30931
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: language switch for language=all [Solved]

Post by Per Yngve Berg » Tue Jul 21, 2015 4:35 pm

Mod. Note: Relocated the Topic to the Language 2.5 forum.

Your Language Setup is not correct. You are supposed to have one Menu for each language. So Itemid=1 cannot be both en and fa.
Joomla need to know which menu item is the same for the other language.


Locked

Return to “Language - Joomla! 2.5”