Back to index

plone3  3.1.7
Classes | Functions | Variables
kupu.python.nationalizer Namespace Reference

Classes

class  Nationalizer

Functions

def ustr
def get_locale

Variables

int ID = 0
int STR = 1
string I18NNS = 'http://xml.zope.org/namespaces/i18n'
tuple i = Nationalizer('../common/kupu.html', ['nl'])

Function Documentation

Definition at line 19 of file nationalizer.py.

00019 
00020 def get_locale():
00021     if os.environ.has_key('HTTP_ACCEPT_LANGUAGE'):
00022         charsets = [l.strip() for l in 
00023                 os.environ['HTTP_ACCEPT_LANGUAGE'].split(';')[0].split(',')]
00024         return charsets

Here is the call graph for this function:

Definition at line 13 of file nationalizer.py.

00013 
00014 def ustr(i):
00015     if type(i) == unicode:
00016         return i
00017     else:
00018         return unicode(str(i), 'UTF-8')

Here is the caller graph for this function:


Variable Documentation

tuple kupu.python.nationalizer.i = Nationalizer('../common/kupu.html', ['nl'])

Definition at line 193 of file nationalizer.py.

string kupu.python.nationalizer.I18NNS = 'http://xml.zope.org/namespaces/i18n'

Definition at line 11 of file nationalizer.py.

Definition at line 8 of file nationalizer.py.

Definition at line 9 of file nationalizer.py.