5

Sometimes, the app contains a lot of texts and the Localizable.strings seems to be flooding with too much strings that makes me hard to find the right string to edit(even if I added comments for the strings).

I would like to create multiple .strings and set each .strings file to corresponding features or set of storyboards for the app.

I tried changing the file name of Localizable.strings to other names like TestOnly.strings but Xcode doesn't seem to read every .strings file available and I can't find the a single setting under build settings that tells Xcode to read strings under Localizable.strings. Is this default and unchangeable?

Please take note that I am not asking on how to localize strings to support different languages. What I want is like for example my Localizable.strings contains

"test_string" = "This is a test"; "test_string2" = "Another test";

then I want "test_string2" to be placed in another .strings file like OtherLocalizable.strings which can still be recognized by Xcode.

I hope you guys get my point.

1
  • @KiritModi Hi, I already know this and this isn't what I need. Please reread my question if you wish to. Commented Apr 27, 2017 at 3:09

1 Answer 1

7

In Xcode, File -> New -> File... , scroll to Resource group, select String File

Create Strings File

Localize

Strings File in project

Read your string by NSLocalizedStringFromTable(@"yourString", @"File", nil)

Sign up to request clarification or add additional context in comments.

2 Comments

Hi, thank you for the effort. But you misunderstood me. I did not ask how to localize strings to different languages. I already know how to do that. I guess I should edit my question...
Hi, sorry I did not read your answer carefully. This is exactly what I need

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.