⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i18n-qtopia.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/doc/i18n.doc:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Qtopia Internationalization</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font>   <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top">  <table border="0" cellpadding="0" cellspacing="0" width="137">  <tr>  <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td>  <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td>  </tr>  </table></td></tr></table><h1 align=center>Qtopia Internationalization</h1><p> <p> Contents<!-- toc --><ul><li><a href="#1"> Introduction</a><li><a href="#2"> Program Internationalization</a><ul><li><a href="#2-1"> Placing Application Files</a><li><a href="#2-2"> Placing Plugin Files</a></ul><li><a href="#3"> Desktop File Internationalization</a><li><a href="#4"> Documentation Internationalization</a><li><a href="#5"> Translating Qtopia to Additional Languages</a><li><a href="#6"> How to Localize Qtopia</a><li><a href="#7"> Qtopia and the Operating System</a></ul><!-- endtoc --><p> <h2> Introduction</h2><a name="1"></a><p> Internationalizing Qtopia software is much the same asinternationalizing any Qt-based software. You should be familiarwith the Qt internationalization documentation, the <tt>tr()</tt> macros, <em>Qt Linguist</em> from Qt 3.3 or later,and the internationalization process in general before you proceed with thisdocument.<p> <h2> Program Internationalization</h2><a name="2"></a><p> The process of internationalization produces Qt message files (<tt>.qm</tt> files).<p> <h3> Placing Application Files</h3><a name="2-1"></a><p> Application files must be placed as follows:<p> &nbsp;&nbsp;/opt/Qtopia/i18n/<b>language</b>/<b>appname</b>.qm<p> The <b>language</b> is an ISO 639 language code optionally followed by an underscoreand an ISO 3166 territory, eg. "en", "en_GB", "ja", "ja_JP".The <b>appname</b> is the filename of the application executable.<p> <h3> Placing Plugin Files</h3><a name="2-2"></a><p> For plugins that are shared libraries the files must be placed inthe following directory:<p> &nbsp;&nbsp;/opt/Qtopia/i18n/<b>language</b>/<b>pluginname</b>.qm<p> The <b>pluginname</b> is the filename of the plugin shared object minus any extensions, but including "lib" if the plugin incorporates that prefix.<p> Locale suffixes are supported. For example, if your application uses British English it can have a/opt/Qtopia/i18n/en_US/<b>appname</b>.qm file specifying changesfor American English. Translations with locale suffixes takeprecedence over translations without such suffixes.<p> <h2> Desktop File Internationalization</h2><a name="3"></a><p> Desktop files (eg./opt/Qtopia/apps/Application/<b>appname</b>.desktop) can also betranslated.For example, the <tt>texteditor.desktop</tt> file begins with:<p> <pre>[Desktop Entry]Comment[]=A Text Editing ProgramExec=texteditIcon=TextEditorType=ApplicationMimeType=text/*Name[]=Text Editor[Translation]Context=Text EditorFile=QtopiaApplications</pre> <p> This causes the file /opt/Qtopia/i18n/<b>language</b>/QtopiaApplications.qmto be loaded (if it isn't already) and the strings marked with "[]" to be translated in the"Text Editor" context. The "scripts/installconfig" tool can be used tomaintain .ts files from .desktop files in a way to similar to how lupdate is used tomaintain .ts files from sourcecode files.<p> These files are encoded in UTF-8.<p> <h2> Documentation Internationalization</h2><a name="4"></a><p> Online documentation for applications is written in the HTML subsetsupported by the <a href="/qt/qt-x11-commercial-3.2.1/doc/html/qtextview.html">Qt richtext widget</a>.Such documentation files must be placed as follows:<p> English documentation:<p> &nbsp;&nbsp;/opt/Qtopia/help/html/<b>appname</b><b>-suffixes</b>.html<p> Non-English documentation:<p> &nbsp;&nbsp;/opt/Qtopia/help/<b>language</b>/html/<b>appname</b><b>-suffixes</b>.html<p> The <b>-suffixes</b> is optional. It always starts with "-" to avoid namespace conflicts.<p> These files are encoded in UTF-8.<p> <h2> Translating Qtopia to Additional Languages</h2><a name="5"></a><p> Qtopia ships with a number of supported languages. To translate it intoan additional language, you must perform the translation processdescribed above for all the application and desktop files, and any helpdocumentation that you wish to have available in that language.In addition to this you will need to translate the library texts found in:<p> &nbsp;&nbsp;/opt/Qtopia/i18n/<b>language</b>/libqpe.qm<p> <em>Qt Linguist</em> supports incremental translation, which helps you keeptrack of any additional content that is added to Qtopia and needstranslation.<p> <h2> How to Localize Qtopia</h2><a name="6"></a><p> <ol><li>Acquire <tt><i>application</i>-<i>LanguageCode</i>.ts</tt> for eachapplication.<li>Use Qt Linguist (from Qt 3) to translate the <tt>.ts</tt> files.<li><p>Any strings that are ambiguous or otherwise unclear or suspectin some way should be translated to whatever degree is possible, and then left in the <i>unfinished</i> state. A comment [in square brackets] should beappended to the these kinds of translations:</p><br><p>(ambiguous)<br><b>Source text</b><br>&nbsp;&nbsp;View<br><b>Translation</b><br>&nbsp;&nbsp;Vue [Noun or verb?]<br></p><br><p>(unclear / suspect)<br><b>Source text</b><br>&nbsp;&nbsp;%1:%2<br><b>Translation</b><br>&nbsp;&nbsp;%1:%2 [What is this? Note that in Fooish, the time"14:30" is written "30foo14", except on Tuesday when it iswritten "30bar14"]<br><br></p><li>Submit entire <tt>.ts</tt> file to Trolltech; you will receivefeedback on all the comments to unfinished items and implementations will be changed as necessary/possible (which should hopefully be sufficient to complete the translation). The feedback usually takes the form of added commentsto the <tt>.ts</tt> files so that future translators are similarlyinformed),</ol><p> <h2> Qtopia and the Operating System</h2><a name="7"></a><p> Qtopia uses UTF8 for all file formats. System functions are also expected touse UTF8 encoding. For example, with $LANG set to "ja", strftime() must returna string in UTF8 encoding. Depending on the underlying operating system, this mayrequire "ja" to be an alias for the "ja_JP.utf8" locale.<p> <!-- eof --><p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright &copy; 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -