1

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 1

2
  • 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.

3
  • Thanks, how do I create a .po file for my Hello World example?
    – John
    Sep 8, 2011 at 17:10
  • 1
    The 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.
    – Bart
    Sep 8, 2011 at 17:13
  • 2
    I 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.
    – yvan
    Sep 9, 2011 at 9:08

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.