Skip to content
This repository was archived by the owner on Dec 4, 2021. It is now read-only.

Localization

Roman Cinis edited this page Dec 12, 2020 · 3 revisions

Localization Guide

In this section, you can learn how to translate this project into your language.

Important Info

Right-to-Left Language Support

The project was not tested to support the RTL languages, because the author of this project does not speak any of them. There is a high chance that some of the third-party dependencies do not support these languages. It is, therefore, necessary to test these translations of these languages especially carefully.

Additional Info

Localizations in this project using two-letter language-name codes. Please pay attention to the lengths of your texts — some items in the UI have fixed dimensions. Also, be extremely careful with special characters and parameters, such as {platform}, \n, or the name of the archive Icons ZIP. They should remain unchanged.

Getting Started

Prerequisites

This multilingual project uses an extension for the IDE called "Flutter Intl" and it's dependencies (which the project already contains). Therefore, it will be necessary to install this extension to your setup, the installation instructions for your specific IDE can be found here:

The translation itself

It is up to you now, how you will translate your ARB file, there are many options:

  • Use specialized services, for example from the authors of the above plugin — Localizely.
  • Translate file content manually.
  • Use this sheet with a help of translation through Google Translate.
  • Anything else...

I have prepared a simple 6 min video in which the whole process of translation via Google Sheets and Google Translate is displayed step by step:

Video Watch it on Vimeo or YouTube

Localization Generation

Once you have the translation ready, initialize your language via the "Add Locale" command (of Flutter Intl extension) and enter your language code (without country code). Please, use the two-letter code, this link will help you to choose the proper one. Also add this code and native language name to languageNames map in lib/constants/locales.dart. Once you are done — let Flutter Intl generate all the files and test the application, check that the texts are displayed correctly.

Share

Want to share your translation with others? Please use Localization Pull Request Template by adding:

&template=pull_request_template.md

to the end of your PR URL in the browser's address bar, for example:

https://github.com/tsinis/app_icon_tools/compare/master...your_username:your_branch_name?expand=1&template=pull_request_template.md

Links