About

YAMS: A highly configurable multilingual solution that doesn't require the user to maintain multiple document trees and which allows the user to work with existing document templates.

Author: PMS

Version: GetVersion(); ?> for testing. Check for the latest version in the MODx Add-Ons repository.

Copyright (and example site): Nashi Power 2009

Licence: GPL v3

Forums: A list of planned developments for YAMS is maintained in the MODx Forums support thread.

New in this version:

Description:

YAMS allows users to define language groups and specify certain templates as multilingual. All documents associated with those templates are then accessible in multiple languages via different URLs. The different language versions can be distinguished by root folder name or by server name. Unlike other multilingual solutions, it is NOT necessary to manage multiple document trees with YAMS. Instead, all content for all languages is stored in template variables in the multilingual documents. YAMS has a ManagerManager extension that will organise the template variables for different languages onto different tabs. YAMS is also capable of creating and managing the multilingual template variables automatically. Whether or not a template is multilingual can be configured simply via the module interface.

Multi-language content for the main document variables (pagetitle, longtitle, description, introtext, menutitle, content) is handled automatically and transparently and is subject to normal MODx caching. No special syntax is required for these document variables. For example, use [*content*] and the correct language content will appear.

In addition, YAMS provides a range of placeholders which provide access to the language tag (for use in lang="" or xml:lang=""), the language direction (for use in dir=""), language name and which allow the insertion of multilingual URLs for the current or any other document. These can be used throughout the site, including in snippet templates.

More advanced functionality is available via the YAMS snippet call. For example, via the snippet call it is possible to repeat content over multiple languages using templates. It is also possible to generate language lists or drop-down boxes in order to change language.

Since snippets are generally responsible for parsing the placeholders in templates supplied to them, like [+pagetitle+] for example, they wont automatically know to insert the correct multilingual content. For Ditto I have overcome this by writing an extender which fixes this issue. For the templates of other snippets it is possible to overcome this problem by replacing these placeholders by special YAMS snippet calls, eg:
[[YAMS? &get=`content` &from=`pagetitle` &docid=`[+id+]`]]
I have provided YAMS compatible default templates for Wayfinder which already include the appropriate YAMS snippet calls.

As of version 1.0.3, YAMS *should be* fully compatible with EasyLingual. See the Setup tab for instructions on how to migrate a site from EasyLingual to YAMS.

YAMS has been developed on MODx Evolution v0.9.6.3 and with the latest version of PHP (5.2.6-3). I haven't made any effort as yet to make it backwards compatible with older versions of either.

Credits: The language icons used in the language select drop down are from Language Icon, released under the Attribution-Share Alike 3.0 Unported license. Thanks to @MadeMyDay for having the courage to be one of the first guinea pigs!