单独的APK中的语言资源?

编程入门 行业动态 更新时间:2024-10-23 19:27:08
本文介绍了单独的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)

推荐答案

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

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

更多推荐

单独的APK中的语言资源?

本文发布于:2023-11-12 03:45:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580420.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:语言   资源   APK

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!