Hi,
don’t know if you’ve solved your problem so, just in case, you’ve an easy way to do that in the templates
[[YAMS? &get=`text` &from=`en::More details||fr::Plus de détails`]]
done!
the only problem with this method is that it won’t allow you to use html tags or quotes without breaking.
To solve this, i’ve imagined a little system based on a snippet and language files, once more, in case it helps...
(edited ’cause i’ve found a lighter way to do this)
i’ve a directory named langs in the assets/snippets/directory (you can put this anywhere you want, just call it with the right path in the coming snippet) in which i’ve two files
lang_fr.php
lang_en.php
these files are set like this, for example lang_fr.php
<?php
$zilang = Array(); //$zilang not to conflict with a potential $lang array elsewhere
$zilang['toto'] = "il est content toto"; //"toto is happy" in lang_en :)
//and so on
now, let’s have a look at our snippet called "langfile"
<?php
$yams = YAMS::GetInstance();
$langId = $yams->GetCurrentLangId();
require( MODX_BASE_PATH . 'assets/snippets/langs/lang_'.$langId.'.php' );
return $zilang[$text];
?>
short and simple isn’t it ?
and where you need one of those words/phrases
[!langfile? &text=`toto`!]
that’s all! you now have your own language files working
Hope it helps
Have swing