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) (Created page with "Create /amember/application/configs/site.php with this code: <source> //set up array of translataions $translations_ru = array( 'one' => 'Один', 'two' => 'Два' ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 locale

//add your new translations
$tr->addTranslation(array(
    'adapter' => 'array',
    'content' => $translations_ru,
    'locale' => 'ru_RU',
));

//restore locale to previous state
$tr->setLocale($locale);