Adding APP title in different languages for Android / iOS using Flutter

Tiempo de lectura: 2 minutos

Today we are going to learn how we can set the title of our APP in different languages using Flutter.

For Android

The first thing we need to do is go to the title of our APP, which is located inside android\app\src\main\AndroidManifest.xml

Now let’s create a variable that will allow us to change the title according to the language:

We have created a variable called app_name inside string.

Now we have to create these variables, for Spanish and English.

First, let’s create a string resources file for each language, the files would be res/values-en/strings.xml and res/values-es/strings.xml respectively.

The content of res/values-en/strings.xml could be:

And the content of res/values-es/strings.xml could be:

And that’s it, now the title of our APP will appear according to the language set on our device.

For iOS

The first thing we need to do is go to the title of our APP, which is located inside ios\Runner\Info.plist

Now let’s create a variable that will allow us to change the title according to the language:

We have named it PRODUCT_NAME.

To change the application name based on the language, we are going to create specific localization files for each language we want to support. In this case, we will create InfoPlist.strings files for English and Spanish.

"CFBundleName" = "My APP";
"CFBundleName" = "My Application";

With these changes, iOS will automatically select the correct application name based on the language of the user’s device.

To set English as the default language, you must ensure that all texts in your application are available in English. If the language of the user’s device is neither English nor Spanish, iOS will use English as the fallback language.

Leave a Comment