【问题标题】:iOS: How to localize bunch .xib files using localized strings files by one ibtool commandiOS:如何通过一个 ibtool 命令使用本地化字符串文件本地化一堆 .xib 文件
【发布时间】:2012-03-11 13:55:49
【问题描述】:

我有这个文件夹模式:

-Xib
--en.lproj 
--- 1.xib
--- 2.xib
--- 3.xib
--ar.lproj
--- 1.xib.strings
--- 2.xib.strings
--- 3.xib.strings

如何将 ar.lprog 中的本地化字符串文件注入到 en.lprog IN ONE ibtool 命令中的英文 xib 文件中(不键入 3 个命令)?

【问题讨论】:

    标签: ios localization xib ibtool


    【解决方案1】:

    我得到了解决方案:

    1. 把英文的.xib文件和本地化的.strings文件放在一个文件夹里,注意strings文件的命名:name.xib.strings
    2. 在同一位置创建一个空文件夹“result”。

    打开终端并输入以下命令:

    find . -name \*.xib | xargs -t -I '{}' ibtool --strings-file '{}'.strings --write result/'{}' '{}'
    

    【讨论】:

      猜你喜欢
      • 2013-10-25
      • 1970-01-01
      • 2014-11-02
      • 1970-01-01
      • 2011-04-11
      • 2012-02-05
      • 2012-07-21
      相关资源
      最近更新 更多