iOS: How to localize bunch .xib files using localized strings files by one ibtool command

StackOverflow https://stackoverflow.com/questions/9374459

  •  28-10-2019
  •  | 
  •  

문제

I have this folder pattern:

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

How to inject the localized strings files in ar.lprog into the english xib files in en.lprog IN ONE ibtool command (not typing 3 commands)?

도움이 되었습니까?

해결책

I got the solution:

  1. Put all the english .xib files and the localized .strings files in one folder, note the naming of strings file: name.xib.strings
  2. Create an empty folder "result" in the same location.

open terminal and type in this command:

find . -name \*.xib | xargs -t -I '{}' ibtool --strings-file '{}'.strings --write result/'{}' '{}'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top