6

I have a multilingual website with five languages. Because I wanted to extensively customize Drupal's built-in English, I also created a custom language, "U.S. English." I then disabled the built-in Drupal English; the site now uses my custom U.S. English as the default language.

However, I'm confused about which language I should select to be the "Source language" for string translations on the i18n module's admin/config/regional/i18n/strings page. Should I select my custom "U.S. English" or the built-in Drupal English? How does the default language affect string translations?

EDIT: Please note that I am asking about the i18n module's "Source language" for string translations, not the site's default language. Clearly, I need to set the default language of the site on admin/config/regional/language to my custom U.S. English; if I do not, users of the site will not see it. The "Source language" for string translations (at admin/config/regional/i18n/strings) is separate from the default language, and I don't understand whether I should set it to my custom language or the Drupal default.

0

2 Answers 2

4
+50

I18N is a beast of a module. I will try to answer this but have no I18N setup on hand, so this is from memory.

As you have probably realised, depending on how things are configured the default language is normally used as fallback when translations are not available. So, keeping this in mind, you would use your U.S English to translate/modify the entries you want, and set it as default. Source language would be set to the original English.

It used to be one would need to export and re-import translations but that is not the case anymore.

There is a warning to heed, ripped from http://drupal.org/node/1279668 (good reference on your topic btw):

In contrast to Drupal's standard localization system, which always translates from English, strings will be translated from the source language. By default the source language is the site's default language, so changing the default language could break these translations. You can set which language is used as the source language via Administration > Configuration > Regional and language > Multilingual settings > Strings.

As this message states clearly things may break along the way, backing up your data is very important while you are tweaking this.

PS: Much better and simplified I18N support is upcoming in D8, *YEAH! *

Good-luck!

1
  • Thanks, that was helpful. I had been inclined to use my custom English as the default language and the built-in English as the source for translations, but I wanted to make sure I was going in the right direction. Apr 9, 2012 at 0:25
1

I think you should use your own defined English language, I mean which one you created. Because, for example, if you changed the word "Save" into "Submit" and in your i18n module you choose built-ind Drupal English you will have "Save" for word to translate and no "Submit".

2
  • Why is that? If you are on the translate interface page (/admin/config/regional/translate), regardless of which language is the default language, if you search for "Submit" then the relevant string will appear. Mar 31, 2012 at 10:58
  • @Patrick Kenny I also think you must use your own defined language as source. Conclusion is made by reading drupal documentation drupal.org/node/1114012
    – john
    Jul 24, 2012 at 11:46

Your Answer

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

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