Internationalized Files: zope.browserresource.i18nfile

Internationalized file resource.

class zope.browserresource.i18nfile.I18nFileResource(data, request, defaultLanguage='en')[source]

Bases: zope.browserresource.file.FileResource

A zope.i18n.interfaces.II18nAware file resource.

Creates an internationalized file resource.

Parameters:data (dict) – A mapping from languages to File objects.
chooseContext()[source]

Choose the appropriate context (file) according to language.

getDefaultLanguage()[source]

See II18nAware

setDefaultLanguage(language)[source]

See II18nAware

getAvailableLanguages()[source]

The available languages are those defined in the data mapping given to this object.