How would I go about fetching a phrase
in code (i.e., not from within a template)?
I am using fetch_phrase(), but it seems to be adding a query for every phrase it translates:
Quote:
SELECT text, languageid
FROM phrase
WHERE phrasetypeid = 500
AND varname = 'navbar_folders'AND languageid IN (-1, 0, 1)
Time before: 0.1310920715332
Time after: 0.13276600837708
Time taken: 0.0016739368438721
table type possible_keys key key_len ref rows Extra
phrase range name_lang_type,languageid name_lang_type 254 3 Using where
Query:
SELECT text, languageid
FROM phrase
WHERE phrasetypeid = 500
AND varname = 'navbar_filters'AND languageid IN (-1, 0, 1)
Time before: 0.13507008552551
Time after: 0.13678789138794
Time taken: 0.0017178058624268
table type possible_keys key key_len ref rows Extra
phrase range name_lang_type,languageid name_lang_type 254 3 Using where
|
...and so on for each phrase fetched in code.