Elxis CMS Forum

Support => Language => Topic started by: YAM on September 15, 2009, 14:38:09

Title: Smart Language Switch - How to Use?
Post by: YAM on September 15, 2009, 14:38:09
Could someone please help me whether there is any resource available to learn using the "Smart Language Switch" feature?
Say, if I have two web page of the same content but different language, do I need to put them under the same category/same section/have the same title/have the same menu item/ or what?

Title: Re: Smart Language Switch - How to Use?
Post by: nikos65 on September 15, 2009, 17:05:07
Quote
if I have two web page of the same content but different language, do I need to put them under the same category/same section/have the same title/have the same menu item

Exactly !!  ;)
Title: Re: Smart Language Switch - How to Use?
Post by: rentasite on September 15, 2009, 17:10:08

is this a spam message?  ::) ::)
Title: Re: Smart Language Switch - How to Use?
Post by: Farhad Sakhaei on September 15, 2009, 17:50:19

is this a spam message?  ::) ::)
NO  :D
Title: Re: Smart Language Switch - How to Use?
Post by: YAM on September 16, 2009, 05:54:47
Quote
if I have two web page of the same content but different language, do I need to put them under the same category/same section/have the same title/have the same menu item

Exactly !!  ;)

Sorry, do you mean the same menu item can be linked by 2 content items?  If yes, could you please advise how?  If they are linked to the same menu item, does this mean the menu title cannot show different language when switching ... probably not?  If the 2 content items are linked to 2 different menu items, how Elxis knows the 2 items actually are the same thing under different languages?

I am sure there must be some "obvious" way to do the "Smart Language Switch" which makes my question probably look unbelievably stupid.  Maybe I have tried other CMS with multiple languages support before, they use a different approach so I may be preoccupied by those different approaches.  So, please bear with me for the stupidity.
Title: Re: Smart Language Switch - How to Use?
Post by: xmanhattan on September 16, 2009, 15:45:39
see
https://forum.elxis.org/index.php?topic=3246.0 (https://forum.elxis.org/index.php?topic=3246.0)
Title: Re: Smart Language Switch - How to Use?
Post by: YAM on September 16, 2009, 16:46:35
see
https://forum.elxis.org/index.php?topic=3246.0 (https://forum.elxis.org/index.php?topic=3246.0)


Thanks for the help.  I noticed that discussion before, but wrongly assumed that it was specifically a discussion related to the IOS gallery components, as it seems like a long complex discussion, something I was not expecting on a typical requirement: multiple language with different menu titles for different languages.

If I understand the discussion correctly, different menu titles for different languages would need a hack to the Elxis core ... this is something I would like to avoid as much as possible, as the same trick may need to be done whenever in the future Elxis has a new release.

Anyway, thanks again for all the help.
Title: Re: Smart Language Switch - How to Use?
Post by: Farhad Sakhaei on September 16, 2009, 18:33:06
This is my question too , YAM
Waiting for DATAHELL ...
Title: Re: Smart Language Switch - How to Use?
Post by: YAM on September 17, 2009, 05:54:21
I used another CMS before which support multilangual through extension ... you probably know which.  Elxis seems an attractive alternative to me because a number of good features, such as native support of multilangual, SEF URL and etc.  However, the inability to switch menu item language (without a hack) would make the web site not only look un-professional, but also not userfriendly or even irritating to the clients of the alternative language.

I would probably spend some more time to see if there is any better way to do the menu item language switching.  Eventually, I may need to give up if there is no easy or at least 'clean' way (i.e. without changing the Elxis core).

No matter what, Elxis seems a good CMS, even though it may not fit for my use.
Title: Re: Smart Language Switch - How to Use?
Post by: datahell on September 17, 2009, 18:29:15
Quote
However, the inability to switch menu item language (without a hack) would make the web site not only look un-professional,...

This is not true. Others CMS do just translations of the pages in other languages. Elxis gives you much more freedom. It gives you the ability to have totally different site structure for each language. The Elxis standard menus will react to the language changes based on YOUR selection in backend. When you set a menu item to be visible only for a specific language then when someone changes language elxis can not stay in the same page as the old menu item is no longer available, so you are get redirected to the home page. Only if the menu item is also available into the new language you stay in the same page after the language switch.

If you wish just to have multilingual link titles then you can easily do it by 10minutes hack on the menu module.

example:
Code: [Select]
<?php 
if ($lang == &#39;greek&#39;) {
   
$title = &#39;αρχική σελίδα&#39;;
} else {
   
$title = &#39;home page&#39;;
}
?>

<a href="xxxx" title="<?php echo $title?>"><?php echo $title?></a>
Title: Re: Smart Language Switch - How to Use?
Post by: Farhad Sakhaei on September 17, 2009, 23:49:22
Hi John ,
How we can have menu items for all languages using their languages?

For example I want to have "About us" page in English language (which has "About us" link and label in menu)
And in other hand want to have "درباره ما" (Translation of About us) in Persian language (which has "درباره ما" link and label in menu)
And also want to switch and stay between these pages ...

How we can do it ?
The question is also for sections , categories , content items and autonomous pages ...