The methods explained here work for both Drupal 6 and 7. When a difference exists it is outlined.

There're several reasons you might need to translate the default language, for example:

  • You need to change a few strings depending on the dialect spoken or because of personal preference.
  • You need to change the default language but it will probably break translations because they are based on default language.

Strings overrides in settings.php

This method is provided by drupal core and doesn't require any extra module (even locale.module).

It is intended to provide translations in settings.php file. Because of this, its usage is limited in practice to site administrators, and only for a handful of strings, although technically you could provide the whole site translation with this method.

Proceed by editing settings.php and go around line 430. Uncomment the following code to provide your own translations:

434 # $conf['locale_custom_strings_en'][''] = array(
435 #   'forum'      => 'Discussion board',
436 #   '@count min' => '@count minutes',
437 # );

If your default language is not english or you are using any extra language, change the array key locale_custom_string_en to fit your language code.

See code of function t() for details.

Enabling full support for default language with i18n_string.

If you want to translate a lot of strings or you want an administrator to translate the strings out of settings.php you need to use the i18n_string module provided by Internationalization module.

To enable support for i18n_string, edit settings.php and add this code:

$conf['i18n_string_translate_langcode_en'] = TRUE;

Note for Drupal 6: i18n_string module is named i18nstrings in it's 6.x version. Acordingly the variable name is i18nstring_translate_langcode_en.

If you prefer to not edit settings.php, you can use the variable_admin module bundled with variable module. To proceed:

  • Go to admin/config/system/variable
  • Click on the "Multilingual settings" vertical tab
  • Click on "Enable translation for language"
  • Put TRUE in your default language (usually English)
  • Press save

After this, you are able to translate the default language, although there's no UI provided for that.

You can use a module like translation_table, which gives you a nice table of all available fields, terms, menus etc that can be translated.

See code of function i18n_string_translate_langcode() for details.

String Overrides module - changing a few strings

###needs work###
This method is the same as #1 with a web UI. http://drupal.org/project/stringoverrides

NOTES