0

I try to make multilingual app for Android, but there's no Finnish or Swedish language in Locales.

What's wrong?

I also tried to use Locale.forLanguageTag("se") But it didn't work on my Samsung Galaxy SII.

https://i.stack.imgur.com/nSUVo.png

Vmaatta
  • 23
  • 3

1 Answers1

1

It is not wrong, it simply does not exist.

http://developer.android.com/reference/java/util/Locale.html

Massimo
  • 3,436
  • 4
  • 40
  • 68
  • Oh. Is there any way to make Swedish app? – Vmaatta Jun 10 '15 at 07:35
  • Sure, create different "strings.xml" files, one for each language you need to support. http://developer.android.com/training/basics/supporting-devices/languages.html Android Studio helps you. When you create a new resource you can assign it to a particular configuration (language, screen size, resolution, etc). Final devices will take the right resource automatically ;) – Massimo Jun 10 '15 at 07:38
  • For Finnish create the directory "values-fi", for Swedish "values-sv". Or better let Android Studio to create them for you – Massimo Jun 10 '15 at 07:43
  • Yes, I already got that right, but I also want to change language from the application. – Vmaatta Jun 10 '15 at 07:43
  • You should be able to do that. See this answer http://stackoverflow.com/questions/2900023/change-language-programatically-in-android Create a new Locale by passing "fi" or "sv" and using it as the answer says (it is not important to have the constant Locale.SOMETHING) – Massimo Jun 10 '15 at 07:46