Posts Tagged with translation

Displaying 1-7 of 7 results.
Resolved: Yii translation not working
posted by admin on April 12, 2016
My Yii app translation code is stop working

<?php echo Yii::t('t', 'Added'); ?>


My Messages folder and file:

- messages
- ru
- t.php
Read more
Resolved: Yii 1.1 How to change default language
posted by admin on April 5, 2016
I want to change my website default language and read translation file by default to my website language.Read more
Resolved: jQuery validation translate default error message js to russian на русском
posted by admin on March 18, 2016
jQuery validation, нужен гитовый и правилььный перевод на русский язык.

jQuery.extend(jQuery.validator.messages, {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
accept: "Please enter a value with a valid extension.",
maxlength: jQuery.validator.format("Please enter no more than {0} characters."),
minlength: jQuery.validator.format("Please enter at least {0} characters."),
rangelength: jQuery.validator.format("Please enter a value between {0} and {1} characters long."),
range: jQuery.validator.format("Please enter a value between {0} and {1}."),
max: jQuery.validator.format("Please enter a value less than or equal to {0}."),
min: jQuery.validator.format("Please enter a value greater than or equal to {0}.")
});
Read more
Resolved: jQuery validation change and translate default error message
posted by admin on March 18, 2016
I use jQuery form Validation plugin, and I want to translate my error messages, but not in core js file, in main jsRead more
Resolved: Wordpress call translation from po pot files in theme
posted by admin on March 16, 2016
I have po mo translation files, and I want to call my translation and use in my theme.
My theme name mytheme
I want to make my theme multilanguage, and make it by right way.
I created directory

mytheme/languages


I created my po mo files

mytheme/languages/ru_RU.po
mytheme/languages/ru_RU.mo


In wp-config.php file I add

define ('WPLANG', 'ru_RU');


In my header.php i call translation function

<?php echo __("Videos", "mytheme"); ?>


But it is not working, not translating.Read more
Wiki: Yii 1.1 Add Yii Translation to website, multilanguage functionalitywiki
posted by admin on March 5, 2016
1. Step
Create Messages Folder in directory protected

2. Step
Create your multilanguage translation folder in directory Messages, for example hy, ru etc.

3. Step
Create files translation.php in your translation folders, which you created hy, ru

4. Step
Edit your translation.php files, and open massive like

<?php
/* ру */
return array(
'Username'=>'Имя пользователя',
'Admin'=>'Админ'
)


5. Step
Call translation function on your project

Yii::t('translation', 'Username')//translation - translation.php, 'Username' - the word, which you want to translate


* You can have many translation to same word

You can create for example app.php on your translation folders 'hy', 'ru' etc., and you can call same word by another translation.

6. Step
You can Create files app.php in your translation folders, which you created hy, ru

7. Step
Edit your app.php files, and open massive like

<?php
/* ру */
return array(
'Username'=>'Логин',
'Admin'=>'Администратор'
)


8. Step
Call translation function on your project by different translation

Yii::t('translation', 'Username')//translation - translation.php, 'Username' - the word, which you want to translate

or

Yii::t('app', 'Username')//app - app.php, 'Username' - the word, which you want to translate
Read more
Resolved: Yii 1.1 How to change home name breadcrumbs to another or multilanguage
posted by admin on March 5, 2016
In main layout i have this code

<?php if(isset($this->breadcrumbs)):?>
<?php $this->widget('zii.widgets.CBreadcrumbs', array(
'links'=>$this->breadcrumbs,
)); ?><!-- breadcrumbs -->
<?php endif ?>


I want to change the word Home and include multilanguage outputRead more