Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7633249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:49:49+00:00 2026-05-31T06:49:49+00:00

I have a Constants.h which has all strings which are used allover my app.

  • 0

I have a Constants.h which has all strings which are used allover my app.

#define kGuideTitle @"Guide"
#define kSeatingTitle @"Seating"
#define kNotesTitle @"Notes"
#define kQuestionsTitle @"Questionnaire"
#define kTimelineTitle @"Timeline"
#define kMessagesTitle @"Messages"

Now I have a pressing need to localize that file to support multiple languages(5 languages).

I have got the translation for each language i need to support.

So I added lanugage support for Constants.h file from the inspector. And XCode created versions of Constants.h file for each language.

After that I edited the contents of the language specific files, like this.

Constants.h(Dutch)

#define kGuideTitle @"Leitfaden"
#define kSeatingTitle @"Sitzplan"
#define kNotesTitle @"Notizen"
#define kQuestionsTitle @"Fragebogen"
#define kTimelineTitle @"Zeitlinie"
#define kMessagesTitle @"Nachrichten"

But when I run the code in the simulator(Simulator language was set to Dutch), I am seeing only English version of the text all over the app. Why is it so?

Can any file be localized or only the localizable.strings file can be localized?

(I dont want to rework on shifting everything to localizable.strings file).

Can anyone please help?

Thanks very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:49:51+00:00Added an answer on May 31, 2026 at 6:49 am

    You can’t do it like that. A #define is replaced during the pre-processor stage before your code hits the compiler. i.e. only one set of your languages will ever get “compiled in”. You will need to use localised strings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C++ class implementation file which has some constants. The constants appear
For example, I have a class that has two strings, one of which must
I have an array which has the contents as the result of an sql
I have several obj-c classes, each of which require a number of constants that
I have seen these two approaches for constant declaration which are to be used
I have this app (contacts style) in which you can add instances to a
I have a localization issue. One of my industrious coworkers has replaced all the
I have a method that's used in many places in my app, both in
If I have a constant BAR in Foo, which I will use in a
I have a class which is essentially just holds a bunch of constant definitions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.