更改区域设置,但保持从左到右和其他手机方向 [英] Changing Locale but keep left-to-right and other phone orientations

查看:68
本文介绍了更改区域设置,但保持从左到右和其他手机方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以使用两种语言的应用程序-英语和希伯来语.

I have an app that is available in two languages - English and Hebrew.

我使用转换编辑器,我正在根据用户选择更改语言环境.

I added Hebrew strings using the Translation Editor and I am changing the Locale according to the user selection.

更改语言环境时,它会像我想要的那样将字符串设置为希伯来语,但同时也会将希伯来语的工具栏方向更改为从右到左并带来标题和右侧的后退按钮.

When changing the Locale, it sets the strings to Hebrew like I wanted, but its also changes the toolbar orientation to right-to-left for Hebrew and brings the title and back-button to the right.

英语语言环境(默认):

希伯来语区域设置:

是否可以保持工具栏方向像英语一样? 我想将后退按钮标题保留在工具栏的左侧.

Is there a way to keep the toolbar orientation like the English one? I want to keep the back button and the title in the left of the toolbar.

编辑:将android:layoutDirection="ltr"android:supportsRtl="false"添加到toolbar xml后.箭头向后.如何解决?

after adding either android:layoutDirection="ltr" or android:supportsRtl="false" to the toolbar xml. arrow is backwards. how ti fix it?

推荐答案

更改语言环境,但保持从左到右和其他手机方向

Change Locale but keep left-to-right and other phone orientations

具体来说,将android:supportsRtl="false"添加到清单文件中的<application>元素中.

Specifically, add android:supportsRtl="false" to the <application> element in your manifest file.

有关更多信息,请 链接

For more information Link

这篇关于更改区域设置,但保持从左到右和其他手机方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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