best practice question: where should i put translations for a widget? (my own widget)
Page 1 of 1
where should i put translations for a widget?
#2
Posted 29 April 2010 - 01:42 PM
See here: http://www.yiiframew...age-translation
Quote
Starting from version 1.0.10, when using CPhpMessageSource to manage message source, messages for an extension class (e.g. a widget, a module) can be specially managed and used. In particular, if a message belongs to an extension whose class name is Xyz, then the message category can be specifiedin the format of Xyz.categoryName. The corresponding message file will be assumed to be BasePath/messages/LanguageID/categoryName.php, where BasePath refers to the directory that contains the extension class file. And when using Yii::t() to translate an extension message, the following format should be used, instead:
Yii::t('Xyz.categoryName', 'message to be translated')Share this topic:
Page 1 of 1

Help












