I'm using Drupal 7. I see that the t()
function is responsible for translating terms. Where do I go to find the list of translatable terms? For example, suppose I have t('hello world')
in my code. What file do I edit to tell Drupal 7 that the French version of "hello world" is bonjour toute le monde?
1 Answer
- You could browse to the Translate interface page (/admin/config/regional/translate/translate).
- You could use a .po file and import it (en/admin/config/regional/translate/import).
You'll have to enable the Locale module for this (it's in core).
More information is available on Translating a site interface to different languages.
-
-
1The easiest way would be to export your terms first (/admin/config/regional/translate/export). That way you'll have a .po file that you can edit. If you translate one term you'll have the complete syntax.– BartSep 8, 2011 at 17:13
-
2I just want to notify that you string would be available only if it appear in the foreign language at least one time. For example, you are looking for
hello world
but if you didn't see it in the french part of your website you'll not able to find it in the admin.– yvanSep 9, 2011 at 9:08