Jul 05, 2009, 09:23 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: Multilingual site... again!!  (Read 372 times)
0 Members and 1 Guest are viewing this topic.
GinerBosk
Member
**
Posts: 51


Navegant


WWW
« on: Aug 21, 2008, 01:15 PM »

Hello.

I know this topic has been met many times in this forum (and not only English, but in different languages).

August 2008. My question is:

With the current MODx stable version 0.9.6.1p2, which is THE solution for creating and managing a multilingual site?

I mean, a solution that:

- Doesn't come into conflict with any classical snippet, etc.

- Uses cookies so that "the system" is able to "remember" your preferred language.

- When you jump from any page to another language (by clicking a link with the name of the language), you are redirected to the same page (NOT THE HOME PAGE) but shown in the language you have just chosen. If such a page doesn't exist (the translation isn't ready yet, or simply there is not correspondence for the former page), it can be rendered in another language, or a standard message can be shown instead...

If you think I should read the forum carefully, please, tell me, but also tell me which is, in your experience, the definite solution, so far.

Thank you!
Logged

GinerBosk   Smiley

If you can dream it, you can do it.
—Walt Disney
ZAP
Testers
*
Posts: 1,583



« Reply #1 on: Aug 21, 2008, 02:25 PM »

I don't know that there is one best solution for creating multilingual sites. There are some trade-offs to be made among the different techniques, and which method you prefer may depend upon what's most important to you. I've only done bilingual sites so far, but I've been happy with my method for creating those.

Basically I create a subfolder in the document tree for each language (actually I create the whole site in one language first and then just duplicate that folder so that I don't have to manually recreate all the pages). I use a TV called otherLanguageDocumentID to store the docID of the page in the other language, and I create links directly to those other pages using this TV (for multi-lingual sites you could have several TVs). This is probably the biggest inconvenience I've found in using my method: You need to manually enter the docID for the translated pages.

I have a snippet in each language's template that displays content if there is any and if not displays a message explaining that the page isn't available in that language and grabs the content from the otherLanguageDocumentID instead (all pages on our sites exist in English, so this is easy). I use a plugin to forward people who use the Spanish domain name (with no specific page) to the Spanish home page and to set a cookie for language preference (I've posted this code in the forums before; it's based on someone else's solution). I haven't had much trouble with the standard snippets working with this method (e.g., Ditto, WayFinder, AjaxSearch).

And I think that's it. It works fine for me, and I like it better than the other methods I've tried or seen described. Personally I prefer to have separate pages for different languages instead of loading language content from TVs, and doing so makes sure that everything is indexed as expected by other standard snippets.
Logged

"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bug reports  | info you should include with your post | commercial support options
dev_cw
Testers
*
Posts: 4,025



WWW
« Reply #2 on: Aug 21, 2008, 03:50 PM »

I use the one container for each language solution as well, but it fails when you have single files that are shared between two languages. I have used a cookie/session based solution for this but it is not ideal. And having single documents with TVs for each language is no good for seo since all the languages will have the same urls which will confuse the search engines and most likely only one language will be crawled.
Logged

Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

Something is happening here, but you don't know what it is.
Do you, Mr. Jones?  -  [bob dylan]
ZAP
Testers
*
Posts: 1,583



« Reply #3 on: Aug 21, 2008, 04:07 PM »

Oh I forgot that I also make my 404 page bilingual (error message in both languages with links to search, etc.), since some people might get that without ever having set a language cookie.
Logged

"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bug reports  | info you should include with your post | commercial support options
Sylvaticus
Sr. Member
****
Posts: 428


I think, therefor I am. But what I am, and why...?


WWW
« Reply #4 on: Aug 21, 2008, 04:40 PM »

I use this (http://wiki.modxcms.com/index.php/Make_Multi_Lingual_Site) method, and it works well for me on this (svalbardflora.net) site.  Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!