![]() Since the base language should be the guide for localization, it’s advisable to leave keep it that way. Changing this to another language will create all localization files using the keys from that language. It’s recommended to keep it in English (or your team’s native/fluent language). Reference Language-the Base language in which we have designed our application, which is by-default English.In the screen above, 2 things require your attention: Uncheck LaunchScreen.storyboard. Apple allows only static assets in the LaunchScreen and does not support localization in the LaunchScreen. A list of languages will show for you to select your language of choice, let’s start with Spanish.Īfter you select your language (Spanish in our case), a choose files and reference language to create your desired language localization sheet will show. Under Localizations, click the plus (+) symbol to add the languages and regions you want to support. From the Project Navigator ➞ Select the project name. In our case, we’ll add Spanish and Hebrew. The next thing is to add the languages that you want to support. The official guide is a handy read if you need to manage localization files yourself. □️ Note » You will have to manually manage all localization files and folder structure if you don’t enable Use Base Internationalization. You’ll remember that our base language in this tutorial is English. When you check the Use Base Internationalization option, Xcode transfers the Main.storyboard and LaunchScreen.storyboard into the Base.lproj folder for the default language. It relieves localizers of the need to modify. Then check Use Base Internationalization if it’s not checked.īase internationalization separates user-facing strings from. Now that our project is ready, let’s move to the fun part: localization.įrom the Project Navigator, s elect the project name. These identifiers are what tell the iOS system which languages your application is localized in, and show the user that language. For example, there is no ISO 639-1 code for the Hawaiian language, so use the ISO 639-2 code, haw.Īpple provides more information on language codes in its documentation. □️ Note » If an ISO 639-1 code is not available for a particular language, use the ISO 639-2 code instead. iOS uses the two-letter ISO 639-1 standard to represent languages e.g en for English, fr for French, etc. IOS can be localized into over 100 locales and regions. ![]() How do I add supported languages to my app? Clicking on any album will show more details. When you successfully run the project, you should be able to see the list of sleep sounds. You can get the full project here in UIKit and SwiftUI. The principles learned from localizing this simple application can be applied to any type of application, regardless of size. You’re free to add as many languages as it makes sense for your app -and the same process can be repeated each time. In this case, Sleepy will have English as the base language, and it will also support Spanish and Hebrew -Hebrew will help in dealing with Right-To-Left (RTL) languages. The first step is to think about the languages you’d like to support. Now that our environment is ready, we’re ready to build our dream application. While Sleepy uses Swift 5, we’ll use Xcode Version 13.3.1 with SwiftUI 3 on iOS 15. ![]() Sleepy is inspired by Uladzislau Luchkouski’s case study on Sleepy sounds. The demo app will allow us to showcase all key steps in iOS localization. In this tutorial, we’ll be working on “Sleepy,” an iOS app that sells albums that help you sleep.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |