Community & Support

How to create drupal language variables

Hi,

I am working on my first multilingual site in drupal, I've used i18 n for this purpose, which is helpful for the content created from the admin side.

Now, my problem is that I've made several custom pages in my site like some custom forms with custom fields and some static pages, so, i want to use use some sort of language variables here, which change values corresponding to the language selected or what will be the other best workaround for this?

I am able to translate built-in strings in drupal5 from:

site configuration->localization->search for strings->edit and text in other language.

Is there a way to add my strings here and use them in my custom templates?

Or do i need to put checks like:

global $language;
if ($language->language == "fr") {
print "bonjour!";
} else {
print "hello!";
}

or is there a way to use t() function?

Please suggest!
Thanks,
Kul.

Comments

ok, i did it with t()

ok, i did it with t() function.