前言
自 PotionProtect 诞生以来,我一直好奇:如果无法在插件中轻松且透明地实现它,那么本地化系统究竟有何意义?为什么至今没有人创建过这样一个本地化系统?无论是 Bukkit 本身、Essentials 还是其他任何插件,都没有。
描述
Translate 是一个面向插件开发者和服务器管理员的后端插件,旨在让插件的本地化工作变得轻松易行。它与 Curse 的本地化系统配合良好,因为它能够解析导出的语言文件。
如何安装?
Translate 的安装方式与其他插件相同。只需将 "Translate.jar" 文件放入你的 'plugins' 文件夹即可。首次启动后,Translate 会在 'plugins' 文件夹中创建一个 'Translations' 文件夹。该文件夹中将包含所有当前已安装插件的翻译文件。例如,Translate 自身的翻译文件如下所示:
CANTFINDPLUGIN = "Couldn't find any other plugins! What about checking ?"
FOUNDPLUGIN = "Found"
CREATEDTRANSLATIONFROMJAR = "created file from jar."
CREATEDTRANSLATIONFROMSCRATCH = "created file from scratch."
LOADEDTRANSLATION = "loaded translation from file."
FIRSTRUN = "Detected first run, creating own file from jar"
每行左侧的大写字母被称为“键”(key)。引号之间的文本则是该键对应的翻译内容。
请注意,你所使用的插件必须支持本地化。如果你在插件中没有看到任何变化,或者在插件的翻译文件中看不到任何键,请考虑在该插件的 BukkitDev 页面上提交工单。
如何下载翻译?
前往该插件的 BukkitDev 页面。然后导航到“Localization”选项卡,并点击“Export”子选项卡。选择“Global Strings”作为导出格式,选择你的语言并将其他选项设置为默认值。复制生成的输出内容,并将其粘贴到你服务器中对应插件的翻译文件里。
如何使我的插件支持本地化?
请参阅此 面向插件开发者的页面。
Preface
Since the creation of PotionProtect, I always wondered why there was a localization system if there is no way to implement it easily and transparently in the plugin. Why didn't anyone already created a localization system? Neither Bukkit itself, nor Essentials or any other plugins.
Description
Translate is back-end plugin meant for plugin developers and server administrators to localize plugins easily. It works great with Curse's localization system, since it's able to parse the exported languages.
How to install?
Translate install just like any other plugins. Simply put the "Translate.jar" file in your 'plugins' folder. After the first launch, Translate will create a 'Translations' folder in the 'plugins' folder. In this folder will be translation files for all of your currently installed plugins. For instance, Translate's own translation file looks like this :
CANTFINDPLUGIN = "Couldn't find any other plugins! What about checking ?"
FOUNDPLUGIN = "Found"
CREATEDTRANSLATIONFROMJAR = "created file from jar."
CREATEDTRANSLATIONFROMSCRATCH = "created file from scratch."
LOADEDTRANSLATION = "loaded translation from file."
FIRSTRUN = "Detected first run, creating own file from jar"
The caps on the left of a line is called a 'key'. The text between quotation marks is the translated sentence for a given key.
Note the plugins you use must be localizable. If you aren't seeing any differences in the plugin or aren't seeing any keys in the plugin's translation file, consider posting a ticket on that plugin's BukkitDev page.
How to download a translation?
Go to the plugin's BukkitDev page. Then navigate to the 'Localization' tab, and click the 'Export' sub-tab. Choose 'Global Strings' as the export format, choose your language and set the other options to default. Copy and paste the resulting output to the choosed plugin's translation file in your server.
How to make my plugin localizable?
See this page for plugin developers.
评论 0
登录后参与评分
还没有评论,来抢沙发吧