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. [软件工程基础]Alpha 展示博客

    团队成员 个人简介 个人简介参照团队介绍博客. 个人博客 王嘉睿爵:http://www.cnblogs.com/whynotRW/ 游心:http://www.cnblogs.com/jefhq/ ...

  2. C++文件操作方法小结

    - 获取文件句柄 - fopen, fclose fopen(filename, opentype): 按照opentype的方式打开指定文件,打开失败返回NULL,否则返回文件句柄. 打开类型的属性 ...

  3. 转 MySQL权限管理

    ###sample: #####view all userSELECT user, host from mysql.user;mysql> SELECT user, host from mysq ...

  4. 配置本地和远程maven仓库

    <mirrors><mirror> <id>alimaven</id> <name>aliyun maven</name> &l ...

  5. Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html

    操作数据库的时候,老是提示:Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your ow ...

  6. python Fuction 方法的调用

    def display():#无参数 print("No") return # display() def callfun():#调用 print("2") d ...

  7. js监听页面的scroll事件,当移到底部时触发事件

    //页面拉到底时自动加载更多 $(window).scroll(function(event){ var wScrollY = window.scrollY; // 当前滚动条位置 var wInne ...

  8. BFC(块级 格式化上下文)的理解

    本文转载(https://segmentfault.com/a/1190000013647777) 一.BFC的概念 1.规范解释 块格式化上下文(Block Formatting Context,B ...

  9. 对Yii 2.0模型rules的理解(load()无法正确装载数据)

    在实际开发中,遇到数据表新增字段而忘记了在对应模型中rules规则中添加新增的字段,而导致load()方法装载不到新增字段,导致新增字段无法写入数据库中.   解决办法:在新增字段后及时在对应模型ru ...

  10. 为什么HDFS的副本数通常选择3?

    HDFS采用一种称为机架感知的策略来改进数据的可靠性.可用性和网络带宽的利用率. 在大多数情况下,HDFS的副本系数是3,HDFS的存放策略是一个副本存放在本地机架节点上,另一个副本存放在同一机架的另 ...