#How to use
Each context setting is (name,key) => val (comment):
(Base URL, base_url) => / (or /en/ for english,etc).
(Culture key, cultureKey) => ru (or en for english,etc).
(Site start, site_start) => 1 (it's a ID of home document, like 404 eror page id)
(Site URL, site_url) => http://example.com/ (or http://example.com/en/ for english. Be careful, should match base_url).
(error_page,error_page) => 2 (it's a ID of 404 error page)
##Create new namespace 'YOU_NAMESPACE' Core path should be {core_path}components/YOU_NAMESPACE/
Create file(s) {core_path}components/YOU_NAMESPACE/lexicon/{{cultureKey}}/default.inc.php
<?php
$_lang['download'] = 'Download';
...
For other languages array key should be the same, but array value may be transtaled. For example for japanese:
<?php
$_lang['download'] = 'ダウンロード';
...
##Translate all nessesary words ##Create chunk named "translate"
[[%[[+key]]? &topic=`default` &namespace=`YOU_NAMESPACE` &language=[[++cultureKey]]]]
[[$translate?key=`download`]]
##Install Babel http://rtfm.modx.com/extras/revo/babel
##Create new plugin
See gateway.php above
##Get linked resources You have some page id on russian context and you want to get this page on another content (let say in 'English' content:
[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`[[*id]]`]]
http://rtfm.modx.com/extras/revo/babel/babel.babeltranslation
Lets create a chunk 'gti' (Get Translated Id)
[[BabelTranslation? &contextKey=`[[*context_key]]` &resourceId=`[[+id]]`]]
How we can use it as:
[[$gti?id=`10`]]