Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone : Is it possible to split Localizable.strings in many files

I'd like to know if it is possible to "distribute" the translation resources (my "Localizable.strings" files) in many subfiles.

Indeed, in my application, I store text articles in many folders, and I'd like to put the translations of each articles just aside the original article, that means in its own folder.

To summarize, I'd like to use this kind of hierarchy :

Resources/
- Articles/
-- First_Article/
--- Content.article
--- Localizable.strings/
---- en
---- fr
-- Second_Article/
--- Content.article
--- Localizable.strings/
---- en
---- fr

Would anyone have an idea about the feasibility and how to achieve to do this ? :)

Thanks by advance

like image 777
Taku Avatar asked Jan 19 '10 15:01

Taku


1 Answers

You can do this by using the following:

 NSLocalizedStringFromTable(self,@"second_article",@"");

You should however not use the name Localizable.strings twice. Instead do the following:

- second_article.strings/
-- en
-- fr
like image 100
Felix Lamouroux Avatar answered Nov 15 '22 03:11

Felix Lamouroux