One more approach to build a multilingual site with the regular CMSMS
Re: One more approach to build a multilingual site with the regular CMSMS
There is no difference with or without quotes.
always the same result :
other_languages=
other_language=
DEBUG:
language_codes=Array ( [0] => )
language_pages=Array ( [0] => )
language_versions=Array ( [] => )
always the same result :
other_languages=
other_language=
DEBUG:
language_codes=Array ( [0] => )
language_pages=Array ( [0] => )
language_versions=Array ( [] => )
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
- Location: España / Hispanujo / Spain
Re: One more approach to build a multilingual site with the regular CMSMS
I thought something. I think the content block
must be before {language_menu} in the template, because of the "assign" parameter. Check that.
Code: Select all
{content block='Other languages' oneline='true' assign='other_languages' wysiwyg='false'}
Marcos Cruz
Re: One more approach to build a multilingual site with the regular CMSMS
YES !!!
it works well now!
thanks a lot of time dedicated to resolve my problem.
Just a last question:
I prefer using flags instead of the name of language, but how to have no flea located in front of the flag and so that it is not underlined?
I think i have found the solution alone
I just remove all line
echo '';
echo '';
echo '';
echo '';
echo '';
in language_menu
for the underline I will modify my stylesheet...
it works well now!
thanks a lot of time dedicated to resolve my problem.
Just a last question:
I prefer using flags instead of the name of language, but how to have no flea located in front of the flag and so that it is not underlined?
I think i have found the solution alone
I just remove all line
echo '';
echo '';
echo '';
echo '';
echo '';
in language_menu
for the underline I will modify my stylesheet...
Last edited by ZIGRIB on Fri May 23, 2008 8:24 am, edited 1 time in total.
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
- Location: España / Hispanujo / Spain
Re: One more approach to build a multilingual site with the regular CMSMS
Good! Don't forget to comment out again all the interesting debug linesZIGRIB wrote: it works well now!
I changed the implementation guide to clearly explain this point.
That depends on the CSS (cascade style sheets). You said you use this code for the menu:ZIGRIB wrote: how to have no flea located in front of the flag and so that it is not underlined?
Code: Select all
<div id='langmenu'>{language_menu}</div>
Code: Select all
#langmenu ul {
padding: 0;
margin: 0;
list-style: none; /* no fleas */
}
#langmenu ul li {
margin:0.1em; /* gap between menu options */
}
#langmenu ul li a {
text-decoration:none; /* no underline */
}
Good luck. Please post a link to your site when it's ready.
Last edited by alinome.net on Fri May 23, 2008 8:26 am, edited 1 time in total.
Marcos Cruz
Re: One more approach to build a multilingual site with the regular CMSMS
Ok I think your solution is better
Thanks for link I'll read it with attention.
When the site will ready i'll post the link here.
Thanks for link I'll read it with attention.
When the site will ready i'll post the link here.
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
- Location: España / Hispanujo / Spain
Re: One more approach to build a multilingual site with the regular CMSMS
Interesting solution Well, in your case it works fine because there's only two languages and the current one is not listed in the language menu... So in practice the "list" always has only one item, so you can delete all the list markup as you did. Nevertheless I prefer to use CSS for that kind of things and keep the XHTML untoched.ZIGRIB wrote: I just remove all line
echo '';
echo '';
echo '';
echo '';
echo '';
in language_menu
Marcos Cruz
Re: One more approach to build a multilingual site with the regular CMSMS
Hi!
I'm using your method for a bilingual site. I have two questions, though:
1. I would like to put a delimiter between the language buttons in the menu. (I don't use the titles, only buttons.) Where in the code do I put it, so it only goes between the buttons, and not before the first item, or behind the last?
2. What do I do when I add a photo album? There is no content block to add other languages there? Is this simply not supported, or something someone is working on?
Thanks in advance!
I'm using your method for a bilingual site. I have two questions, though:
1. I would like to put a delimiter between the language buttons in the menu. (I don't use the titles, only buttons.) Where in the code do I put it, so it only goes between the buttons, and not before the first item, or behind the last?
2. What do I do when I add a photo album? There is no content block to add other languages there? Is this simply not supported, or something someone is working on?
Thanks in advance!
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
- Location: España / Hispanujo / Spain
Re: One more approach to build a multilingual site with the regular CMSMS
The solution by Karolis is good. But I always prefer to avoid "hard" delimiters in lists, because of usability. I suggest you to use CSS instead:sirphuzz wrote: 1. I would like to put a delimiter between the language buttons in the menu. (I don't use the titles, only buttons.) Where in the code do I put it, so it only goes between the buttons, and not before the first item, or behind the last?
Code: Select all
#langmenu ul {
margin: 0;
padding: 0;
display: inline;
}
#langmenu ul li {
margin: 0;
padding: 0 .5em 0 0;
display: inline;
list-style: none;
}
#langmenu ul li+li {
padding-left: .5em;
border-left: 1px solid grey; /* vertical line to separate buttons */
}
I don't understand what you mean. I never used a photo album with CMSMS. I think you have to do the same: one album for every language, as regular pages. But if the photo descriptions are stored in the database then there's no easy way to make them bilingual. Is that your problem?sirphuzz wrote: 2. What do I do when I add a photo album? There is no content block to add other languages there?
Cheers,
Marcos
Last edited by alinome.net on Thu Aug 07, 2008 5:00 pm, edited 1 time in total.
Marcos Cruz
Re: One more approach to build a multilingual site with the regular CMSMS
Hi!
Thank you both for fast and good answers.
Right now my site is in some kind of maintenence (thank you, one.com!) so I can't try your suggestions, but I'm pretty sure the delimiters will work, I also like to use css when possible.
My second questions was how to make the other content types bilingual. Right now, I only get the content block to add other languages when I create a "Content" page.
I worked around the photoalbum by creating a content page and then manually adding the cms_module tag for the album module. This worked fine, but now I wanted to add a catalog.
So I created a category page, and a item page, and I can't make a content block for these types.
I tried adding the content block tag to the category template, but it didn't work.
What I want is to be able to create my category pages and item pages and use the same system to make them bilingual.
Is there any way to add the correct code that assigns the "en=alias;sv=alias" string to the $other_languages variable, in these content types? Can it be placed in the metadata field?
I would be really grateful if this could be made to work.
Thank you both for fast and good answers.
Right now my site is in some kind of maintenence (thank you, one.com!) so I can't try your suggestions, but I'm pretty sure the delimiters will work, I also like to use css when possible.
My second questions was how to make the other content types bilingual. Right now, I only get the content block to add other languages when I create a "Content" page.
I worked around the photoalbum by creating a content page and then manually adding the cms_module tag for the album module. This worked fine, but now I wanted to add a catalog.
So I created a category page, and a item page, and I can't make a content block for these types.
I tried adding the content block tag to the category template, but it didn't work.
What I want is to be able to create my category pages and item pages and use the same system to make them bilingual.
Is there any way to add the correct code that assigns the "en=alias;sv=alias" string to the $other_languages variable, in these content types? Can it be placed in the metadata field?
I would be really grateful if this could be made to work.
Re: One more approach to build a multilingual site with the regular CMSMS
HI, I just want to thank the developers that created this approach to multilingual sites. I started to implement it on my site and it works like charm. Thanks a lot guys!!!
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
- Location: España / Hispanujo / Spain
Re: One more approach to build a multilingual site with the regular CMSMS
Happy that it's useful for you. Maybe you can post a link to your page after implementing it.danilski wrote: HI, I just want to thank the developers that created this approach to multilingual sites. I started to implement it on my site and it works like charm. Thanks a lot guys!!!
Regards,
Marcos
Marcos Cruz
Re: One more approach to build a multilingual site with the regular CMSMS
Hi,
thanks for nice little multilingual fix. Good job
I'm having one issue with an extra quote around my language links: LINK REMOVED
How do i get rid of them?
Cheers
Jon
thanks for nice little multilingual fix. Good job
I'm having one issue with an extra quote around my language links: LINK REMOVED
How do i get rid of them?
Cheers
Jon
Last edited by volcanoboy on Wed Nov 05, 2008 7:55 am, edited 1 time in total.
- alinome.net
- Forum Members
- Posts: 124
- Joined: Thu Jan 25, 2007 2:54 pm
- Location: España / Hispanujo / Spain
Re: One more approach to build a multilingual site with the regular CMSMS
It depends on why they appear [:-)]. This is your page's XHTML:volcanoboy wrote: I'm having one issue with an extra quote around my language links: [...]
How do i get rid of them?
Code: Select all
<ul>
<li><a href="http://www.handelshusetmartinsen.no/huvudsida-se" title="Huvudsida" hreflang='se'>'<img xml:lang='se' src='/uploads/images/sitePics/se.gif' alt='Svenska' />'</a></li>
<li><a href="http://www.handelshusetmartinsen.no/home-en" title="Home" hreflang='en'>'<img xml:lang='en' src='/uploads/images/sitePics/gb.gif' alt='English' />'</a></li>
</ul>
Cheers,
Marcos
Last edited by alinome.net on Wed Nov 05, 2008 8:55 am, edited 1 time in total.
Marcos Cruz
Re: One more approach to build a multilingual site with the regular CMSMS
Hi marcos,
I copied the code from your example:
I copied the code from your example:
Code: Select all
$languages = array(
"no" => array("Hovedside-no", "<img xml:lang='no' src='/uploads/images/sitePics/no.gif' alt='Norsk' />"),
"se" => array("huvudsida-se", "<img xml:lang='se' src='/uploads/images/sitePics/se.gif' alt='Svenska' />"),
"en" => array("home-en", "<img xml:lang='en' src='/uploads/images/sitePics/gb.gif' alt='English' />") );
Re: One more approach to build a multilingual site with the regular CMSMS
did you have a chance to look at my code?
Cheers
Cheers