单独的APK中的语言资源? [英] Language resources in separate APK?

查看:50
本文介绍了单独的APK中的语言资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以创建一个仅包含特定于语言的字符串的单独APK文件,并以某种方式说服我的程序尝试首先从该程序包的资源中读取字符串资源,然后再从程序自身的资源中读取字符串资源...我希望有一个带有2-3个市长语言的主程序,而其他语言将合并到一个单独的语言包中. (这是为了使主程序的大小保持较小,因为我已经进行了12次翻译)

I'm wondering if it is possible to create a separate APK file which contains only language specific strings and somehow persuade my program to try to read the string resources first from that package's resource and then from the program's own resources... I would like to have a main program with 2-3 mayor laguages and the rest of the languages would go into a separate language pack. (This is to keep the main program size small as I have already 12 translations)

推荐答案

您可以通过PackageManagergetResourcesForApplication()访问另一个APK的资源.这样您就可以访问这些字符串.

You can access another APK's resources through the PackageManager and getResourcesForApplication(). That will allow you to access those strings.

这篇关于单独的APK中的语言资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆