use different Locale in kotlin

l want to add language to my app use string , lang English and Arabic . my app is flight schedule for specific airport via data json. and my app working fine with out problem . l want change the language are come from data json to Arabic language

String res in en

<?xml version="1.0" encoding="utf-8"?>
    <string name="schedule">schedule</string>
    <string name="arrival">arrival</string>
    <string name="departed">departed</string>
    <string name="cancelled">cancelled</string>

String res in arabic

<?xml version="1.0" encoding="utf-8"?>
   <string name="schedule">مجدولة</string>
    <string name="arrival">وصلت</string>
    <string name="departed">غادرت</string>
    <string name="cancelled">الغيت</string>


l want use those resources in my list adapte because i used list view in my app

override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {

        val view : View = LayoutInflater.from(context).inflate(R.layout.row_layout,parent,false)

        val code = view.findViewById( as AppCompatTextView
        val status = view.findViewById( as AppCompatTextView
        val TimeFlight = view.findViewById( as AppCompatTextView
        val LogoAriline = view.findViewById( as ImageView

        CallsingID.text = list[position].Callsign
        AirlineID.text = list[position].Airline
        code.text = list[position].code
        status.text= list[position].status
        TimeFlight.text = getDateTime(list[position].TimeFlight)

        return view as View

l want add language inside of status.text= list[position].status

I saw your question when you put it up on StackOverflow, I linked a project (GitHub - andre-artus/ExtendArrayAdapter: Example of one way how to extend an ArrayAdapter in Kotlin) that also demonstrates some localization.

Here is a link to my SO answer:.

And if you combine that with my answer here, then you should be sorted.

 if (context.resources.configuration.locale.language.equals("ar")) {
                 // Set Arabic text here   
                } else {
                    // Set English text here