Taku
Taku

Reputation: 85

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

Upvotes: 5

Views: 2066

Answers (1)

Felix Lamouroux
Felix Lamouroux

Reputation: 7484

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

Upvotes: 7

Related Questions