具体的语言环境启动应用程序 [英] Launch app with specific locale

查看:101
本文介绍了具体的语言环境启动应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更改为一个设备的语言环境,在设置完成后,并不能由应用程式AFAIK来完成。
我知道如何强迫我自己的应用程序到一个特定的区域,例如描述这里:

Changing the locale for a device is done in the settings, and can't be done by an app AFAIK. I know how to force my own app to a specific locale, described e.g. here:

<一个href=\"http://www.tutorialforandroid.com/2009/01/force-localize-application-on-android.html\">http://www.tutorialforandroid.com/2009/01/force-localize-application-on-android.html

所以现在我的问题。我可以强制,编程,当地的活动,是不是我的?

So now to my question. Can I force, programatically, the local of an activity that isn't mine?

我可以想像两种方式,这可能是可能的:

I can imagine 2 ways this could be possible:


  1. 指定的区域设置在用于启动该活动的意图。

  2. 访问和操作运行活动的配置(以同样的方式,我可以修改我自己的活动配置)。

有什么想法?可能吗?是否合理?
我猜2.会更直接,但需要某种权限(例如修改atcitiy必须允许它在清单文件)。但我会满足于1或类似的。

Any thoughts? Is it possible? Is it reasonable? I guess 2. would be more direct, but require some kind of permission (e.g. the modified atcitiy must allow it in the manifest file). But I'd settle for 1. or similar.

我要的是能够看到不同语言的某些应用,而不是更改系统语言环境。例如。 Android Market中只显示一种语言注释。可没想到其他的事情现在。

What I want is to be able to see certain apps in a different language, but rather not change the system locale. E.g. the Android Market, that only displays comments in one language. Can't think of other things right now.

找不到多少写在区域设置的文档中,是什么,是不可能的。但希望一些未公开的特性可能使这样的:)

Can't find much written on Locale in the documentation, what is and isn't possible. But hoping some undocumented feature might enable this :)

推荐答案

您不能,除非你正在调用该活动接受一个特殊的区域设置参数。

You can't unless the activity you are calling accepts a special locale parameter.

所以,你可以用两个自己的应用程序中实现这一点,或与您的朋友的应用程序,但有这样做的没有通用的方法。

So, you can implement this with two of your own apps, or with the app of your friend, but there's no general way of doing this.

这篇关于具体的语言环境启动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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