转自:https://help.pentaho.com/Documentation/5.4/0P0/000/030
You can localize the names and descriptions for reports and folders that appear in the User Console. Localization is helpful if your co-workers work in different countries and speak different languages, but use the console to access the same reports and folders. For example, localization allows German speakers to view report names in German and Americans to view the same report names in English.
Localization language packs have been created through a community initiative that uses an installer built by Webdetails, a Pentaho company. The language packs apply to both EE and CE, and are maintained by community members. The packs are not officially supported by Pentaho.
Localization information is stored in the BA Repository, along with other report and folder information. Typically, to localize names and descriptions of reports and folders you do three things.
- Download the report or folder from the BA Repository. Localization information is stored in one or more text files that have the .locale extension.
- Add or edit the localization files downloaded with the reports or folders.
- Re-upload the report or folder, along with the localization files, into the BA Repository.
If you want to create or add a Pentaho localization file, but are unfamiliar with its structure, we recommend that you read Localization File Structure first.
Localization File Structure
When you download a report or folder from the BA Repository, localization information is stored in a text file that has a .locale extension. You add or edit localization files, but must upload them to the BA Repository for the changes to appear in the User Console.
Each report and folder that appears in the console should have a default localization file associated with it. The default localization file should indicate the name that appears when you view the name of the report or folder in the console. Optionally, the localization file can contain the report description. The report description appears when you hover the mouse pointer over the report or folder name in the console.
If multiple localization files are present, the User Console displays the localization information contained in them if you set the language indicated in the localization file as the default in the console or in your web browser. Otherwise, the information in the default localization file is displayed instead.
Localization information appears in two places in a localization file: in the file name and in variables inside the file.
Localization File Names
Localization file names consist of several parts that are joined by underscores. This is an example of a localization file name for a folder: index_es_PA.locale
In folder localization, file names the word index appears first, as in the previous example. If the localization file is for a report, the name of the report appears instead of index, like this: Inventory Report_es_PA.prpt.locale
The second and third parts of the file name indicate the two-letter language code and the two-letter country code. Language codes adhere to ISO 639-1; country codes can be found in ISO-3166. In the previous example, es is the language code for Spanish and PA is the country code for Panama. A list of often-used language and country codes appears here.
File extensions, which appear after the period, indicate the report type and end with .locale. In the previous example prpt indicates the report type.
Language, country, and dialect codes are optional parts of file names. The report type extension should not be included in folder localization file names. Only the report name (or the word index for folders) is required as is the .locale extension. But, if a country code is present, the language code must also be present, and if a dialect code is present, both the language and country codes must be present.
If a localization file name contains no language, country, or dialect code, the console assumes that the file is the default for a report or folder. A default localization file name for a folder looks like this: index.locale.
Localization Variables
- file.title holds the name of the report or folder that appears in the User Console.
- file.description holds the text for the Tool Tip that appears when you hover the mouse pointer over the report or folder name in the User Console.
Here is an example of a localization file for a report.
#Locale = es #Wed Apr 17 13:55:53 EDT 2013 file.title=Inventario Region 23 file.description=Lista del inventario de la región 23
Before variable values set in the localization file can be displayed, you must adjust either the User Console or your web browser’s language so that it matches the localization file’s language. You must also upload the localization file into the BA Repository along with the other report files.
Using the previous example, the User Console displays the value of file.title (Inventario Region 23) when you open it. If you hover the mouse pointer over the report name in the console, a Tool Tip appears that displays the value of file.description (Lista del inventario de la region 23).
Popularly Used Country and Location Codes
Language and country codes that are used to construct localization file names appear in standards ISO 639-1 and ISO 3166. Here is a list of popularly used language and country codes.
Chinese | zh | China | CN |
Dutch | nl | Netherlands | NL |
French | fr | France | FR |
German | de | Germany | DE |
Italian | it | Italy | IT |
Japanese | ja | Japan | JP |
Korean | ko | Republic of Korea | KR |
Portuguese | pt | Brazil | BR |
Portuguese | pt | Portugal | PT |
Spanish | es | Argentina | AR |
Spanish | es | Spain | ES |
Set Default Localization for Reports and Folders
Complete these steps if you want to set up default localization information.
- Download the report or folder to which you want to add localization information. Instructions appear in Download Folders and Files.
- Unzip the downloaded report or folder, then determine whether a default localization file already exists. Localization files have a .local extension and are named either
index.locale
(for folders) or<report name>.<report type>.locale
for reports. If a default localization file exists you do not need to continue with these steps. -
To add new localization information, you must create a default localization file. Localization file names follow very specific naming conventions. To determine the name of the new localization file, do this.
- For folders, the default localization file name convention is
index.locale
. - For reports, the default localization file name convention is
<report name>.<report type>.locale
. An example of a valid file name is Inventory Report.prpt.locale.
- For folders, the default localization file name convention is
- Use a text editor to create a blank localization file that has the file name you constructed in the previous step, then save the file in the directory of the folder or report.
-
Type the following in the blank file.
#Localization File file.title= file.description=
-
Type the name of the report or folder that you want to appear in the User Console after the file.title variable. Type the name of the report or folder exactly as you want it to appear. Example:
file.title=Inventario
-
Type the description for the report or folder after the file.description variable. The value of the file.description appears when you hover the mouse pointer over the report or folder name in the console. Type the description exactly as you want it to appear. Example:
file.description=Inventario para El Rey
- Save and close the file.
- Upload the localization file along with other report or folder files into the BA Repository. Instructions for how to do this appear in Upload Folders and Files.
Localize for Additional Languages
Complete these steps if you want to display report and folder names and descriptions in a language other than the default. If you want to change the default language displayed only, we recommend that you edit the default locale file.
- Download the report or folder to which you want to add localization information. Instructions appear in Download Folders and Files.
- Unzip the downloaded report or folder.
-
To add new localization information, you must create a new localization file. Localization file names follow very specific naming conventions. You can optionally specify country and language codes, as well as the report type. To determine the name of the new localization file, do this.
- For folders, the localization file name convention is
index_<language code>_<country code>.locale
. An example of a valid file name is index_es_PA.locale. Note that the language and country codes are optional. - For reports, the localization file name convention is
<report name>_<language code>_<country code>.<report type>.locale
. An example of a valid file name is Inventory Report_es_PA.prpt.locale. Note that the language and country codes are optional.
- For folders, the localization file name convention is
- Use a text editor to create a blank localization file that has the file name you constructed in the previous step, then save the file in the directory of the folder or report.
-
Type the following in the blank file.
#Localization File file.title= file.description=
-
Type the name of the report or folder that you want to appear in the User Console after the file.title variable. Type the name of the report or folder exactly as you want it to appear. Example:
file.title=Inventario
-
Type the description for the report or folder after the file.description variable. The value of the file.description appears when you hover the mouse pointer over the report or folder name in the console. Type the description exactly as you want it to appear. Example:
file.description=Inventario para El Rey
- Save and close the file.
- Upload the localization file along with other report or folder files into the BA Repository. Instructions for how to do this appear in Upload Folders and Files.
Edit Existing Localization Information
Complete these steps if you want to edit localization information for report and folder names and descriptions that appear in the User Console.
- Download the report or folder for which you want to edit localization information. Instructions for how to do this appear in Download Folders and Files .
- Unzip the downloaded report or folder.
- Use a text editor to open the localization file you want to modify. Localization files have the .local extension. Localization files for folders begin with the word index. Localization files for reports begin with the report name.
-
To change the report or folder name that appears in the console, edit the file.title text. Example:
file.title=Inventario
-
To change the report or folder description Tool Tip that appears when you hover the mouse pointer over the report or folder name in the console, edit the value of the file.description variable. Example:
file.description=Inventario para El Rey
- Save and close the file.
- Re-upload the localization file, along with the other report or folder files, into the BA Repository. Instructions for how to do this appear in Upload Folders and Files.
相关推荐
《Visual Localize 6.1 汉化包详解及应用》 Visual Localize是一款强大的本地化工具,专为软件的多语言版本提供便捷的翻译和管理服务。6.1版本作为其一重要迭代,引入了多项改进和新功能,以满足用户在处理全球化...
jquery.localize.js,系统多语言支持相关js,自定义语言包
【前端项目-jquery-localize.zip】是一个包含jQuery插件的压缩包,主要目的是为静态网站提供国际化(i18n)支持。这个插件被称为jQuery-localize,它使得开发者能够轻松地根据用户所在的地区或语言,展示不同的内容...
是一款与 Visual Localize 相似的功能强大的可视化软件本地化工具。 支持 VC、VB、.NET、文本等软件的本地化。CATALYST 的特色包括:方案以资源树的方式显现;与 LocStudio 一样也支持“伪翻译”;支持.rc 文档的...
《jQuery.Localize:JavaScript 国际化插件详解与应用》 在当今全球化背景下,网站和应用程序需要支持多语言环境,以满足不同地区用户的需求。jQuery.Localize 是一个优秀的 JavaScript 插件,专为实现这一目标而...
**nicen-localize-image 插件详解** nicen-localize-image 是一款专为WordPress平台设计的高效工具,其主要目标是帮助用户实现文章中外部图片的本地化处理。这款插件的强大之处在于它能无缝集成到您的WordPress站点...
localize_and_translate 轻松完成本地化,非常简单 屏幕截图 教程 视频 阿拉伯语: : 英语:很快.. 方法 方法 工作 init() 在runApp()之前初始化事物 translate('word') 单词翻译 translate('word',{"key":...
`Localize-Swift` 是一个专为Swift开发者设计的框架,旨在简化这一过程,帮助开发者更高效地实现项目的本地化。 `Localize-Swift` 框架的主要特性包括: 1. **易于集成**:`Localize-Swift` 提供了简单易用的API,...
Angular-nativescript-localize.zip,不推荐使用nativescript的本机国际化插件,该插件使用每个platformnativescript本地化的本机功能,Angularjs于2016年发布,是Angularjs的重写版。它专注于良好的移动开发、模块化...
Angular-localize-router.zip,面向角度定位路由器的路由定位实现,Angularjs于2016年发布,是Angularjs的重写版。它专注于良好的移动开发、模块化和改进的依赖注入。angular的设计目的是全面解决开发人员的web应用...
软件简介: 本软件是一个本地化工具,主要用于非资源格式的本地化工作,支持的种类包括非资源格式的 C 编译的程序中的 ASCII 字符串和 UniCode 字符串、非资源 格式的 Delphi(C++ Builder)编译的程序的字符串、...
`Laravel开发-localize` 提供了一个解决方案,使得开发者可以利用GetText翻译技术(.mo文件)来实现项目的国际化(i18n)和本地化(l10n)。GetText是一种广泛使用的开源工具,它允许程序员将应用程序的文本字符串...
use gcc algorithm with different filters, and realize the sound source localize algorithm
Ways to localize your web site in multiple languages for a world-wide audience * Methods for adding AJAX capabilities to your ASP.NET applications * The many benefits of the new data access ...
一个全面支持VisualBasic编制程序的软件汉化工具,支持双语言(例如汉语和英语);它可以添加一个注释到每一个短语;版本资源可以被翻译了;在文本格式下输入方案和字典文件;增加取消/恢复功能;...
一个全面支持VisualBasic编制程序的软件汉化工具,支持双语言(例如汉语和英语);它可以添加一个注释到每一个短语;版本资源可以被翻译了;在文本格式下输入方案和字典文件;增加取消/恢复功能;...
《PyPI官网下载 | localize-1.0.9.tar.gz:深入理解Python国际化与本地化库》 在Python的世界里,开发跨语言的应用程序是一项挑战,但得益于强大的库支持,这个过程变得相对容易。其中,`localize`库是Python中用于...
在开发Windows Presentation Foundation (WPF) 应用程序时,实现本地化(Localize)是一项重要的任务,它允许你的软件适应不同语言和地区的用户。"Localize a WPF application" 主题聚焦于如何利用WPF框架提供的功能...