How to use the Class in which the text is stored. For 3 languages? Android
There is a class
public final class Astro{ String A="asdads"; String B="CCACA"; } I need to add all the text from this class to the resources, and then just leave links to resources so that when the language changes, the text changes to need me.
I cannot use getResource because this class is static and it does not have a Context .
public final class Constants { public static final String REGISTER_PAY_SUM = "pay sum"; public static final String CATEGORY_RESPONSE = "category response"; public static final String COURSE_ID = "courseId"; public static final String SUBCATEGORY_ID = "subcategory id"; public static final String JSON_FILE_NAME = "json file name"; public static final String SUBCATEGORY_NAME = "subcategory name"; public static final String CHAPTER = "chapter"; public static final String LESSON_ID = "lesson id"; public static final String QUIZ_ITEM = "quizItem"; public static final String QUIZ_COUNT = "quizCount"; public static final String SEARCH_QUERY = "search query"; public static final String NUM_OF_QUESTION = "numOfQuestion"; public static final String ANSWER_ID = "numOfAnswer"; public static final String USER_TOKEN = "userToken"; } public class BaseApp extends Application { public static Context context; @Override public void onCreate() { super.onCreate(); context=getApplicationContext(); } }