localization - Localizing iOS app across multiple targets -


i have couple of targets app. trying localize them differently. have found pretty easy when dealing localizable.strings file , nslocalizedstring macro. work adjust target membership of localizable.strings file target working with. project file structure looks like:

  • project
    • target1
      • en.lproj
        • localizable.strings
      • it.lproj
        • localizable.strings
    • target2
      • en.lproj
        • localizable.strings
      • it.lproj
        • localizable.strings

now project has 2 targets being built different english translations. perfect, want.

my difficulty comes play when try same thing *.strings files generated when localizing view. deployment target 6.0 , using storyboards base internationalization. when add view project structure like:

  • project
    • target1
      • base.lproj
        • somestoryboard.storyboard
      • en.lproj
        • localizable.strings
        • somestoryboard.strings
      • it.lproj
        • localizable.strings
        • somestoryboard.strings
    • target2
      • en.lproj
        • localizable.strings
        • somestoryboard.strings
      • it.lproj
        • localizable.strings
        • somestoryboard.strings

my goal let each target have different localization each target, yet maintain same base storyboard. wanted avoid like: naming target2 storyboard string files replacement_somestoryboard.string , writing script every file named such in given target delete somestoryboard.string , rename replacement_somestoryboard.string somestoryboard.string.

attempt #1

so tried remove target1 en.lproj/somestoryboard.strings & it.lproj/somestoryboard.strings target2 membership. removed base.lproj/somestoryboard.storyboard target2 membership. membership managed if 1 file, makes sense.

attempt #2

the second thing tried add target1 somestoryboard.storyboard membership of target2 , create somestoryboard.strings file , add membership of target2. tried adding strings file copy bundle resources phase. tried adding copy files phase (after copy bundle resources phase). either way appeared replace somestoryboard.strings target1. end result target2 picked localization target1 , localized target2.

try using method described @ http://smoothlocalize.com/ (click on first tutorial in first main box). download small library allows use localizable.string resource strings same way .m files.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -