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?

put on hold as too broad by kiamlaluno 12 hours ago

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


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.