Last updated November 16, 2012. Created by GiorgosK on November 11, 2012.
Edited by NonProfit. Log in to edit this page.
Reasons you might need to translate the default language
- 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
Using settings.php - Changing a few strings
In the first case you can just use the settings.php and erase the # signs from the following piece of code and changing _en to your default language code
In the following example for English the word forum will be translated to Discussion Board
<?php
$conf['locale_custom_strings_en'][''] = array(
'forum' => 'Discussion board',
);
?>Using Variable admin - Changing many/all strings
If you want to translate a lot of strings or you want an administrator to translate the strings without touching the settings.php you need to use the variable module.
- Enable the variable admin (variable module should be enabled if you have i18n enabled)
- Go to admin/config/system/variable
- Click on the multilingual vertical tab
- click on the ENABLE TRANSLATION FOR LANGUAGE
- put
TRUEin your default language (usually English) - press save
After this you are able to translate the default language
I suggest using a module like translation table which gives you a nice table of all available fields, terms, menus etc that can be translated
There is probably another way for this to be done using a setting in settings.php (please provide if you know it)
String Overrides module - changing a few strings
http://drupal.org/project/stringoverrides
Will let you override some default strings
for drupal 6
the only way to do it is probably by putting this piece of code in somewhere in settings.php$conf['i18nstrings_translate_langcode_en'] = TRUE;
please change en with your default language
NOTES
- This document has similar solutions http://drupal.org/node/522036
- Follow this discussion if you want to change the default language not when you first setup your site but later #364379: Add English as string translation when defaut language is not english
- A keyword based translation is proposed for drupal 8 that might make this easier #630432: Keyword-based translation system