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

📄 translator.html

📁 是一个加快Java应用程序国际化和本地化开发的工具集。它将大大减少国际化和本地化开发的所消耗的时间和资源。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"><html><head>   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">   <meta name="Author" content="Scarlett Hao">   <meta name="GENERATOR" content="Mozilla/4.5 [zh.GBK] (X11; I; SunOS 5.7 sun4u) [Netscape]">   <title> Translator</title></head><body bgcolor="#FFFFFF"><center><pre CLASS="ChapTitle"><img SRC="image/titleduket.gif" height=116 width=661><img SRC="image/coffee.gif" height=88 width=57></pre></center><center><b><font size=+2>Translator</font></b><p><img SRC="image/rainbow.gif" height=1 width=100%></center><p><b><font size=-1><a href="userguide.html">[contents]</a></font></b><p><b><a href="#Introducing the Translator">Introducing the Translator</a></b><br><b><a href="#Using the Translator">Using the Translator</a></b><ul><b><i><a href="#Getting Started with the Translator">Getting Startedwith the Translator</a></i></b><br><b><i><a href="#Menus and Buttons">Menus and Buttons</a></i></b><ul><b><i><a href="#Edit->Options Menu">Edit -> Options Menu</a></i></b><br><b><i><a href="#Translate Menu">Translate Menu</a></i></b><br><b><i><a href="#Dictionary menu">Dictionary Menu</a></i></b></ul><b><i><a href="#Translating A Resource File">Translating A Resource BundleFile</a></i></b><br><b><i><a href="#Implementing A User Dictionary">Importing a User Dictionary</a></i></b></ul><b><a href="#Translator command line">Translator Command-line</a></b><br>&nbsp;<p><a NAME="Introducing the Translator"></a><b><font size=+1>Introducingthe Translator</font></b><p>Translator helps in an important part of localization, that is translation.It searches for strings that need translation in Java resource bundle files(either class file or source file) and translates them into the targetlanguage, for example, Chinese. You can use the provided dictionary orresource bundle files (either class file or source file) as dictionariesfor the translating work.&nbsp; You can also install and use you own dictionaryif you provide an implementation of the interface bridging between thedictionary and Translator.<p>Translator looks for code like the following in ResourceBundle files.<p>{"Quit Merge Diff", "Quit Merge Diff"}<p>It automatically marks that value string <i>"</i>Quit Merge Diff<i>"for translation and suggests a translation if one is available in dictionaries.</i><p>Translator includes an English to Simplified Chinese dictionary. Ifyou want to use another dictionary, the&nbsp; interface, ie. Dictionary,between that dictionary and the Translator must be implemented.&nbsp; Adeveloper must have a good working knowledge of the original and targetlanguage locale to make a good translation.<p><a NAME="Using the Translator"></a><b><font size=+1>Using the Translator</font></b><p><a NAME="Getting Started with the Translator"></a><b><i>Getting Startedwith the Translator</i></b><p>With GUI mode, in the main window of <b>I18n/L10n Toolkit 2.0</b>, select<b>Translator</b>,then you can get <b>Translator</b> window pop-up (figure1). (The file inTranslator is selected from toolkit main window.)<p><a NAME="Menus and Buttons"></a><b><i>Menus and Buttons</i></b><p>The <b>translator</b> UI includes several buttons and menus. Only onesthat are unique to this tool are described here.<p><img SRC="image/tra_main.gif" height=494 width=656><h6>Figure1: Translator main window with a source file loaded</h6>In this main window, the resource bundle file is displayed with keys andvalue strings marked. The current value string is also displayed in aninput window top-left above the document editing window. Right click onit, the translation menu will pop up with the translation of the markedtext in this input window, as shown in figure1.<div CLASS="Paragraph"><ul><li><a NAME="Edit->Options Menu"></a><b>Edit->Options Menu</b>:</li></ul><ul>There are three option items in the window.<br>&nbsp;<ul><li><b>Dictionary</b></li></ul><ul><ul><li><b>Lookup Order</b></li></ul><ul>The list are the dictionaries currently being used. You can selectand move a dictionary to change their order. The Translator will lookupkeys in each dictionary according to this order.<br>&nbsp;<li><b>Lookup Method</b></li></ul><ul>Checking <b>Use Cache</b> will allow the Translator to enable an internalcache (with dictionaries's support) for looking up. This will acceleratethe speed of query but use more memories. Checking <b>Look Through</b>means looking up in all the dictionaries even if a matching has been foundin one of the them; if it is unchecked, the query stops once a matchingis found. The query and matching operation can be adjust to case sensitiveor case insensitive with <b>Case Sensitive</b> checkbox.</ul></ul><ul><ul><li><b>Resource Locale</b></li></ul><ul>There are options to be used to decide whether the country and/or variantof a locale are used (effective) when loading resource bundles into a resourcedictionary. If using explicit locale, thus using full locale informationto match when loading a resource bundle file into resource dictionary,if the locale name is different from the system dictionary's, the bundlefile and its content can not be loaded and used in the resource dictionary.</ul><ul>&nbsp;<br>Checking <b>Ignore Country</b> will ignore the difference of localecountry if any as well as variant, in resource bundle file names, whenloading resource bundle files. Checking <b>Ignore Variant</b> will onlyignore the variant difference if any. <b>Locale Sensitive</b>, if checked,when open a resource bundle file, the Translator will try to switch dictionaries'target locale to the bundle's locale. "Ignore Country" and "Ignore Variant"setting can affect the locale sensitive mode.</ul></ul></ul></div><ul><ul><ul><img SRC="image/tra_option.gif" height=310 width=480><h6>Figure2: Translator dictionary options</h6></ul></ul></ul><ul><ul><li><b>Editor</b></li><br>The function of this option is the same as that of <b>Message Tool</b>.You can find the detail introduction in <b>Edit->Option</b> in Chapter3:Message Tool.</ul><ul><li><b>Miscellaneous</b></li><br>Select the display method. If <b>View Value As Unicode</b> box is checked,the value strings will be displayed in ASCII unicode. You can save thedocument in WYSIWYG (What You See Is What You Get) way.<p><img SRC="image/tra_opt_miscell.gif" height=341 width=494><h6>Figure3: Translator miscellaneous options</h6></ul><li><a NAME="Translate Menu"></a><b>Translate M</b>enu:</li></ul><ul>This menu realizes the function of translating the opened resourcefile.<br>&nbsp;<ul><li><b>Submit</b></li><br>Change the current value to the locale language using the string inthe top-right text field above the editor window, which shows the selectedtranslation.</ul><ul><li><b>Submit&amp;Next</b></li><br>Change the current value to the locale language and highlight the nextstring to be translated and show the translation of it to select.</ul><ul><li><b>Revert</b></li><br>Change the value string to the same as the key string.</ul><ul><li><b>All</b></li><ul><li><b>Values</b></li><br>The Translator will translate all words in the values using the matchingit found in its dictionaries.<br>&nbsp;<li><b>Translatable Values</b></li><br>The Translator will translate all words in the values only if the allmatching of the words can be found in its dictionaries.<br>&nbsp;<li><b>Fully Translatable Values</b></li><br>The Translator will translate values only if it can find a full matchingfor one value as a whole in its dictionaries.<br>&nbsp;<li><b>Revert</b></li><br>Change all the value strings to the same as the key strings.<a NAME="Dictionary menu"></a></ul></ul></ul><ul><li><b>Dictionary M</b>enu:</li></ul><ul><ul><li>

⌨️ 快捷键说明

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