UIAccessibility默认语言整个应用程序 [英] UIAccessibility default language throughout the app

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

问题描述

我们正在开发一个仅在德语中进行本地化的应用,并且希望为其添加辅助功能。由于 accessibilityLabel 是德语,不管用户的默认系统语言是什么,总是用德语阅读它是很好的。

We're working on an app that's localized only in the German language and want to add accessibility feature to it. Since the accessibilityLabels are in German, it would be great to always read it in German, regardless of what the user's default system language is.

我注意到可以用 accessibilityLanguage 属性设置。但它需要重复在每个控件上设置。

I noticed one can set that with the accessibilityLanguage property. But it needs to be set on each control repeatedly.

有没有办法为应用程序中的每个控件全局设置辅助功能语言?

Is there any way to set the accessibility language once globally for every control in the app?

推荐答案

在发布问题后不久发现了一个方法! :)

Just found out a way shortly after posting the question! :)

可以直接在上设置 accessibilityLanguage UIApplication AppDelegate 中。例如,在 application:didFinishLaunchingWithOptions:

You can set accessibilityLanguage directly on UIApplication in AppDelegate. For example, in application:didFinishLaunchingWithOptions:,

application.accessibilityLanguage = @"de";

它将应用于所有控件。已在iOS 7上测试。

And it will be applied to all the controls. Tested on iOS 7.

这篇关于UIAccessibility默认语言整个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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