Well, Yii:t()… it’s work fine! Superfine 
In my dictionary ‘dic’ (messages/en/dic.php) has written something like this:
<?php
return array (
'key1' => 'value1',
'key2' => 'value2',
);
Now i’ve to do inverse operation: i’ve got ‘value1’.
Can i get ‘key1’ using same (‘dic’) dictionary?
ivica
(Ivica Nedeljkovic)
2
You can use php method array_search(http://php.net/manual/en/function.array-search.php), it will return you key, which is value you are looking for.
Also you can override Yii::t method, or write new method, in class that extends YiiBase class, or just write new class, depending on your needs.
problem is how to get this array…
Is digging to Yii::app()->messages in right direction? 
Pandoras
(Zooi)
4
Easy one I think:
I have two functions in my module:
[Situation]
Module name: MyModule
Message file: messages
Source language: English
Target language: Dutch
[Functions]
public static function t($str=’’,$params=array(),$dic=‘messages’) {
return Yii::t("MyModule.".$dic, $str, $params);
}
public static function t_inv($str=’’,$params=array(),$dic=‘messages’) {
$source = Yii::app()->sourceLanguage;
$target = Yii::app()->language;
return Yii::t("MyModule.".$dic, $str, $params,$target,$source);
}
So if you want to translate say, ‘Blue’ into Dutch (‘Blauw’), you call t. If you want to translate the Dutch word back into English, you call t_inv.
echo Yii::app()->getModule(‘MyModule’)->t(‘Blue’); will produce ‘Blauw’ on the Dutch version of the website.
Yii::app()->getModule(‘MyModule’)->t_inv(‘Blauw’) will produce ‘Blue’ on the Dutch version of the website.
So to cut things short, you only need to swap the source and the target on the original Yii:t call.
this solution supposes just two dictionary files
it works but it’s not exactly what i need 
i don’t need translation
I’ve to get key of message by it’s value array
cause it’s key for database table
Hey, try to use the array_flip php function.
What does it do?
keys become values and values become keys…
so, all you have to do is to create the file that returns the "inverse" array as
inverseDic.php
$invArray = require('dic.php');
return array_flip($invArray);
Not tested, just a thought
Hope this helps!

Not enough perfect code but has the place to be 
I’ve tried to find Yii’s method to get this array.
it works, of couse! 