Home | Trees | Indices | Help |
|
---|
|
object --+ | translator
this class is instantiated by gluon.compileapp.build_environment as the T object
:T.force(None) # turns off translation T.force('fr, it') # forces web2py to translate using fr.py or it.py T("Hello World") # translates "Hello World" using the selected file
notice 1: there is no need to force since, by default, T uses accept_language to determine a translation file.
notice 2: en and en-en are considered different languages!
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
|
user ## to add a comment into a translation string the comment can be useful do discriminate different possible translations for the same string (for example different locations) T(' hello world ') -> ' hello world ' T(' hello world ## token') -> 'hello world' T('hello ## world ## token') -> 'hello ## world' the ## notation is ignored in multiline strings and strings that start with ##. this is to allow markmin syntax to be translated |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Aug 4 00:47:01 2011 | http://epydoc.sourceforge.net |