Package gnue :: Package common :: Package apps :: Module i18n
[show private | hide private]

Module gnue.common.apps.i18n

Internationalization support.

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead
Function Summary
  getencoding()
This module is *DEPRECATED*.
  getlanguage()
This module is *DEPRECATED*.
  getuserlocale()
This module is *DEPRECATED*.
  outconv(message)
This module is *DEPRECATED*.
  setcurrentlocale(new_locale)
This module is *DEPRECATED*.
  translate(message)
This module is *DEPRECATED*.
  utranslate(message)
This module is *DEPRECATED*.

Variable Summary
str encoding: Encoding of the current locale
str language: Language of the current locale

Function Details

getencoding()

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Returns the encoding of the currently active locale. This can be changed with setcurrentlocale.
Returns:
encoding of the current locale.

getlanguage()

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Returns the language of the currently acitve locale. This can be changed with setcurrentlocale.
Returns:
language of the current locale.

getuserlocale()

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Try to find out which locale the user is using. This is always the locale of the user running the program and is not touched by setcurrentlocale.
Returns:
localestring of the user's locale, i.e. de_AT@euro.

outconv(message)

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Encodes a message to encoding (the current locale's encoding). This function is available as the builtin function "o()".

setcurrentlocale(new_locale)

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Set the current locale.

If it fails it tries to succeed using a more general form of the requested locale, i.e. if 'de_AT@euro' fails, 'de_AT' will be tried next. If that fails too, 'de' will be tried.
Parameters:
new_locale - string of the locale to be set, e.g. de_AT.ISO88591@euro (full blown) or 'de_AT' or 'en_AU'

translate(message)

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Translates a message and returns an 8 bit string, encoded with encoding (the current locale's encoding). This function is available as the builtin function "_()".

utranslate(message)

This module is *DEPRECATED*. Please use gnue.common.base.i18n instead.

Translates a message and returns a unicode string. This function is available as the builtin function "u_()".

Variable Details

encoding

Encoding of the current locale
Type:
str
Value:
'ISO8859-1'                                                            

language

Language of the current locale
Type:
str
Value:
'en_US'                                                                


GNUe Home

Private API

Developer's Corner