0

I'm using multilingual feature in D7.

Let's say...I have a word 'standard' that I like to use in other languages.

Where do I put the word and how do I load it in my templates?

1 Answer 1

1

You can set the translations for each specified language in the strings settings part of the internationalization module: /admin/config/regional/i18n_translation

To show it in a template file you simply use the t() function to wrap your text - which translates text for you and automatically adds new text defined in the t() function to the strings page.

See http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7

If you are hardcoding links with your text you can use l(), so if you have say a text link and want the text to be translated you would use l() and in it define your text using t() - something like this: http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7

See http://api.drupal.org/api/drupal/includes--common.inc/function/l/7 for its usage.

1
  • tecjam // exactly what I was looking for. THank you!
    – Moon
    Nov 28, 2011 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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