Finnish translation for Android

I recently received new translations for Finish for my Android application project.
I noticed that the resource folder is named: values-fi-fi-FI.
I would have expected values-fi according to ISO 639-2 Language Code List - Codes for the representation of names of languages (Library of Congress) and アプリのリソースの概要  |  Android デベロッパー  |  Android Developers.

My project is configured like this:

files:
  - source: /app/src/main/res/values/preferences.xml
    translation: app/src/main/res/values-%two_letters_code%-%locale%/%original_file_name%
  - source: /app/src/main/res/values/strings.xml
    translation: app/src/main/res/values-%two_letters_code%/%original_file_name%
1 Like

Here are Crowdin codes, Language Codes | Crowdin Developer Portal
For the android they should be like

|%android_code%|Android Locale identifier used to name “values-” directories|
|%osx_code%|OS X Locale identifier used to name “.lproj” directories|
|%osx_locale%|OS X Locale used to name translated resources (i.e. uk, zh-Hans, zh_HK)|
|%original_file_name%|Original file name|
|%file_name%|File name without extension|
|%file_extension%|Original file extension|
|%original_path%|Use parent folders’ names in your project to build the file path in the resulting archive|

Example for Android projects
/values-%android_code%/%original_file_name%

1 Like

You’ll need to change pattern in sources - settings of file - change patter + in your configuration

Thank you. I will give it a try.

Interesting that nobody pointed this out when I discussed my configuration earlier:

Are these placeholders new?

It happens because you have two language placeholders in your translation pattern app/src/main/res/values-%two_letters_code%-%locale%/%original_file_name% - %two_letters_code% and %locale%, so during the export, these placeholders are replacing with the fi and fi-FI values.

Just try updating your pattern with the following: app/src/main/res/values-%two_letters_code%/%original_file_name%.

Before the next translation download, be sure that this pattern is also updated in the File Settings in your Crowdin project (Resulting file after translations export)

1 Like

I am a bit surprised about your suggestion. I would have tried %android_code% instead. Why would I stick to what you wrote?

These placeholders are not new, they have always existed in file settings - translation path. Or in CLI configuration.

%locale% is simply the most popular and the easiest one, never confuses anyone. Even not developer can handle them without a problem. Android code works for Android only, and the point is, not all users who call their project as Android uses pure Android inside. Even my team works with .json and then they are converted outside of Crowdin.

Still changing patterns is like 2 minutes work, you wouldnt lost too much time and can always comeback to previous set up if new path doesnt work well

I see. In my case the project is pure Android.

I wonder what happens if I either change the language placeholder in the web interface or in the configuration file in the repository.

Will the finnish file be automatically recreated or renamed in the integration branch?

Both should be changed, otherwise it will not work

1 Like