美文网首页iOS iOS Developer
让小白懒到家(iOS 国际化常见字段)

让小白懒到家(iOS 国际化常见字段)

作者: 践行丶见远 | 来源:发表于2016-11-07 19:48 被阅读117次
    最近做了几个项目需要支持国际化比较多,国际化设置教程的比较多,但我找了好久没有找到整理方便的常用字段,写第一个的时候就就感觉体力活很繁重 这几天闲下来将用到比较多的字段整理了一下,希望能让帮助大家减轻体力,所以我直接放代码段形式方便CV大法。(如果常见的有比较全面字段希望大家共享下链接😀,有错误希望大家帮忙改正😝)

    InfoPlist.String xcode.8 中配置

    English

    
    CFBundleDisplayName = "ProjectName";
    
    NSAppleMusicUsageDescription = "Application needs your permission to access the Media Library";
    NSBluetoothPeripheralUsageDescription = "App need your permission to access Bluetooth";
    NSCalendarsUsageDescription = "App need your permission to access Calendar";
    NSCameraUsageDescription = "App need your permission to access the camera";
    NSHealthShareUsageDescription = "App need your consent to share access to health";
    NSHealthUpdateUsageDescription = "App need your consent to access health update";
    NSLocationAlwaysUsageDescription = "App need your consent to always access the location";
    NSLocationUsageDescription = "App need your permission to access the location";
    NSLocationWhenInUseUsageDescription = "App need your consent to use during the visit position";
    NSMicrophoneUsageDescription = "App need your permission to access the microphone";
    NSMotionUsageDescription = "App need your permission to access Exercise and Fitness";
    NSPhotoLibraryUsageDescription = "App need your permission to access the album";
    NSRemindersUsageDescription = "App need your permission to access reminders";
    

    中文

    CFBundleDisplayName = "项目名称";
    
    NSAppleMusicUsageDescription = "App需要您的同意,才能访问媒体资料库";
    NSBluetoothPeripheralUsageDescription = "App需要您的同意,才能访问蓝牙";
    NSCalendarsUsageDescription = "App需要您的同意,才能访问日历";
    NSCameraUsageDescription = "App需要您的同意,才能访问相机";
    NSHealthShareUsageDescription = "App需要您的同意,才能访问健康分享";
    NSHealthUpdateUsageDescription = "App需要您的同意,才能访问健康更新";
    NSLocationAlwaysUsageDescription = "App需要您的同意,才能始终访问位置";
    NSLocationUsageDescription = "App需要您的同意,才能访问位置";
    NSLocationWhenInUseUsageDescription = "App需要您的同意,才能在使用期间访问位置";
    NSMicrophoneUsageDescription = "App需要您的同意,才能访问麦克风";
    NSMotionUsageDescription = "App需要您的同意,才能访问运动与健身";
    NSPhotoLibraryUsageDescription = "App需要您的同意,才能访问相册";
    NSRemindersUsageDescription = "App需要您的同意,才能访问提醒事项";
    

    Localizable.String 中配置

    English

    //By Date
    "Sunday" = "SUN";
    "Monday" = "MON";
    "Tuesday" = "TUE";
    "Wednesday" = "WED";
    "Thursday" = "THU";
    "Friday" = "FRI";
    "Saturday" = "SAT";
    
    "January" = "JAN";
    "February" = "FEB";
    "March" = "MAR";
    "April" = "APR";
    "May" = "MAY";
    "June" = "JUN";
    "July" = "JUL";
    "August" = "AUG";
    "September" = "SEP";
    "October" = "OCT";
    "November" = "NOV";
    "December" = "DEC";
    
    "Today" = "Today";
    "Yesterday" = "Yesterday";
    "Tomorrow" = "Tomorrow";
    
    "Year" = "Year";
    "Month" = "Month";
    "Day" = "Day";
    
    //Project Common Fields
    "Menu" = "Menu";
    "Home" = "Home";
    "Explore" = "Explore";
    //style @1
    "Log in" = "Log in";
    "Register" = "Register";
    "Quit" = "Quit";
    //style @2
    "Sign in" = "Sign in";
    "Sign up" = "Sign up";
    "Sign out" = "Sign out";
    
    "Loading..." = "Loading...";
    "Exiting..." = "Exiting...";
    "No more data" = "No more data";
    
    "Request successful" = "Request successful";
    "Request failed" = "Request failed";
    "Request error" = "Request error";
    "Server exception" = "Server exception";
    "Network anomaly" = "Network anomaly";
    
    "Success" = "Success";
    "Fail" = "Fail";
    "Error" = "Error";
    "Warning" = "Warning";
    "Notification" = "Notification";
    
    "Settings"  = "Settings";
    "Help" = "Help";
    "Detail" = "Detail";
    
    "OK" = "OK";
    "Canale" = "Canale";
    "Add" = "Add";
    "Delete" = "Delete";
    "Edit" = "Edit";
    
    "Previous" = "Previous";
    "Next" = "Next";
    
    "Agree" = "Agree";
    "Reject" = "Reject";
    "Comment" = "Comment";
    
    "Start" = "Start";
    "End" = "End";
    "Done" = "Done";
    
    "Send" = "Send";
    "Save" = "Save";
    
    "Status" = "Status";
    "Time" = "Time";
    "Location" = "Location";
    "Address" = "Address";
    

    中文

    //日期相关
    "Sunday" = "日";
    "Monday" = "一";
    "Tuesday" = "二";
    "Wednesday" = "三";
    "Thursday"= "四";
    "Friday" = "五";
    "Saturday"= "六";
    
    "January" = "一月";
    "February" = "二月";
    "March" = "三月";
    "April" = "四月";
    "May" = "五月";
    "June" = "六月";
    "July" = "七月";
    "August" = "八月";
    "September" = "九月";
    "October" = "十月";
    "November" = "十一月";
    "December" = "十二月";
    
    "Today" = "今天";
    "Yesterday" = "昨天";
    "Tomorrow" = "明天";
    
    "Year" = "年";
    "Month" = "月";
    "Day" = "日";
    
    //项目常见字段
    "Menu" = "菜单";
    "Home" = "首页";
    "Explore" = "发现";
    //方式 @1
    "Log in" = "登录";
    "Register" = "注册";
    "Quit" = "退出";
    //方式 @2
    "Sign in" = "登录";
    "Sign up" = "注册";
    "Sign out" = "退出";
    
    "Loading..." = "加载中...";
    "Exiting..." = "退出中...";
    "No more data" = "没有更多数据";
    
    "Request successful" = "请求成功";
    "Request failed" = "请求失败";
    "Request error" = "请求出错";
    "Server exception" = "服务器异常";
    "Network anomaly" = "网络异常";
    
    "Success" = "成功";
    "Fail" = "失败";
    "Error" = "错误";
    "Warning" = "警告";
    "Notification" = "通知";
    
    "Settings"  = "设置";
    "Help" = "帮助";
    "Detail" = "详情";
    
    "OK" = "确定";
    "Canale" = "取消";
    "Add" = "添加";
    "Delete" = "删除";
    "Edit" = "编辑";
    
    "Previous" = "上一步";
    "Next" = "下一步";
    
    "Agree" = "同意";
    "Reject" = "拒绝";
    "Comment" = "评论";
    
    "Start" = "开始";
    "End" = "结束";
    "Done" = "完成";
    
    "Send" = "发送";
    "Save" = "保存";
    
    "Status" = "状态";
    "Time" = "时间";
    "Location" = "地点";
    "Address" = "地址";
    

    最后给个下载地址链接: https://pan.baidu.com/s/1dFFUuop 密码: tywf

    相关文章

      网友评论

        本文标题:让小白懒到家(iOS 国际化常见字段)

        本文链接:https://www.haomeiwen.com/subject/buuouttx.html