The translation domain of the server side
Immediately translate the given string with current request locale
Parameters: |
|
---|
Immediately translate the singular or plural form with current request locale
Parameters: |
|
---|
Recognize the user preferred language.
Parameters: |
|
---|
This function is automatically executed at each new request, and sets the _LOCALE_ attribute of the request itself.
A function to make a translatable string.
Return a function that translates a given string in the specified request
Parameters: | request – either None or a Pyramid request instance |
---|
This is an helper function that handle the case when the request does not exist, for example while testing:
>>> t = translator(None)
>>> t('$first $last', mapping=dict(first='Foo', last='Bar'))
'Foo Bar'