Talk:Make Multi Lingual Site

From MODx Wiki

Jump to: navigation, search

Contents

Improvement proposal: check if the document in the target language is published...

As described, the Languages snippet creates links to other languages even if these are unpublished, which obviously drives MODx crazy when links are clicked. So we have to check if the document in the target language is published before generating the corresponding link. Do as follows:

After the line:
list($lang, $targetid) = explode("=", $entries[$e]);

insert the lines:
$pageInfo = $modx->getPageInfo($targetid,1,'published');
if ($pageInfo['published'] == 1) {

And after the line:
$output .= '<a href="'.$modx->makeUrl($targetid).'">'.$image.'</a>';

insert the closing bracket:
}

--Nicochto 07:52, 8 June 2009 (PDT)


It rocks ! thanks !

(i hope this is the right palce to leave a comment... sorry if not)

Internationalization best practices

This is an excellent resource, thanks!

I want to note that country codes and flags are often inappropriate for multi-lingual sites. You need to be careful and consider who your target "markets" are. If indeed the site is for Spanish speakers in Spain, then Spain's country code and flag icon might be appropriate. But if you intend for the site to be read by people in multiple countries, in Spanish (national variation of language aside), then a Spanish or Mexican flag or anything else is inappropriate. The language's name in its own language is preferable in this case, EspaƱol, for instance. French and Spanish are the most common examples of this in Western languages. Also, some language markets are internal to a country. Site content might be for people in the US, but translated into Spanish and Traditional Chinese. Country flags would be inappropriate there as well.

Correspondingly, 2-letter country codes may make less semantic sense than ISO 639-3 three-letter language codes.

Just 2 cents. :)

the Wayfinder integration

I followed the tutorial step by step and I have a dual language site up based on it; Reading the UltimateParent docs I would say that startID=2 is correct too, but in order for the menu to work I had to specify startId=1 in the wayfinder call with the same exact nesting from root level as described in the tutorial (?!?!?). --Lukwe 10:59, 26 March 2009 (PDT)

Setup document Tree

Great stuff & works but I am having problems with the redirect probably because this page is a little unclear for a first time user. There seems to be some problems with the Setup document Tree. The start page logically should always redirect. However the redirect to the English page this works when first loaded, but when start is clicked in the menu or the Modx logo is clicked a few times the start page is shown - this should always redirect right? Also please explain all the steps for a first time user, some of us want to use modx because we googled this page first, for example I am a multi language CMS user, but have never used Modx.

Personal tools