Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Basically I have my own theme and my own settings page. In that settings page I have a textfield which contains a Welcome Text to show at the top of the website.

Now, I want this theme to works with qTranslate. To make the content of this textfield multi-language, it would be easy just to let the user add the qTranslate tags by himself within it.

However, internally, while I'm rendering the Welcome Text, which function of qTranslate should I call? It would be perfect if I could pass to it only the text (with the tags) in argument, and depending on the current language qTranslate would give me back the right part of the text.

Thanks a lot for your help :)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=9

You can use _e(); function to echo your variable and __(); to return your variable. Qtranslate hooks into these functions and translates following your input.

share|improve this answer
    
Excellent, that was easy and exactly what I was looking for. I didn't look much into that issue it seems. Thanks :) –  TigrouMeow Dec 25 '11 at 12:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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