2

By calling PermissionInfo#loadLabel(PackageManager pm), we can get the text description of a permission. Tracing this callsite, it then calls the pm.getText(String packageName, int resId, ApplicationInfo appInfo) to get the translated string for the resId in current device locale. Anyone know ways to get the translated string for resId in another locale? how to tell packageManager to use another locale other than device locale?

user2060386
  • 345
  • 3
  • 11

1 Answers1

0

You could set the default locale programatically as follows:

Locale.setDefault(new Locale("de"));