Today’s engineers need to think about creating apps for a global audience — and for mobile app developers, that means localization and internationalization of your apps. In other words, as Andres Pineda explained, “imagine being a French-speaking person using an English app with no translation, and you will understand the importance of app localization.”
Why is app internationalization important?
The ultimate goal for many engineering teams is to build a well-functioning app with a large and happy user base. So now, imagine spending hundreds of hours hard-coding an app in Spanish, then growing your business and wanting to expand into a global market — your new audience doesn’t understand your app and you have to overhaul the infrastructure to translate the app. That is a reality that many mobile teams face, especially as global mobile phone ownership steadily grows. And the harsh part of this reality is that it can be harder to internationalize an app once the code and infrastructure have already been set.
That’s why focusing on app internationalization is essential — it helps make your app accessible to global audiences and saves mobile engineers from overhauling infrastructure or code to localize an app.
App internationalization vs. localization for mobile
App internationalization and localization are often referred to together in the same discussion. That’s because the two are closely linked — and both meet the goal of making the app accessible to people anywhere, regardless of language or borders. So what is the difference between mobile app internationalization and localization?
What is app internationalization?
Internationalization, sometimes referred to as i18n, is a function of app design that ensures an app can be used in various regions and read in multiple languages — without needing engineering changes. It’s the work you do now so that later on, you can localize your mobile app with ease.
What is app localization?
Localization, also known as L10n, refers to the process of adapting the application — after you’ve internationalized your app — to specific regions and languages by translating the text. However, localization is more than just language translation. It also includes units of measurement, currency, number formats, time zones, and more.
How to support multiple locales in mobile apps
Both iOS and Android have their own tools for internationalization and localization, so no third-party tooling is needed.
Supporting multiple locales for iOS developers
iOS developers can use Xcode to tell the application that they want to support all languages. The base language is set to whatever language your IDE is set to. When iOS developers want to support multiple locales, they can use Xcode to create a .strings file for each language that the app is being translated into. Each .strings file acts like a dictionary; you specify the keys and values (text) to localize.
So, for example, to translate your app into Spanish, you add the key in English (or whatever your base language is). Then, you export the text for localization. At this point, the iOS development team typically passes the .strings files off to an agency that provides an external localization service to translate the text into Spanish.
Supporting multiple locales for Android developers
Localization for Android apps is a slightly different process than the localization of iOS apps. With Android apps, you open the editor to localize the app to specify the locales that your application will support. However, Android engineers can use SwiftUI to extract value from the .string files that they are using in their applications.
💡TIP: Android engineers can also localize images, though Andres recommends avoiding images with text so you don’t have to localize too many images. It helps you avoid maintaining large amounts of variants.
Supporting multiple locales for cross-platform app developers
Cross-platform frameworks, like Flutter or ReactNative, also need to localize apps. Within these frameworks, the libraries or utilities can help you localize your applications. The main difference between supporting multiple locales on cross-platform frameworks vs. on native platforms is that you can use a single translation file for both iOS and Android apps.
Testing multiple locales
It’s important to test the localized versions of your app. To do this, mobile testing engineers might consider snapshot testing for app localization. Snapshot testing is a testing method that tests for comparisons using screenshots of your app’s UI to ensure app usability. This is especially useful for unique locales that support right-to-left (RTL) languages.
Automating snapshot testing ensures that each of your localized apps meets your UI expectations without having to spend time testing each version manually. For example, you could use Localazy — a localization platform that speeds up your translation process.
💡TIP: You can add the Localazy Verified Step to your Bitrise Workflows. It runs the Localazy CLI during your build, updating your existing strings, or even adding translations to new ones if you want it to. Localazy can translate up to 50% of your app instantly to 80+ languages.
How to set up mobile app internationalization correctly
Internationalization is the first step before localization. You don’t need to translate your apps into multiple languages until you have an audience in that language, but you do need to prepare for it. Planning ahead helps you avoid infrastructure/code overhauls and costly technical debt.
Here are some tips to help you set up internationalization correctly:
- Separate your content from your code. Don’t allow hard-coded .string files to be part of your code. Instead, use the resources that the platform or framework provides.
- Avoid images that have text. This way, you can reuse the images across multiple locales without needing to localize images.
- Keep audio and video files on the server. If you need audio or videos to be part of your application bundle, you can add subtitles or captions that can be localized across multiple locales.
- Don’t hardcode values or units of measurement. When units of measurement are referenced, don’t hardcode these values. Instead, use the utility tools provided to help you format values that can be localized.
- Avoid using fixed sizes for text boxes. Each language uses different words, character lengths, etc. So, the same block of text might be longer in French than in English. Therefore, avoid using fixed sizes that might limit the size of your text box.
Remember: internationalization is important because we are building for as many people as possible. Every language that you support in your application opens your doors to a new set of users that are able to use your app. Making internationalization part of your mobile CI/CD workflows helps you localize your app later when you need it.
To listen to Andres’ session about building mobile apps for global audiences, you can watch the on-demand video on the Mobile DevOps Summit website.