Quote from: mmjaeger at Jul 08, 2007, 02:39 AM
1. footer links - I have some hard-coded links in the footer of my template - in other menus, ultimateParent works find - what’s the best way to set up the footer - maybe set up a footerChunk per language?
2. What’s the best way to setup the home link that is the welcome page in each language?
3. How do I setup the use of snippets like eform that I’m using as a contact form for instance - instead of just copying the contact-form chunk, is there a way to define and use language variables?
4. last but not least, I’d like to have a language link on each page pointing to the corresponding page in the available languages - what’s the best way to go about this?
finally, I was wondering whether there is a problem in using duplicate alias entries - I was thinking of setting up the whole tree structure for one language incl. alias names and when the structure is finalized just copy it over to a 2nd or 3rd language folder or would I have to change all those alias names and e.g. adding a suffix like contact_en? In this context, how could I e.g. get the document id of a document with the alias="xyz" and languageTV="en"?
RE #1: Taff’s @inherit TV idea sounds great to me (I’ve always used multiple chunks and different templates myself, but I’ve only ever done bilingual sites so far).
RE #2: Check out the subsites/subdomains hacks. Usually I set one language as the default and then switch the home page to another based on the domain name (or subdomain). If you set a cookie to save user preferences, make sure that you can override it by clicking on a different language link.
RE #3: That’s an interesting question (about eForm in particular). I’ve always just used multiple snippets, but that’s obviously not ideal. It shouldn’t be difficult to modify a snippet like eForm to accept the language variable as a snippet parameter, if it’s not already implemented (I’d post in the snippet’s particular thread if not).
RE #4: I tend to use friendly aliases with folders (with each language’s name), which would mean that you could duplicate aliases all you like and just create links to the same alias in the correct language folder. I don’t do it that way myself, however, because I want my URLs to be in the target language as well (for both search engines and humans). So I’ve actually used a TV where you manually enter the docid of the other language’s page and created links based on those. Which is a somewhat tedious thing for administrators to do, and prone to human error, but so far it’s been the best method I’ve come up with. Perhaps a better way would be to use a matching value in some field other than alias (probably a TV) that could be automatically linked (although admins would still need to enter that value). I’d be interested to hear some other ideas as well, since I need to do my first five-language site this month.
I also create a snippet that uses the default content (English) for other language pages if there is no translated content yet and prepends a "Sorry! This page is not yet translated..." message to it.
Although I’ve had to duplicate templates, snippets, chunks, etc. and despite having to manually enter translation docids, I should say that overall I’ve been very happy with this system and so have our clients. It could definitely be improved with a little ingenuity, but it works and is relatively intuitive. It helps that so many MODx snippets are already constructed to be completely modular tools.