How to translate options in additional fields and text added with customizations

From aMember Pro Documentation
Revision as of 02:29, 19 November 2012 by Caesar (Talk | contribs)

Jump to: navigation, search

Create /amember/application/configs/site.php with this code:

//set up array of translataions
$translations_ru = array(
    'one' => 'Один',
    'two' => 'Два'
);
 
//get global translate object
$tr = Zend_Registry::get('Zend_Translate');
$locale = $tr->getLocale(); //save current active locale
 
//add your new translations
$tr->addTranslation(array(
    'adapter' => 'array',
    'content' => $translations_ru,
    'locale' => 'ru_RU',
));
 
//restore locale to previous state
$tr->setLocale($locale);