MSM Multilingual with localised url titles - possible?
Posted: 08 February 2010 10:05 AM   [ Ignore ]  
Research Assistant
RankRankRank
Total Posts:  357
Joined  09-18-2007

I recently built an EE site in 3 languages using Levi’s extension and this worked great. The URL syntax is domain.com/en/page-title, domain.com/fr/page-title, etc.

Everyone was very happy with the site apart from the fact that this set up it does not allow the “page-title” segment of the url to be in the local language. AFAIK there is only 1 url title that can be used per entry.

This is not that big of a deal if it wasn’t for the fact we’re now being asked to build several multilingual sites running off one CMS instance (so MSM) for a new client. But because of the above mentioned issue we’re leaning toward using Drupal instead of EE.

I’d much rather use EE. Is such a set up possible, perhaps through dynamic .htaccess rules?

 Signature 

Attended EECI2009

Profile
 
 
Posted: 08 February 2010 11:44 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  951
Joined  06-24-2007

One way would be to use the entry_if URL format and add a custom field for the language specific title

ie: domain.com/fr/251/custom_page_title

 Signature 

Rob - http://www.blue-dreamer.co.uk/ - because I like blue!
EE Pro Network member

Profile
 
 
Posted: 08 February 2010 11:46 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  357
Joined  09-18-2007

Thanks, will check that out.

(You meant entry_id format right)?

 Signature 

Attended EECI2009

Profile
 
 
Posted: 08 February 2010 11:50 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  30
Joined  11-04-2006

It sounds like you have used one entry per page with language specific fields, which is not the best way to go if you want SEO friendly language URL titles or different content admins for different languages.

There are several ways of implementing multi-lingual sites with or without MSM, most of which use unique URL titles for each language and this is my preferred method.

You certainly don’t need to lean towards Drupal for this.

Profile
 
 
Posted: 08 February 2010 11:52 AM   [ Ignore ]   [ # 4 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  951
Joined  06-24-2007
stef25 - 08 February 2010 11:46 AM

Thanks, will check that out.

(You meant entry_id format right)?

Yep the entry_id_path - http://expressionengine.com/docs/modules/weblog/variables.html#var_entry_id_path

Something like this…

<a href="{entry_id_path='template_group/template'}{custom_title_field}">my entry</a>
 Signature 

Rob - http://www.blue-dreamer.co.uk/ - because I like blue!
EE Pro Network member

Profile
 
 
Posted: 08 February 2010 11:52 AM   [ Ignore ]   [ # 5 ]  
Research Assistant
RankRankRank
Total Posts:  357
Joined  09-18-2007

I want to avoid Drupal as much as I can, trust me smile

There are several ways of implementing multi-lingual sites with or without MSM, most of which use unique URL titles for each language and this is my preferred method.

Could you provide some examples (no code)? The previous site was my first multilingual EE site and I was in a hurry so I just went with the first solution that worked. The lack of localized url titles in this site was no biggie.

 Signature 

Attended EECI2009

Profile
 
 
Posted: 08 February 2010 01:09 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  30
Joined  11-04-2006

It’s easy with MSM. Without MSM you can still store your content as one entry per language and pull out all content for the current site’s language by specifying a language category in your exp tags. Here are some ideas…

Basically, assign each entry a language category. Then…

Language specific domains/subdomains:
If you plan to use language-specific domains, set each domain’s language category id in path.php which your .htaccess rules will call, for example:

/de/path.php:
$global_vars = array(‘lang’ => ‘de’, ‘lang_cat’ => ‘10’)

Now you have the globals {lang} and {lang_cat} available to use in your templates and most tags, which makes it easy to pull out all entries for the current domain’s language, and reference lang specific template elements, assets, etc.

Single domain:
If you’re using one domain with a language segment in the URL, the first segment references a template group which then sets an appropriate language category in that group’s templates (or calls a particular channel/weblog if you need admin separation) to pull in the content. There might be some duplication of root templates here, but it can actually be quite useful for making your templates more language aware if needed.

Admin separation:
If you want to separate access so admins can only see their own language content, MSM is the most convenient. Without MSM, you will probably need to use one language per channel/weblog.

In all cases, you can still use common headers, embeds, etc. and by using the {lang} variable you can call language specific embeds or CSS, useful if there are some UI differences, such as language specific graphic elements.

There are a couple of solutions described in the Wiki and two threads here and here might also help with this.

There’s a great deal of flexibility in the options at your disposal and it’s easier than is sounds…

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120558 Total Logged-in Users: 62
Total Topics: 126604 Total Anonymous Users: 33
Total Replies: 665582 Total Guests: 337
Total Posts: 792186    
Members ( View Memberlist )