I know I can translate to current website language with t() function, but I need translate to specified (not current) language, my site has three languages and I want get English of some of the worlds in some template files when current language is French. How can I get translate of string according to specified language instead of current language?


According to t() documentation you can pass specified language it t() function.

As Example below code return French translate of language string without consider current site language.

  $fr_value = t('language', array(), array('langcode' => 'fr'));

Not the answer you're looking for? Browse other questions tagged or ask your own question.