💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
MHSDK目前支持中文和英语两种语言 MHSDK currently supports both Chinese and English 可以通过在Application和Activity中修改context中的语言配置来切换语言,由于Appliction和Activity中获取的context是不同对象 所以都需要修改 You can switch languages by changing the language configuration of the context in Application and Activity, which need to be changed because the context obtained in Application and Activity are different objects 示例代码如下: Example code is as follows: ~~~ Resources resources = getResources(); Configuration config = resources.getConfiguration(); DisplayMetrics dm = resources.getDisplayMetrics(); config.locale = Locale.ENGLISH; resources.updateConfiguration(config, dm); ~~~