english localization极品飞车18的副标题为怎么改

Cocoa-积累(42)
由于项目中需要支持国际化功能,在网上找了一些帖子, 说得不全面,很重要的部分竟然没有说清楚。 终于在一个国外的论坛上看到了解决方法。很简单&
网上的很多方法主要是会出现下面两个问题。
1: &新建一个工程, 你在选择InfoPlist.strings或者Localization.strings之后,然后右边的侧栏会发现只有Base 跟 English 两个选项, 很多帖子上面直接就是叫我们+Chinese
解决方法: 选择你的target&
& &然后点击Info 下面找到
下面会有一个+,点击添加你需要的语种即可。
2 : 依次打开对应的strings文件,并添加对应的键值对
3: 在viewController中添加一个Label测试一下
UILabel *label = [[UILabel alloc] init];
label.frame = CGRectMake(20, 40, 250, 60);
label.text = NSLocalizedStringFromTable(@&key&, @&Localization&, nil);
[self.view addSubview:label];注意我这里是用的&NSLocalizedStringFromTable
这个方法 。
这就是内容国际化的详细教程, 如果想让app的名字国际化, 将上述步骤重复在InfoPlist.strings,并将对应的key写成
CFBundleDisplayName 即可。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:60102次
排名:千里之外
原创:21篇
转载:102篇
(1)(2)(2)(1)(4)(13)(6)(2)(1)(9)(10)(1)(13)(20)(10)(3)(10)(14)(1)User Tools
Site Tools
ToolsEdit this pageOld revisionsBacklinksRecent ChangesMedia ManagerSitemapLog In&
Learn about DokuWiki
Advanced Use
Corporate Use
Our Community
Follow us on ,
and other .
localization
Table of Contents
Localizing DokuWiki (the Software)
's user interface can be configured to use any language by setting the appropriate option in the .
You can help translating DokuWiki to your language by visiting the . We recommend to join the
to be informed when new strings are added and need to be translated.
Localizing DokuWiki and its plugins and templates
Most of DokuWiki and its plugins and templates only provide localization for English and some other languages.
We encourage you to translate them into your native language.
Important things to keep in mind when translating:
Please try to complete your countries main official language before starting another dialect.
If you do major translation work it is recommended to check your translations in the . This gives you the opportunity to correct errors and verify the layout in your language.
In some languages words and sentences tend to get longer than the original English words. Keep in mind that your translation needs to work on any screen size and it often looks better if words are in line with other items on the page.
When translating technical descriptions of external origin like the API's delivered by Github,Twitter , Google etc please read the external manual first. This is especially important for translating interfaces. Maybe a localized version of the manual or helppages is already at the external source and you can use all or part of these.
As DokuWiki wants to be standards-compliant, consider learning about these regarding your language first. You can learn about correct spelling and interpunction from dictionaries or webpages maintained by public institutions.
Always keep the format strings intact, i.e. identical. Strings like these %1$d and &i&%s&/i& and &strong&Update:&/strong&. The word Update: should be translated but the word &strong& not.
Directions for consistent translations
page you can find:
some preferred translations for regularly used words
and how to handle placeholder order in non-english strings.
Plugin authors can register their plugin at the
where you can easily help to translate the plugin.
If a plugin is not translatable via the hub you can do it manually:
Copy the content of lib/plugins/&pluginname&/lang/en/ to
lib/plugins/&pluginname&/lang/&ISO-code&/
Edit the contained .php and .txt files in a
text editor
Zip up the new language folder and send it to the author for inclusion in future releases
For any further questions or general help you could send a mail to the
or ask for help in the .
Changing some localized texts and strings in your installation
There are many localized texts in DokuWiki like emails that are sent on registration, password forgotten, the text above the edit form, and more. Also the strings used in the buttons and links are translated. You can modify these by creating custom files with your version of the texts. This way your changes aren't overwritten on upgrades.
You can change these texts by copying the &name&.txt files or copying some strings from lang.php:
from inc/lang/&ISO-code&/
to conf/lang/&ISO-code&/
and editing the copied content.
You can do the same thing for plugins and templates by copying &name&.txt or some strings from lang.php:
from lib/plugins/&plugin&/lang/&ISO-code&/
to conf/plugin_lang/&plugin&/&ISO-code&/
from lib/tpl/&template&/lang/&ISO-code&/
to conf/template_lang/&template&/&ISO-code&/
Copy only strings from lang.php which you will modify. The remains strings are read from the original file.
Translating txt-files is possible since “Rincewind” . Translating some strings from lang.php since Release
Example of an English lang.php file. This is possible for every language.
* Customization of the english language file
* Copy only the strings that needs to be modified
$lang['btn_admin']
= 'Admin Panel';
Translating DokuWiki.org (the documentation)
Translating the DokuWiki documentation here at dokuwiki.org is encouraged. Translated pages are to be named like their English counterparts and stored in a separate namespace based on their ISO code. To make this easier the
adds links to existing and missing translations in the upper left corner of every page.
Only languages manually configured by the administrator are shown in the selector. If you want to add translations for a language currently not shown, just manually create the pages in the appropriate language subnamespace and send a mail to the
asking for your language to be added.
Translation Guidelines
Feel free to create any missing translation
Only pages in the top namespace should be translated
Translated pages need to have the same (English) name as the original page
Translated pages have to be stored in a sub namespace of the root namespace named by the ISO language code
Please don't add stubs saying the page does not exist, yet.
Please refrain from cluttering translations with credit lines – if you want to be recognized as translator, log in first
A good starting point for translations is the
You may also want to translate the
to your language
Disabling translation feature for certain pages
Where translation is not sensible the ~~NOTRANS~~ macro should be inserted into the page.
Directions for
Team (translation team)
Page Toolsposts - 311, comments - 0, trackbacks - 0, articles - 0
随着游戏国际化的发展,很多游戏都会在多个国家发行,那么其中有一个很重要的工作就是游戏的本土化,包括里面的文字,画面,情节等等都要符合该国的语言和文化以及法律等等。那么在NGUI中,我们的本土化最主要的就是语言的显示。那么,在该教程中,我将根据NGUI的官网教程,实现英文和中文的转换(我们要摒弃那个好像是德文的例子,呵呵,那个德国国旗暂时不改了,等说道制作altas再来了解)。726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_ff260f720b51d8c.png');" border=0 src="/forum/attachment/Mon_7_ff260f720b51d8c.png">首先先制作一个窗口背景,我这里只用简单的窗口来表示,不关注美术方面的问题,我表示这个界面做得有点丑了!在这里有两点要注意,在创建每一个组件的时候,其Font参数为3699Font字库(该字库点击下载导进Unity中就好了),接着,每一个Label的z轴都要稍微向前平移一些,不然会消失。那个下拉菜单的Option设置成Language,如图所示726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_b943f64390acf3b.png');" border=0 src="/forum/attachment/Mon_7_b943f64390acf3b.png">1. & & & & 接着创建两个txt文件,命名为English.txt和Chinese.txt。我们将从这两个txt文件中获取文字描述。我建议不要用monodevelop编辑器来操作,因为它支持中方字体实在太糟糕,我选用UltraEditor编辑器来做,有人说动用visualStudio,这样有点大材小用了。English.txt文件内容如下:&&& &
Flag = Flag-USLanguage = EnglishEnglish = Englishchinese = 中文Info = Localization exampleSoundMusicDesc = English localizationParagraph = This example shows how to implement localization using NGUI. In order to localize a widget, simply attach [000000]UILocalize[-] script to it. The script will localize the sprite if it's a [000000]UISprite[-], or the text if it's a [000000]UILabel[-]. If you want to localize something else, just implement the [000000]OnLocalize[-] function. Either way, the actual data is defined via text assets specified on the [000000]Localization[-] script which must be present in the scene.& &
Chinese.txt内容如下:Flag = Flag-FRLanguage = 中文English = EnglishChinese = 中文Info = 本土化示例Sound = 音效Music = 音乐Desc = 中文本土Paragraph = 《老人与海》写的是老渔夫桑地亚哥在海上的捕鱼经历,描写老人制服大鱼后,在返航途中又同鲨鱼进行惊险的搏斗,然而作品中的形象却具有很强的象征意蕴。他用大马哈鱼象征人生的理想和人类作为生命本身所不可避免的所具有的欲望,用鲨鱼象征无法摆脱的悲剧命运,用大海象征变化无常的人类社会,而狮子则为勇武健壮,仇视邪恶,能创造奇迹的象征,桑地亚哥则是人类中的勇于与强大势力搏斗的“硬汉子”代表,他那捕鱼的不幸遭遇象征人类总是与厄运不断抗争却无论如何都无法试图去改变命运。& &
这两个txt文件先留着。创建一个空游戏对象,命名为Localization,并为其添加一个Localization组件(Component-&NGUI-&Internal-&Localization)。打开该组件,把Starting Language设置成English,Languages中的size设置成2,把english.txt赋值给Element0,把chinese.txt赋值给Element1。如图所示726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_b623.png');" border=0 src="/forum/attachment/Mon_7_b623.png">为每个Label(除了PopupList中的Label)添加一个Localize组件(Component-&NGUI-&UI-& Localize),打开该组件,可以看到该组件下面有一个参数为Key,这个参数就是用来设置关键字的,也就是在txt中“=”号前面的名称。我们把这些label一一中的Key设置成我们需要的关键字(Voice和Music的Label只要添加这个组件,不用为它的Key赋值),例如如图所示726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_d9a8185bedb0a86.png');" border=0 src="/forum/attachment/thumb/Mon_7_d9a8185bedb0a86.png">选择PopList,为其添加一个LanguageSelection组件(Component-&NGUI-&Interaction-& Select Language)。现在点击播放试试,可以看到,已经可以在两个字体之间转换了726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_d6d391bca5b2c10.png');" border=0 src="/forum/attachment/Mon_7_d6d391bca5b2c10.png">现在只剩下国旗没换了,选择国旗的Sprite,也为其添加一个Localize组件,设置其key为Flag。这些key都和txt文件中的key一一对应的。点击播放,ok,成功。现在剩下最后一个问题,当你选择那个下拉菜单时,文字会消失掉,通过观察发现,下拉菜单在点击之后会新建一个名为Drop-down List的新游戏对象,如图所示726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_52b9cff78faf7bb.png');" border=0 src="/forum/attachment/Mon_7_52b9cff78faf7bb.png">选择里面的label,会发现,那些label的z轴都在0的数值上,我们前面已经提到,如果要显示中文字体,需要把这些label的位置往外拉出一些,在该例子中将成为负值。我本来想修改下它的源代码,后来发现,只要把窗口的背景往后挪一些就ok了,好,那么我们把这个窗口的背景往后挪1个单位,如图所示726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_87b064d31dc385f.png');" border=0 src="/forum/attachment/thumb/Mon_7_87b064d31dc385f.png">Ok,问题解决!726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_21441ceeb54f0d6.png');" border=0 src="/forum/attachment/Mon_7_21441ceeb54f0d6.png">还有,我看下拉菜单里面那个chinese太碍眼了,如果那些对英文一窍不通的人,都不知道chinese到底是什么东西,所以,我索性把chinese.txt文件名改成”中文.txt”(没双引号的,不要忘了把改完名的txt文件重新复制给Localization中的element1)。哈哈,居然这样也可以,最后效果如下726 || this.offsetHeight>700){if(this.offsetWidth/726 > this.offsetHeight/700){this.width=726;}else{this.height=700;}}" class=J_post_img title=点击查看原图 onclick="if(this.parentNode.tagName!='A') window.open('/forum/attachment/Mon_7_05e667b28b9305e.png');" border=0 src="/forum/attachment/Mon_7_05e667b28b9305e.png">
随笔分类(268)
随笔档案(311)
积分与排名}

我要回帖

更多关于 副标题的格式图 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信