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 6996533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:10:10+00:00 2026-05-27T20:10:10+00:00

I use these methods [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@ar] forKey:@AppleLanguages]; [[NSUserDefaults standardUserDefaults] synchronize]; to force

  • 0

I use these methods

[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObject:@"ar"] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize]; 

to force my app to change its localization during run time (when the user taps a button which simple calls these methods) and it works perfectly, however, these methods are not sufficient to switch the whole XIB to the new language (which is in my case, Arabic language), giving that I have one XIB named HomeViewController.xib that opens as a directory in XCode, a directory of two files: HomeViewController.xib (English) and HomeViewController.xib (Arabic) each file has its own layout according to language (for ex. Arabic xib has right to left controls layout ..), i’ve tried to call removeFromSuperView for every control on the current controller and then call addSubView for the controls, but nothing has changed, the app still displays the english XIB.

how can I let my app to change its XIB to the correct localized one at run time when that language button tapped.

p.s. when I change the whole simulator localization in system settings, the app works as expected, i.e. it displays the correct localized XIB.

  • 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-27T20:10:10+00:00Added an answer on May 27, 2026 at 8:10 pm

    some fellow developer almost solved the issue, please have a look at this sample app:
    https://rapidshare.com/files/3434929956/LangSwitch.zip
    it switches the whole XIB on the fly from Arabic to English and vice versa, what i’m stuck at right now is : I need this sample app to be tabbed, i.e. with a tab bar controller with two tabs, each tabs contains one view controller (you know, the usual way), anybody solves this problem I’d be sooo grateful to him/her …
    waiting for your help guys …

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

Sidebar

Related Questions

I use these methods to get the text: public static string[] GetAllTextInSlide(SlidePart slidePart) {
How can i use these methods protected Class recompile(URL source, String className, Class oldClass)
What is the best practice to use these two methods for memory management? My
When/why/how would you use these methods? - navigationController:willShowViewController:animated: – navigationController:didShowViewController:animated: Can't you just use
Does either of these methods use more memory than the other or put a
What methods to use a database from Clojure are there? I know from Clojure
I know how I use these terms, but I'm wondering if there are accepted
I have these lines in my code : [defaults setValue:someValue forKey:@someValue]; [animationGroup setValue:@someValue forKey:@someValue];
I'm looking at the pros and cons of these three primary methods of coming
I use the NSUserDefaults dictionary to store basic information such as high scores etc

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.