企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
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); ~~~