Language packs: Meta’s mobile localization solution

More than 3 billion people around the world rely on our services each month. On mobile, around 57 percent of people on Facebook for Android and 49 percent of those on Facebook for iOS use the app i…

Lu Su
11 min readintermediate
--
View Original

Overview

The article discusses Meta's mobile localization solution through language packs, which allows for accurate and efficient translations in mobile applications. It highlights the challenges of traditional localization frameworks and presents the benefits of a custom infrastructure that supports gendered translations and reduces app size.

What You'll Learn

1

How to implement downloadable language packs for mobile applications

2

Why using a custom localization framework improves translation accuracy

3

When to adopt on-demand language packs to optimize app size

Prerequisites & Requirements

  • Understanding of mobile application localization concepts
  • Familiarity with FBT API and its usage(optional)

Key Questions Answered

What are the main issues with traditional localization frameworks?
Traditional localization frameworks for Android and iOS face two main issues: they struggle with the accuracy of translations, particularly for gendered text, and they lead to increased app size due to the need to bundle multiple language files. This can hinder user experience and app updates.
How does Meta's language pack infrastructure improve app performance?
Meta's language pack infrastructure allows for on-demand downloading of language files, significantly reducing the app size by up to 16.6 MB for iOS. This ensures that users only download the languages they need, improving responsiveness and reducing storage issues.
What is the FBT API and how does it enhance translation accuracy?
The FBT API is a custom string API developed by Meta that supports gendered translations and allows for grammatically correct text definitions. It simplifies the process of delivering accurate translations across various languages and platforms.
What are the performance metrics for loading language packs in the Facebook app?
For Facebook on iOS, the success rate of loading language packs is over 99.99%, with an average loading time of around 80ms. For Android, the loading success rate is over 99.7%, with an average loading time of around 780ms, indicating high efficiency.

Key Statistics & Figures

Reduction in IPA size for Facebook on iOS
16.6 MB
This reduction is achieved by removing unnecessary translation files from the app bundle.
Success rate of loading language packs on iOS
over 99.99%
This high success rate indicates the reliability of the language pack infrastructure.
Average loading time for language packs on iOS
around 80ms
This performance metric shows the efficiency of the loading process for language packs.
Average loading time for language packs on Android
around 780ms
This indicates the time taken to load language packs across various device classes.

Technologies & Tools

Backend
Fbt
Used for defining and shipping grammatically correct translated texts.

Key Actionable Insights

1
Implementing downloadable language packs can significantly reduce app size and improve user experience.
By allowing users to download only the language packs they need, developers can optimize app performance and storage, making it easier for users to update their apps.
2
Utilizing the FBT API can enhance the accuracy of translations in mobile applications.
This API supports gendered translations and allows for a more nuanced approach to localization, which is crucial for applications with diverse user bases.
3
Consider prefetching language packs in existing client builds to enhance user experience during app updates.
This proactive approach ensures that users have access to the latest translations without waiting for downloads during the initial app launch.

Common Pitfalls

1
Failing to account for gendered translations can lead to inaccurate user experiences.
Many traditional localization frameworks do not support gender variations, which can alienate users. Using a framework like FBT helps address this issue.
2
Bundling all language files can unnecessarily increase app size.
This can deter users from updating the app due to storage constraints. Implementing downloadable language packs mitigates this risk.

Related Concepts

Mobile Localization Strategies
Gendered Translation Frameworks
Performance Optimization In Mobile Apps