The Dublin Core metadata element set
is a standard for cross-domain information resource description.
|
||
Element | Description | Value |
---|---|---|
Identifier | resource ID | http://old.zope.org/Members/zoping/MiniI18N |
Title | resource name | MiniI18N: A slight multilingo package for zope application |
Description | resource summary | A easy way to multilingo your zope application Description This product uses browser's language sets to translate message unless defined 'favorite_language' in cookies in its ZMI interface, there are interfaces to show untranslated messages and or translated messages,and you can translate it online. API i18n is the instance id for MiniI18N class i18n(s) : return translated message in first language defined in REQUEST.HTTP_ACCEPT_LANGUAGE for s,if s is not translated in that language,return s itself i18n.change_runmode(mode) : change run mode, the default mode is 'dev',it mean the untranslated messages list will growing up when it miss translatation to the specified language. in other run mode,the miss translated messages list will not growing. Programmer Guide the i18n folder contain predefined languages, each subfolder for a single language, the subfolder name must be the languange name accepted from browser. MiniI18N will search all the msg.txt files under subfolders under i18n folder when its instance is created. the msg.txt format will be describe below. code with i18n to translate message. in script: # get i18n instance,here we get it from container,maybe anywhere. i18n = container.i18n # translate message hint_msg=i18n('Hi,World, This is MiniI18N') print hint_msg in DTML: <dtml-var "i18n('Hi,World,This is MiniI18N')" html_quote> in Page template: <div tal:content="python:here.i18n('Hi,World,This is MiniI18N')"></div> Translate message online when i18n run_code in 'dev',after you program run with specified language,in i18n instance,you can get all untranslated messages list in a textarea box,you can translate it online by add the translated text after ':' ,and press the 'translating' button (this button also can be translated). msg.txt format comment start with '#' each line define a message translattion entry. source message string and target message string is splited by ':' '\x3A' stand for ':' if it exists in source or target '\x0A' stand for '\n' '\\' stand for '\' '\x0D' stand for '\r' dependence fileUtilities -- a set of python functions to load some of zope Objects (include dtml method,file,image,page template,python script,etc SecurtyUtils -- a easy way to setup class security. download: http://www.zope.org/Members/zoping/MiniI18N/MiniI18N.tgz installation: unpack MiniI18N.tgz at <Your zope instance home folder>/Products Create MiniI18N instance Login on to your zope ZMI. at your application root folder,choose MiniI18N content type and press add button,and it will add a MiniI18N instance with id 'i18n' Support: My email address: [email protected],bug report are welcome, |
Creator | resource creator | zoping |
Date | default date | 2006-07-14 01:49:01 |
Format | resource format | text/html |
Type | resource type | Software Package |
Subject | resource keywords | EasyLanguageService, Internationalization |
Contributors | resource collaborators | |
Language | resource language | |
Publisher | resource publisher | No publisher |
Rights | resource copyright | |
|
||
Element | Description | Value |
CreationDate | date resource created | 2006-07-06 03:53:24 |
ModificationDate | date resource last modified | 2006-07-14 01:49:01 |
EffectiveDate | date resource becomes effective | 2006-07-14 01:49:01 |
ExpirationDate | date resource expires | None |
Backlinks:
via
Google
/
Technorati
RDF:
view RDF data