Changing the emulator locale from the adb shell
To change the locale in the emulator by using the adb shell.

  • Pick the locale you want to test and determine its BCP-47 language tag, for example, Canadian French would be fr-CA.
  • Launch an emulator.
  • From a command-line shell on the host computer, run the following command:
    adb shell
    or if you have a device attached, specify that you want the emulator by adding the -e option:
    adb -e shell
  • At the adb shell prompt (#), run this command:
    setprop persist.sys.locale [BCP-47 language tag];stop;sleep 5;start
    Replace bracketed sections with the appropriate codes from Step 1.
    For instance, to test in Canadian French:

setprop persist.sys.locale fr-CA;stop;sleep 5;start

This causes the emulator to restart. (It looks like a full reboot, but it isn't.) Once the Home screen appears again, re-launch your app, and the app launches with the new locale.

【android】【android studio】修改emulator的本地化环境的更多相关文章

  1. Introducing Visual Studio’s Emulator for Android

    visual studio 2015支持Android开发了. Microsoft released Visual Studio 2015 Preview this week and with it ...

  2. Android必知必会-Android Studio修改包名

    如果移动端访问不佳,请尝试–> Github版 背景 公司做相似产品较多,一般都是以某个产品为基础修改,逐步替换设计图的切图.这个就会导致需要经常为Copy的项目修改包名. 这里是参考一些网上的 ...

  3. 【Android Studio安装部署系列】二十七、Android studio修改项目名称和包名

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 实际项目开发中可能碰到项目名称写错了或者需要修改,而且包名可能也想要修改,那么如何操作呢. 本文是在Android Studio3. ...

  4. Android Studio 修改包名最便捷做法

    Android Studio,咱们开发安卓的利器,自推出就受到移动开发者的追捧,但一路走来,大家谈到他,充满了兴奋之情之余,也略显羞涩.随版本自推出以来,不断完善BUG,但咱们还是深深地踩了进去,说多 ...

  5. android studio 修改新建EmptyActivity默认布局

    https://www.jianshu.com/p/d4f201135097 打开你的Android Sudio安装目录,我的为D:\Program Files\Android\Android Stu ...

  6. Android状态栏颜色修改

    android状态栏颜色修改   状态栏颜色的修改在4.4和5.x环境下分别有不同的方式,低于4.4以下是不能修改的.   5.x环境下 方式一,状态栏将显示为纯净的颜色,没有渐变效果 /** * 状 ...

  7. 张高兴的 Xamarin.Android 学习笔记:(一)环境配置

    最近在自学 Xamarin 和 Android ,同时发现国内在做 Xamarin 的不多.我在自学中间遇到了很多问题,而且百度到的很多教程也有些过时,现在打算写点东西稍微总结下,顺便帮后人指指路了. ...

  8. Android #Android开发环境搭建

    Android #Android开发环境搭建 1.下载:Google在国服的官网 https://developer.android.google.cn/index.html 1.点击首页 “ 获取 ...

  9. android中用studio更改包名

    Android Studio,咱们开发安卓的利器,自推出就受到移动开发者的追捧,但一路走来,大家谈到他,充满了兴奋之情之余,也略显羞涩.随版本自推出以来,不断完善BUG,但咱们还是深深地踩了进去,说多 ...

随机推荐

  1. MySQL数据库 (5)

    --视图,触发器,函数,存储过程,事务,索引

  2. HTML标签的三种类型

    HTML标签的类型分为三种:行内元素,行内块元素,块级元素 而标签的属性是可以转换的 display:inline: 转换为行内元素 display:linline-block 转换为行内块元素 di ...

  3. (转)nginx利用geo模块做限速白名单以及geo实现全局负载均衡的操作记录

    nginx利用geo模块做限速白名单以及geo实现全局负载均衡的操作记录 原文:http://www.cnblogs.com/kevingrace/p/6165572.html Nginx的geo模块 ...

  4. 树莓派连接启动SSH

    树莓派的官方更新消息发布:http://downloads.raspberrypi.org/raspbian/release_notes.txt SSH禁用的启用方法: 2016年11月25日: * ...

  5. EF5 通用数据层 增删改查操作,泛型类

    using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure; using Syste ...

  6. OPEN SQL

    OPEN SQL 1.SELECT .INSERT.UPDATE.DELETE.MODIFYSELECT 命令包含如下从句:SELECT: 需要查询资料库指定表的那些列,是一行还是多行INTO: 查询 ...

  7. MFC CDialog/CDialogEx DoModal ALT

    Questions: I'm using MFC CDialog/CDialogEx to show a modal dialog with DoModal.usually it works with ...

  8. 3D OpenGL ES

    什么是OpenGL ES? OpenGL ES (为OpenGL for Embedded System的缩写) 为适用于嵌入式系统的一个免费二维和三维图形库. 为桌面版本OpenGL 的一个子集. ...

  9. tomcat的work目录不是缓存

    最近发现,很多网友喜欢把tomcat的work目录里的东西叫做缓存,其实那不是很恰当,work目录只是tomcat的工作目录,也就是tomcat把jsp转换为class文件的工作目录,这也正是为什么它 ...

  10. mongodb安全整理

    本文大都网上参考的,我只是整理了一下 一默认配置情况 1.MongoDB安装时不添加任何参数,默认是没有权限验证的,任何用户都可以登录进来,而且登录的用户可以对数据库任意操作而且可以远程访问数据库,需 ...