美文网首页Google的搬运工
Android语言和文化适配

Android语言和文化适配

作者: Anonymous_NO1 | 来源:发表于2017-12-27 19:05 被阅读0次

https://developer.android.com/training/basics/supporting-devices/languages.html

Create Locale Directories and Resource Files

To add support for more locales, create additional directories inside res/. Each directory's name should adhere to the following format:

<resource type> -b+<language code>[+<country code>]

adhere vi. 坚持;依附;粘着;追随

为了国际化,需要在res/文件夹下创建不同文件夹,需要遵循如下格式。

例如

punctuation n. 标点;标点符号

Languages such as Arabic, Hebrew, Persian, and Urdu are written in an RTL direction overall. Some of their elements, however, such as numbers and embedded LTR text, are written in the LTR direction within the otherwise RTL text. Languages that use LTR scripts, including English, are also bidirectional because they can contain embedded RTL scripts that need to be displayed in an RTL direction.

Arabic n. 阿拉伯语

scripts n. 原稿,手稿(script的复数形式)

bidirectional adj. 双向的;双向作用的

embedded adj. 嵌入式的;植入的;内含的

阿拉伯等一些国家的文字是从右到左的,但是其中的以下数字等却是从左到右的,英语是从左到右的,但是其实也是双向性的,因为有时候也要包含一些从右到左的语法

解决方法

To solve this problem, use the unicodeWrap() method, found in the BidiFormatter class, on every piece of text that you insert into a localized message. The only times when you shouldn't use unicodeWrap() include the following:

1.The text is being inserted into a machine-readable string, such as a URI or a SQL query.

2.You already know that the piece of text is properly wrapped.

String mySuggestion = "15 Bay Street, Laurel, CA";

BidiFormatter myBidiFormatter = BidiFormatter.getInstance();

// The "did_you_mean" localized string resource includes

// a "%s" placeholder for the suggestion.

String.format(R.string.did_you_mean,        

myBidiFormatter.unicodeWrap(mySuggestion));

respectively adv. 分别地;各自地,独自地

specific adj. 特殊的,特定的;明确的;详细的;[药] 具有特效的

 legacy apps 老版本的app

logic n. 逻辑;逻辑学;逻辑性

demonstrates 示范

相关文章

  • Android语言和文化适配

    https://developer.android.com/training/basics/supporting-...

  • App适配

    语言适配屏幕适配版本适配 语言适配 在包含文字的UI中,最好将文字与代码分离开。Android为我们提供了一个re...

  • android 语言适配

    在做应用内选择语言的时候,会碰到有时会出现当系统选择简体时,应用选择繁体,一开始切换时都是会是繁体,但当应用退出之...

  • Android 国际化(语言适配)

    一、前言: Android 文件夹适配多国语言包 二、特别注意: 以下几种语言使用时,Android与ISO 63...

  • Android 适配总结

    Android设备多,品牌多,尺寸多,系统版本分布大,碎片化严重。Android的适配包括系统的适配和屏幕的适配等...

  • 招行一网通集成

    话说这一网通的api和说好的完全不一样啊,封装何在,android 本地适配何在,语言适配还要自己注意,居然默认是...

  • Android屏幕适配-应用篇

    目录 Android屏幕适配-基础篇Android屏幕适配-应用篇 Android屏幕适配最主要的原因:  是由于...

  • Android Q适配(4)-------针对后台 Activi

    Android Q适配(1)-------图标篇 Android Q适配(2)-------定位篇 Android...

  • 安卓:日常开发屏幕适配总结

    Android 屏幕适配方案Android多分辨率适配框架Android 屏幕适配之dimens(上线项目中实际应...

  • Android屏幕适配(三)

    在看到本文之前,如果读者没看过笔者的前文Android屏幕适配知识和Android屏幕适配(二),请先翻阅。 三、...

网友评论

    本文标题:Android语言和文化适配

    本文链接:https://www.haomeiwen.com/subject/ixxpgxtx.html