单独的 APK 中的语言资源?

发布于 2024-08-29 17:10:08 字数 165 浏览 3 评论 0原文

我想知道是否可以创建一个单独的 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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瞎闹 2024-09-05 17:10:08

您可以通过 PackageManagergetResourcesForApplication() 访问另一个 APK 的资源。这将允许您访问这些字符串。

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

ι不睡觉的鱼゛ 2024-09-05 17:10:08

查看此教程页面以了解如何使用图书馆资源 - 它可能会帮助您实现共享资源模型。请注意,由于某种原因,android SDK 2.0 和 1.5 之前版本无法创建库。 http://developer.android.com/guide/developing/eclipse- adt.html#libraryProject

Look at this tutorial page for using library resources - it may help you acheive a shared resources model. Note that android SDK 2.0 and pre-1.5 are not capable of creating libraries for some reason. http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文