1

It seems that Drupal 7 doesn't provide a function to translate a non-English string to its English equivalent. I'd like to do this for a project I'm working on, but the absence of a reverse-translation function suggests that perhaps I shouldn't. Is there any reason for the absence of a function that translates strings back to English? And how should I achieve this functionality with my project?

1
  • ping -R -c 1 :) Check out my answer please. Feel free to ask questions or add details to your question.
    – kalabro
    Commented Jun 1, 2014 at 12:13

1 Answer 1

2

t() function

By Drupal architecture English is a system built-in language which is used as a source language in code.
t() function allows to translate from system language to any other language. It is simple and expected behavior.

UI

There are UI improvements in Drupal 8: http://hojtsy.hu/blog/2013-aug-20/drupal-8-multilingual-tidbits-12-english-can-now-be-translated

Comment about Drupal 7 "Custom English" and problems with default language:

Using Drupal core alone, this was possible to achieve in Drupal 7 by configuring a "Custom English" language on the site with a language code different from "en", which then allowed you to replace text with your choosing. This quickly gets confusing though because then both the old "en" English language and your new "Custom English" will show up in language selectors, etc. If you disable the "en" English, then your old content saved with that langcode will not display properly. Its a whole can of worms. You may also use String overrides, but if you are using interface translation from core anyway, using one more module for the same task for a specific language is overkill.

i18n features

More complex translation features (like Content translation from core or i18n package) less depend on system language but often depend on default language. Usually you can add content piece in any language and then translate it to English without any problems.

Summary

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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