I need own translation function in my custom module where i have defined language codes (‘en’,’ja’,’de’….etc)
Now i just wanted to pass word and language code as a parameter and it returns translation of that word according to language code.
I am trying this inside my translation but it doesn’t work it is returning ‘yes’ instead i don’t know why.
$japanese_value = t('yes', array(), array('langcode' => 'ja')); print_r($japanese_value);
And please let me know if there is a better way to do this or any other translation module.