diff --git a/app/src/main/java/com/mxt/anitrend/base/custom/pager/BaseStatePageAdapter.java b/app/src/main/java/com/mxt/anitrend/base/custom/pager/BaseStatePageAdapter.java index 5dd07776d..019a0d209 100644 --- a/app/src/main/java/com/mxt/anitrend/base/custom/pager/BaseStatePageAdapter.java +++ b/app/src/main/java/com/mxt/anitrend/base/custom/pager/BaseStatePageAdapter.java @@ -1,6 +1,7 @@ package com.mxt.anitrend.base.custom.pager; import android.content.Context; +import android.content.res.Configuration; import android.os.Bundle; import androidx.annotation.ArrayRes; @@ -8,6 +9,9 @@ import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; +import com.mxt.anitrend.extension.KoinExt; +import com.mxt.anitrend.util.Settings; + import java.util.Locale; /** @@ -27,7 +31,9 @@ public BaseStatePageAdapter(FragmentManager fragmentManager, Context context) { } public void setPagerTitles(@ArrayRes int mTitleRes) { - mTitles = context.getResources().getStringArray(mTitleRes); + Configuration configuration = new Configuration(context.getResources().getConfiguration()); + configuration.setLocale(new Locale(KoinExt.get(Settings.class).getUserLanguage())); + mTitles = context.createConfigurationContext(configuration).getResources().getStringArray(mTitleRes); } public String[] getPagerTitles() {