• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 131 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Thu Mar 26, 2009 6:46 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
Radice \Radice:
\$1:
alternative_page=DEFAULT CAN NOT BE USED! INACTIVE BUTTON: English



That means that the following condition is false:

\$1:
 
      if ( $show_default == true and valid_page($language[DEFAULT_PAGE]) )


Your default page for the English language is not valid.

You said you array is:

\$1:
$languages = array(
  'it' => array('italiano', '<span xml:lang="it">Italiano</span>'),
  'en' => array('english', '<span xml:lang="en">English</span>'),
  'sr' => array('serbo', '<span xml:lang="sr">Serbo</span>') );


That means there has to be a page with alias "english" that will be used by default when no English translation is avalaible. The same about "italiano" and "serbo". Do you have created those pages?

Anyway that is not the reason why the link to the actual translation is not shown. What is the content of the other_languages field of that page? If the format of the content is wrong, then the default page would be used.

_________________
Marcos Cruz


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri Mar 27, 2009 12:29 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
Hi Radice.

\$1:
> Ciao Marcos, i take some screenshot from my cms pages so you can see what i
> did.
> Default page is index, situated under "it" folder (u can see from the
> images). Now I use only english and italian language.
> I created 2 "default"
> pages for "it" and "en" if there is no content/translation avaible, as u told
> me in your post.
> Thank you again


In 1.jpg I see something wrong: That page is it/Home, and in other languages you wrote "it=Home". Something similar is wrong in 4.jpg, an English page, and in 2.jpg, another Italian page...

I suspect that you didn't understood what "other languages" is for: you have to fill it with the alternative translations, if they exist.

Example:

Imagine an italian page called "milano" (it/milano in the tree). Its English translation would be the page "milan" (en/milan in the tree).

OK? So what do you have to write in "other languages" in both pages?:

In "other languages" of it/milano you have to write "en=milan".
In "other languages" of en/milan you have to write "it=milano".

It's very simple: you have to write what translations are avalaible for each page, with the given format, or nothing if no translation is avalaible.

Another problem is the default pages. They are in the array, as we saw before. Those pages have to exist in their language tree.

Another point: In "other languages" and in the language array, use the page alias, not the page title.

Please confirm that you are using "other pages" "other languages" properly and the default pages do exist. I think that is the problem.

Cheers,
Marcos

_________________
Marcos Cruz


Last edited by alinome.net on Fri Mar 27, 2009 2:04 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri Mar 27, 2009 1:05 pm 
Offline
Forum Members
Forum Members

Joined: Fri Mar 13, 2009 9:06 am
Posts: 10
If i understood well....

it/about->alias:about->other languages: en=about_en
en/about->alias:about_en->other languages: it=about

or

it/contatti->alias:contatti->other languages: en=contacts
en/contacts->alias:contacts->other languages: it=contatti

There's a translation for each italian's page.
I can't rename all english pages with different names, because there's not a translation for the page name (you can't translate Strumicka 15! :D ). So some page NAME in "it" and "en" will be the same. ALIAS ARE DIFFERENTS!!!!!

Default page for "it" and "en" are it/Home and en/Home_en.
From the index (there's only a background image and you can choose which language use: no menu, no content) page i can choose the language: if i press italian i will be redirect to it/Home page, en/Home_en for english.


Please confirm that you are using "other pages" properly????????? where i found "other pages"??


Last edited by Radice on Fri Mar 27, 2009 1:12 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri Mar 27, 2009 1:58 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
Radice \Radice:
it/about->alias:about->other languages: en=about_en
en/about->alias:about_en->other languages: it=about

or

it/contatti->alias:contatti->other languages: en=contacts
en/contacts->alias:contacts->other languages: it=contatti


That's right.

Radice \Radice:
There's a translation for each italian's page.
I can't rename all english pages with different names, because there's not a translation for the page name (you can't translate Strumicka 15! :D ). So some page NAME in "it" and "en" will be the same. ALIAS ARE DIFFERENTS!!!!!


No problem. You have to use the alias.

Radice \Radice:
Default page for "it" and "en" are it/Home and en/Home_en.
From the index (there's only a background image and you can choose which language use: no menu, no content) page i can choose the language: if i press italian i will be redirect to it/Home page, en/Home_en for english.


Good, though it has no relation to the language menu. To use those pages as default in the language menu of every individual page, put Home and Home_en as the default pages in the language array. They will be used if no translation has been indicated for some page.

Radice \Radice:
Please confirm that you are using "other pages" properly????????? where i found "other pages"??


Sorry, I meant "other languages" :)

_________________
Marcos Cruz


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri Mar 27, 2009 2:14 pm 
Offline
Forum Members
Forum Members

Joined: Fri Mar 13, 2009 9:06 am
Posts: 10
Sorry if i'm so obstinate :D

"To use those pages as default in the language menu of every individual page, put Home and Home_en as the default pages in the language array"

u mean to put home after header: es:

it/header->1
it/home->1.1

Because i can set only one page as the default site's page: now this page is it/index.

Thank you again

Paolo

ps: now i'm going to change all other_language, than i will update you


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri Mar 27, 2009 2:54 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
Radice \Radice:
"To use those pages as default in the language menu of every individual page, put Home and Home_en as the default pages in the language array"

u mean to put home after header: es:

it/header->1
it/home->1.1


I don't understand what you mean. Anyway I mean to put them in the language array, in the language_menu tag:

\$1:
$languages = array(
  'it' => array('Home', '<span xml:lang="it">Italiano</span>'),
  'en' => array('Home_en', '<span xml:lang="en">English</span>') ) ;


That's the place.

Radice \Radice:
Because i can set only one page as the default site's page: now this page is it/index.


Right. The CMSMS' default page has nothing to do with the default pages of this multilingual system.

Cheers,
Marcos

_________________
Marcos Cruz


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri Mar 27, 2009 3:18 pm 
Offline
Forum Members
Forum Members

Joined: Fri Mar 13, 2009 9:06 am
Posts: 10
Ok now it works fine!!!

the problem was here:

\$1:
$languages = array(
  'it' => array('Home', '<span xml:lang="it">Italiano</span>'),
  'en' => array('Home_en', '<span xml:lang="en">English</span>') ) ;


thank you so much :D

paolo


Last edited by Radice on Fri Mar 27, 2009 3:20 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Mon Apr 06, 2009 6:52 am 
Offline
New Member
New Member

Joined: Mon Apr 06, 2009 6:04 am
Posts: 2
alinome,
your approach is great. i'm using it and so far all went well.
Thank you so much for such a simple approach and easy to implement.

But i was wondering, how do i get {news} module in multilingual too using your approach. I can't seem to be able to get around it. I understand little of programming (php/smarty).

FYI, my site only requires 2 language (bilingual) and rely heavily on news module.

Would be so very grateful if you can help out.


Thanks.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Mon Apr 06, 2009 10:12 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
Hi raza,

Glad you find the code useful and easy.

raza \raza:
But i was wondering, how do i get {news} module in multilingual too using your approach. I can't seem to be able to get around it. I understand little of programming (php/smarty).


Some time ago someone asked something similar. Then I tinkered a bit with the news module; I don't remember the details but I think it would require to program a whole "ad hoc" addon, a lot of work. I'm sorry I cannot help about that; I'm not using the news modules in my CMSMS sites. I hope CMSMS will become multingual soon.

Cheers,
Marcos

_________________
Marcos Cruz


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Tue Apr 07, 2009 4:53 am 
Offline
New Member
New Member

Joined: Mon Apr 06, 2009 6:04 am
Posts: 2
alinome.net \alinome.net:
Some time ago someone asked something similar. Then I tinkered a bit with the news module; I don't remember the details but I think it would require to program a whole "ad hoc" addon, a lot of work. I'm sorry I cannot help about that; I'm not using the news modules in my CMSMS sites. I hope CMSMS will become multingual soon.

Cheers,
Marcos


Too bad to hear that..  :-[
i'd have to try and hack it out somehow, or say "no" to my client then.

But anyways, still you've made a good workaround with the multilingual. I like it better than MLE.
Hoping CMSMS will have full  multilingual support soon.

Thanks again Marcos.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Fri May 08, 2009 9:31 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
I received the following doubt:

\$1:
I am trying to get the links where you switch language not to be a list. i have tried to find the specific code line telling it to become a list but can't find it. so i would be glad if you could help me out.

So in shorter terms: Where is the code telling the language links to line up in a list?.


The language menu is a list of links, so it must be coded as a XHTML list. That's the first layer, the "semantic" layer of page making. The second layer is the look: you can change it using styles (CSS). That's the recommend way doing this kind of things. But I'll explain both possible solutions.

1) The CSS solution

First, in your template, surround your language menu tag with a
with a unique id:

\$1:
<div id='langmenu'>
{language_menu show_title=false show_current=false show_default=true show_inactive=true}
</div> <!-- langmenu -->


(The parameters of language_menu are taken from a site of mine, they are not relevant to the example).

Then change the style of the menu in your CSS. This is only an example how to convert the ordinary look of a
    list into a one-line list of elements without separators:

    \$1:
    #langmenu ul {
       background-color: #F0F0F0;
       font-size: 1em;
       line-height: 1em;
       margin: .5em auto;
       padding: .5em;
       list-style: none;
    }

    #langmenu ul li {
       margin:0 1em 0 0;
       display:inline;
       }


    You could create visual separators with this add-on:

    \$1:
    #langmenu ul li+li {
       border-left: 1px dotted blue;
       }


    The possibilities are endless.

    2) The "hard" solution

    If there's some special reason why the CSS solution is not enough and you really need to remove the
      in the code, it's easy too:

      In the language_menu tag look for the line "// Create the menu".

      Then find and remove this line:

      \$1:
      echo '<ul>';


      And this one too (the last one):

      \$1:
      echo '</ul>';


      (Another option is to change the "
        " and "
      " to "

      " and "

      "; then the menu would be into a marked paragraph).

      Between those lines, in the code, there are several occurrences of "
    • " and "
    • "
      . You can change them to "" and "" if you want to keep some CSS control later, or simply remove the first and change the second to "
      "... Endless options, depending of what you need.




      Anyway I recommend the CSS solution: lists must be lists; that improves the page's usability.

      Hope this helps.

      Cheers,
      Marcos

_________________
Marcos Cruz


Last edited by alinome.net on Fri May 08, 2009 9:41 am, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Mon May 11, 2009 8:49 am 
Offline
Forum Members
Forum Members

Joined: Fri Mar 13, 2009 9:06 am
Posts: 10
hi, i have another little problem. i tried to disable tiltle (es: title="About"), but i can't find a solution. can you help me?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Mon May 11, 2009 10:42 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 25, 2007 2:54 pm
Posts: 124
Location: España / Hispanujo / Spain
Radice \Radice:
i tried to disable tiltle (es: title="About"), but i can't find a solution. can you help me?


I'm not sure what you mean. Do you want to remove the link title attribute of the language menu's elements? I think they are added by {cms_selflink}. You can do the following:

In the language_menu tag, find function smarty_cms_selflink and add an empty title attribute:

\$1:
title=''


to the following line of  the function:

\$1:
smarty_tag ("{cms_selflink page=$page" . ( (empty($text)) ? '' : " text='$text'" ) . ' more="' . $more . '"}');


So the result will be the following:

\$1:
smarty_tag ("{cms_selflink title='' page=$page" . ( (empty($text)) ? '' : " text='$text'" ) . ' more="' . $more . '"}');


Then the links will show no title.

Is that what you need?

Cheers,
Marcos

_________________
Marcos Cruz


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Mon May 11, 2009 12:39 pm 
Offline
Forum Members
Forum Members

Joined: Fri Mar 13, 2009 9:06 am
Posts: 10
Yes, that's what i meant. You solved my problem. Thank you again,

paolo


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: One more approach to build a multilingual site with the regular CMSMS
PostPosted: Mon Jul 06, 2009 2:10 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 01, 2007 5:36 pm
Posts: 505
raza \raza:
But i was wondering, how do i get {news} module in multilingual too using your approach. I can't seem to be able to get around it. I understand little of programming (php/smarty).


If question in still alive, I can suggest this way:
- create two news categories: en_news and es_news and fill with your items.
- call news module in this way:
\$1:
{if $page_lang == 'en'}
   {news category="en_news"}
{/if}
{if $page_lang == 'es'}
   {news category="es_news"}
{/if}


or better:
\$1:
{assign var=news_cat value=$page_lang|cat:'_news'}
{news category="$news_cat"}


This can be done in a page or in a template.
Hope it helps.

regards
blast


Last edited by blast2007 on Mon Jul 06, 2009 3:00 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 131 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting