Simple multi language for cmsms, have a look here
Posted: Fri Feb 08, 2008 11:43 am
Hi All,
I've added this post here because although it is related to ML it is not about the MLE fork.
After trying out cmsms_mle and getting loads of problems with 404's and XML errors I wondered whether I could create a multi lang site without it. I did, and this is what I've done:
First, plan your site and create your templates. These are from templates I call index and index_fr:
Each template will display pages that you want including a link to the other language.
English tpl: {menu template=navigation items="services,news,contact-us,french"}
French tpl: {menu template=navigation items="services (fr),news (fr),contact-us(fr),english"}
Again the brackets are to show you that the French tpl should include the actual French menu text. The list of nav items are the content aliases which you'll make next.
Create your content like this. I've just used (fr) to denote that these words would actually be in French so your menu structure would be a mirror of the English but in your language.
Home
Home>Information
Home>Services
Home>Contact
Home(fr)
Home(fr)>Information(fr)
Home(fr)>Services(fr)
Home(fr)>Contact(fr)
You don't have to categorise you content if you don't want but it is easy on the eye and organised.
When you're adding your content make sure that you set the menu text to that of the language you're using and (IMPORTANT) set the page alias to the name of your language i.e. english, french or whatever. Also select the template you'd like to use. For english pages use the English tpl and for French pages use French tpl or whatever you need.
So your templates are setup to display the French menu items and a link to 'english' when using the French template and vis versa for the English menu items.
Then in your menu manager look for the code which displays the menu items. It'll look like this:
{$node->menutext}
and change 'menutext' to 'alias'. This is to ensure that the menu items look right i.e. home, information, contact us, french. The important one was 'french' which is set in home's alias otherwise it'd say home, information, contact us, home(fr) (this would really mean home for the french pages). So doing this in the menuamanager template that you're using sorts this out.
And that's it!
I'm pretty sure there are other/better ways but I think this is a great way for smallish sites with a few pages of info. It's not as impressive as cmsms_mle and there are no flags or anything like that but I'm sure that could be done too.
Having said all that I'd love to know why I'm getting intermittent 404 errors and XML errors in IE7 with cmsms_mle though! But this was a good workaround for the client I'm working with and got me out of a jam very quickly!
Sarah
I've added this post here because although it is related to ML it is not about the MLE fork.
After trying out cmsms_mle and getting loads of problems with 404's and XML errors I wondered whether I could create a multi lang site without it. I did, and this is what I've done:
First, plan your site and create your templates. These are from templates I call index and index_fr:
Each template will display pages that you want including a link to the other language.
English tpl: {menu template=navigation items="services,news,contact-us,french"}
French tpl: {menu template=navigation items="services (fr),news (fr),contact-us(fr),english"}
Again the brackets are to show you that the French tpl should include the actual French menu text. The list of nav items are the content aliases which you'll make next.
Create your content like this. I've just used (fr) to denote that these words would actually be in French so your menu structure would be a mirror of the English but in your language.
Home
Home>Information
Home>Services
Home>Contact
Home(fr)
Home(fr)>Information(fr)
Home(fr)>Services(fr)
Home(fr)>Contact(fr)
You don't have to categorise you content if you don't want but it is easy on the eye and organised.
When you're adding your content make sure that you set the menu text to that of the language you're using and (IMPORTANT) set the page alias to the name of your language i.e. english, french or whatever. Also select the template you'd like to use. For english pages use the English tpl and for French pages use French tpl or whatever you need.
So your templates are setup to display the French menu items and a link to 'english' when using the French template and vis versa for the English menu items.
Then in your menu manager look for the code which displays the menu items. It'll look like this:
{$node->menutext}
and change 'menutext' to 'alias'. This is to ensure that the menu items look right i.e. home, information, contact us, french. The important one was 'french' which is set in home's alias otherwise it'd say home, information, contact us, home(fr) (this would really mean home for the french pages). So doing this in the menuamanager template that you're using sorts this out.
And that's it!
I'm pretty sure there are other/better ways but I think this is a great way for smallish sites with a few pages of info. It's not as impressive as cmsms_mle and there are no flags or anything like that but I'm sure that could be done too.
Having said all that I'd love to know why I'm getting intermittent 404 errors and XML errors in IE7 with cmsms_mle though! But this was a good workaround for the client I'm working with and got me out of a jam very quickly!
Sarah