xcode7 亲测 本地化或者国际化 方法实践
2016-05-23 17:10
239 查看
NewFile -> iOS -> Resource -> Strings File
命名为 Localizable.strings
self.title = NSLocalizedString(@"Local Video", nil);//NSLocalizedString这个是Foundation框架下NSBundle中定义的一个宏Localizable.string(Chinese(Simplified))文件中代码如下:/* Localizable.strings Eleven Created by coderyi on 15/8/18. Copyright (c) 2015年 coderyi. All rights reserved.*/"Eleven Video"="十一 视频播放器";"Local Video"="本地视频";"Network Video"="网络视频";"More"="更多";"a simple powerful video player"="一个简单强大的播放器"; "wifi transfer"="wifi传输文件"; "play"="播放";"clear"="清空";"rorate"="旋转";"You can transfer video files via itunes or wifi\nSupport m4v, wmv, 3gp, mp4, mov, avi, mkv, mpeg, mpg, flv, vob format"="可以通过itunes或者wifi传输视频文件\n支持m4v,wmv,3gp,mp4,mov,avi,mkv,mpeg,mpg,flv,vob等格式";"Open button, and then enter the address in the browser address bar\nClose button Remember when the transfer is complete"="打开下面的按钮,在浏览器地址栏输入即将出现的地址\n传输完成记得关闭按钮";"Enter any HTTP, RTSP, RTMP, RTP address play network streaming or live"="输入任何HTTP,RTSP,RTMP,RTP地址播放网络流媒体或直播";"OK"="确定"; ———————————————————————————————————————————————————————————————————————Localizable.strings(English) 文件中代码如下:/* Localizable.strings Eleven Created by coderyi on 15/8/18. Copyright (c) 2015年 coderyi. All rights reserved.*/"Eleven Video"="Eleven Video";"Local Video"="Local Video";"Network Video"="Network Video";"More"="More";"a simple powerful video player"="a simple powerful video player";"wifi transfer"="wifi transfer";"play"="play";"clear"="clear";"rorate"="rorate";"You can transfer video files via itunes or wifi\nSupport m4v, wmv, 3gp, mp4, mov, avi, mkv, mpeg, mpg, flv, vob format"="You can transfer video files via itunes or wifi\nSupport m4v, wmv, 3gp, mp4, mov, avi, mkv, mpeg, mpg, flv, vob format"; "Open button, and then enter the address in the browser address bar\nClose button Remember when the transfer is complete"="Open button, and then enter the address in the browser address bar\nClose button Remember when the transfer is complete";"Enter any HTTP, RTSP, RTMP, RTP address play network streaming or live"="Enter any HTTP, RTSP, RTMP, RTP address play network streaming or live"; "OK"="OK";
相关文章推荐
- leetcode 231 Power of Two C++
- js 计算精度问题
- 关于Backtracing中有重复元素的处理办法
- handlebars添加条件判断
- 阿里研究员华先胜:图像搜索的前世今生
- leetcode.135. Candy
- LeetCode 111.Minimum Depth of Binary Tree
- iOS 定时器NSTimer的开启与关闭
- Jdk1.7自带的FTP文件上传下载
- nginx查看目标文件夹内容
- ReactiveCocoa之RAC内存管理(十二)
- VC6++中Map嵌套Set/Vector等容器
- POJ 2104 【主席树】【区间第K大】
- C++ primer plus 第14章习题
- 有感于最近的精神状态
- 屏蔽用户双击按钮产生的后续点击事件重复发生问题
- 第2章 分布式系统的通信
- Android字体设置 Roboto字体使用
- @import VS #import
- lintcode ----排列序号