How to add multiple language support to android application using Kotlin 2020.

  Рет қаралды 1,529

TechGuyNaresh

TechGuyNaresh

Күн бұрын

Пікірлер: 11
@siddharthaghosal3733
@siddharthaghosal3733 3 жыл бұрын
You are Great! the code just works flawlessly. I did a mistake initially by passing language name as "bn-rIN", however it should be only "bn" in the array list. Thanks Mate for the tutorial and demo :-)
@TechGuyNaresh
@TechGuyNaresh 3 жыл бұрын
Glad to help you!
@sat_talk
@sat_talk 3 жыл бұрын
Thanks bro.. just want confirmation, likewise can I use Marathi, Gujarati, any language?
@TechGuyNaresh
@TechGuyNaresh 3 жыл бұрын
Happy that you liked it, yes you can add any languages as long as you have the translations. Just maintain the string values syntax like for Hindi -> value-hi and for Telugu -> value-te etc...
@tampankami7185
@tampankami7185 4 жыл бұрын
i want implement this code into fragment not at mainactivity how?
@TechGuyNaresh
@TechGuyNaresh 4 жыл бұрын
Hi tampan, I don't have played with fragments, but you can try onAttache() set language preference like "myPreference.setLoginCount(languageList[spinner.selectedItemPosition])".
@tarikbarucija9524
@tarikbarucija9524 3 жыл бұрын
Why does this not work on android version 5.0
@TechGuyNaresh
@TechGuyNaresh 3 жыл бұрын
Android minSdkVersion changed from 21 to 24. What this means, is that Android 5 and 6 are not supported anymore, and Android 7+ is required.
@MarioEugenioExcel
@MarioEugenioExcel 4 жыл бұрын
How to change the language in all activities?
@TechGuyNaresh
@TechGuyNaresh 4 жыл бұрын
You have to use following function in all activities: override fun attachBaseContext(newBase: Context?) { myPreference = MyPreference(newBase!!) val lang:String = myPreference.getLoginCount() super.attachBaseContext(MyContextWrapper.wrap(newBase, lang)) }
@TechGuyNaresh
@TechGuyNaresh 4 жыл бұрын
Or you can refer my source code, link is in discription.
Add Multiple Languages in Android App | Kotlin Android Studio
23:21
Parho Likho CS
Рет қаралды 21 М.
Support Multiple Languages in Android App | Java Tutorial
20:08
Awesome Designer
Рет қаралды 2,2 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Run android studio app on any MI phone
5:43
DevNerd
Рет қаралды 60 М.
SHOCKING Galaxy S25 News: Samsung Abandons Its OWN Chips!
10:26
Shared Preferences in Android Studio using Kotlin | Android Knowledge
11:46