Functions for Developers and Template Authors

Any suggestions on how to improve qTranslate? Post here!

Functions for Developers and Template Authors

Postby Qian Qin » Fri Jun 20, 2008 1:35 pm

Returns translated string, which will be first parsed by qTranslate and then by Gettext
Code: Select all
__(string $str)

returns nothing, echos translated string, which will be first parsed by qTranslate and then by Gettext
Code: Select all
_e(string $str)

returns currently selected language.
Code: Select all
qtrans_getLanguage()

returns formatted time using strftime syntax format. Use %q for date suffix (th, st, nd, rd)
Code: Select all
qtrans_strftime(string $format, int $date)

returns an converted URL for the selected language or the current language, if $lang is omitted.
Code: Select all
qtrans_convertURL(string $url, string $lang)

returns nothing, generates HTML lanuage selection code for the current page. $style can be either image, text, both or dropdown.
Code: Select all
qtrans_generateLanguageSelectCode(string $style, string $id)
Qian Qin
Site Admin
 
Posts: 873
Joined: Thu Jun 19, 2008 12:14 pm
Location: Germany

Return to qTranslate Suggestions Forum

Who is online

Users browsing this forum: No registered users and 1 guest