Tab disappears when changing language in iOS - ios

One of the tabs in my UITabBar disappears when I change the language of my iOS Simulator to Norwegian. Why is this? I have created the app with Version 4.6.3 of XCode.

There could be a lot of reasons for this. You need to provide more information. How do you define your UITabBar? Are you using Storyboards or Nibs? Your Norwegian localized Storyboard / Nib might have only 1 tab defined while your English version might have three tabs.

I have found the problem.
When I tried to get my app translated I added my own languange in the Localizations section under Project-Info.
When I did this there was an extra .storyboard file created for the spesific language, so when I change the storyboard I had in xCode that did not change the second storyboard created for my language. I found my second storyboard in the directory of my app, and deleted it, and now everything works fine.
So, if your app is weird with one spesific language, it may have a spesific storyboard that does not change automatic.

Related

Xcode 10 Arabic (RTL) storyboard not gets load

I have multi-language enabled in my project. In previous Xcode versions, it was working perfectly fine but in new Xcode 10, Arabic storyboard is not being loaded.
instead of (Arabic storyboard) views, it's only loading/replacing the Arabic text in LTR(English storyboard) views.
I don't know if its due to the change in New Localization Pattern introduced in Xcode 10, XLIFF?
Or is it a bug in new Xcode?
I've also filed a bug report to Apple 44931689.
It's quite old, but I think the issue was related to the hardcoded language set in Project Scheme.
Go to Product -> Scheme -> Edit Schemes
OR beside simulator selection click on your project name and select Edit Scheme.
Select "Options" and check the app language, if it's other than "System Language" then this issue could occur.

Localized Interface builder storyboard doesn't work in Xcode 10

After updated to Swift 4.2 I tested new app version on iPhone where is a main language is Russian. Region is also Russia, but app using English Interface builder storyboard (Base). Even I have Russian one.
I also have Localizable strings for UIAlertController.
And it works. I mean, when I use my app on my iPhone (Russian language. Region is Russia) then I see English Interface builder storyboard, but alerts on Russian.
I didn't set language in scheme.
I even created new project there made 2 languages. Same problem.
Help me please where is a problem. Why iOS doesn't wanna see necessary Interface builder storyboard
Just FYI. I had the same issue and I accidentially removed a semicolon in the Storyboard translation file.
Syntax errors in the Localizeable.strings will prevent Xcode from compiling, but NOT in in the storyboard . This will cause XCode to ignore this file and just skip this translation.
I'm facing the same issue, I have Chinese and English(Base) in my MacOS App. The App always showing the Base Storyboard in Xcode 10 while it displays correctly in Xcode 9.x.
In the Build Log View, zh-CN.lproj/Main.storyboard never shows up, that means Xcode 10 does not compile it at all.
Since I update to Xcode 10.1, the issue disappeared.
I think Apple have fixed it.

Simulator showing the ViewController which I have deleted

In my application I am using two storyboards, one is for English language and the other is for Arabic language. Now I delete one viewcontroller i.e. "MyOrderHistoryViewController" both from Arabic as well as English storyboards, then I run my application and it's still showing MyOrderHistoryViewController which I have deleted on simulator. I am not getting why this is happening, please help me.

iOS - Localizing StoryBoard file

I've heard arguments on localizing a StoryBoard file (the way apple recommends - might) not be a good idea. The recommended way is to highlight storyboard in the project navigation and then localize it by clicking a language in the file inspector.
Here is the other way suggested: Remove all strings from the storyboard and in the ViewController file itself load the localized Strings per UI element. The argument for this is that multiple storyboard files are created per localization and the UI constraints are sometimes not kept. You end up with localized storyboards that have different UI constraints. Thus the storyboards are not identical in layout. Can anyone verify if this is the case?
I have a task to localize a few storyboards and want to know all your ideas and best approach ? BTW not all my layouts that i have inherited from other developers are auto-layout.
It seems in the previous version of xcode below xcode 6 it duplicates storyboards when localizing them. In the newer version of xcode it does not duplicate the storyboard. Instead it creates a text localization file and keeps just one storyboard. You can localize the storyboard the same way as you localize any file from the file inspector.

Add ipad interface to iphone app

I have been watching some of the solutions for this problem. There's any solution that not implies changing the code? I have seen solutions like put an if/else with the device type every time I load a ViewController. Theres no a way with xcode that this step is automaticaly done?
If you are using storyboards in the info.plist you can choose by configuration each storyboard, one for iPad and other for iPhone/iPod touch
If you are using xibs you'l need to change it programmatically using ifs and elses
I found a better method to include my iPad Xib in my project. I only have to add ~iPad at the end of the name of my xib. If I have myxib.xib I create a new xib named myxib~iPad.xib and when I run it on my ipad it takes automatically the correct file!

Resources