魅力程序猿

  • 首页
  • Java
  • Android
  • APP
    • 扑克计分器
    • Video Wallpaper
  • 联系我
  • 关于我
  • 资助
道子
向阳而生
  1. 首页
  2. Android
  3. 正文

研发本地化代码简要规范1

2016年9月23日 4311点热度 0人点赞 1条评论
  1. 名词单复数避免写两种文案,需要按照安卓标准采用plural方式。

例子:

   <plurals name="numberOfNotifications">

       <item quantity="one">%d Notification</item>

       <item quantity="few">%d Notifications</item>

       <item quantity="other">%d Notifications</item>

   </plurals>

 

相关介绍:

https://developer.android.com/guide/topics/resources/string-resource.html

https://en.wikipedia.org/wiki/Plural

 

  1. 录入英文文案避免使用中文标点符号。

举例:

正确:Hello World, I am a geek!

错误:Hello World,I am a geek!

 

  1. 任何英文标点符号后面如果还有新的内容,需要在标点符号后面添加一个空格。

举例:

正确:Hello World, I am a geek!

错误:Hello World,I am a geek!

 

  1. 如果某句文案只需要中文或者英文,或者是临时测试文案,需要标记成translatable false的方式,正式需要多语言的时候再把translatable false 标记去除

举例:

<string name="settings_language_en" translatable="false">English</string>

 

  1. 若非必要,尽量避免使用 & 以及 We'll 这种缩写模式,采用全写模式可以减少转义符的使用,避免未使用转义符造成的打包失败

 

  1. 折行避免用/n方式,英文和其它语言长度有别,对于其它语言处理起来很麻烦,所以请尽量采用自然整词折行
标签: Android
最后更新:2016年9月23日

daozi

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

  • Bardo

    I dump old stuff in the truck all the time. Better than dumping it down a storm drain or something. I’ve even put stuff in there that has the 2cycle oil mixed in. It gets diluted. My truck has 170,000 miles and still go#3&gi82n0;.knock on wood.“And is it really OK to put the old gas in the car???? That seems weird to me. The cars are a 10+year old Civic and a 9-year-old Corolla.”

    2016年12月19日
    回复
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    取消回复
    搜索
    联系方式

    QQ群:179730949
    QQ群:114559024
    欢迎您加入Android大家庭
    本人QQ:136049925

    赐我一丝安慰
    给我一点鼓励

    COPYRIGHT © 2023 魅力程序猿. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    豫ICP备15000477号