HTTP Server for Tux Droid
|
Public Member Functions | |
def | __init__ (self) |
def | getPoDirectory (self) |
def | setPoDirectory (self, poDirectory) |
def | getLocale (self) |
def | setLocale (self, locale) |
def | getDictionnary (self) |
def | tr (self, message, *arguments) |
def | update (self) |
Private Member Functions | |
def | __extractContent (self, line) |
Private Attributes | |
__locale | |
__language | |
__country | |
__poDirectory | |
__data | |
Class to read and use i18n po files.
def util.i18n.I18n.I18n.__init__ | ( | self | ) |
Constructor of the class.
|
private |
Extract the content of a po line. @param line: Line to parse. @return: The extracted content.
def util.i18n.I18n.I18n.getDictionnary | ( | self | ) |
Get the translation dictionnary. @return: A dictionnary.
def util.i18n.I18n.I18n.getLocale | ( | self | ) |
Get the used locale value. @return: The locale as "<language>_<country>" string.
def util.i18n.I18n.I18n.getPoDirectory | ( | self | ) |
Get the target po directory. @return: A directory path as string.
def util.i18n.I18n.I18n.setLocale | ( | self, | |
locale | |||
) |
Set the used locale value. @param locale: Locale to use. "<language>_<country>".
def util.i18n.I18n.I18n.setPoDirectory | ( | self, | |
poDirectory | |||
) |
Set the target po directory. @param poDirectory: Path of the po directory.
def util.i18n.I18n.I18n.tr | ( | self, | |
message, | |||
* | arguments | ||
) |
Translate a message. @param message: Message to translate. @param arguments: Arguments to pass in the formated message. example: >>>print i18n.tr("This is the {0} test of the module {1}.", 4, "i18n")
def util.i18n.I18n.I18n.update | ( | self | ) |
Update the internal data dictionary with the current po dictionary and locale.
|
private |
|
private |
|
private |
|
private |
|
private |