• LANGUAGES
    • English English
    • Français Français

Sompom Digital Agency

Sompom Digital Agency

Sompom digital agency helps build Web & Mobile applications and games.

T (855) 78 900 736
Email: contact@sompom.com

Sompom Digital Agency
Parkway Square, St 163, Phnom Penh, Cambodia

Open in Google Maps
  • HOME
  • THE COMPANY
    • ABOUT US
    • CAREERS
    • HR OPPORTUNITIES
    • PROCESS
  • OUR EXPERTISE
  • OUR PRODUCTS
    • GAMES
      • Garden family quest, A Match 3 Puzzle game!
      • 1WORD, The best word game ever!
      • Boru the Amazing running Ninja!
      • Shapu, The brain taker!
    • APPLICATIONS
  • CONTACT US
  • MICROBLOGGING
  • Home
  • Android
  • Snippet for changing the language configuration from inside the app?
December 6, 2019

Snippet for changing the language configuration from inside the app?

Snippet for changing the language configuration from inside the app?

by Sompom Team / Friday, 07 August 2015 / Published in Android, Application, development, Mobile, Technology

 Change language in application

A usefull snippet if you want to change the locale of the app without having to go through the settings.

Configuration conf = getResources().getConfiguration();
 conf.locale = new Locale(iso3SupportLanguage[position]);
 DisplayMetrics metrics = new DisplayMetrics();
 WindowManager wm = (WindowManager) getActivity().getSystemService(Activity.WINDOW_SERVICE);
 wm.getDefaultDisplay().getMetrics(metrics);
 getResources().updateConfiguration(conf, metrics);
 Resources resources = new Resources(getActivity().getAssets(), metrics, conf);
 resources.updateConfiguration(conf, metrics);
Tagged under: android, Application, assets, code, configuration, language, local, snippet

What you can read next

Your apps is slow when building multi-dex
Build on IOS running time…too long!!
ANDROID PRODUCT FLAVORS – One project to rule them all

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Daily Technical Note – TEXTURE COMPRESSION MEMO

        Texture Compression with Texture ...
  • 2 collection views in 1 view controller

    The idea: We need to use 2 collection views in ...
  • Build on IOS running time…too long!!

    Hi, Build on IOS running time : too long. The w...
  • ANDROID PRODUCT FLAVORS – One project to rule them all

    What is the problem: First, If I want to build ...
  • Flow Layout in your face.

    There is no native FlowLayout component, so for...
  • About Us
  • Our Expertise
  • Microblogging
  • HR Opportunities
  • Careers
  • Contact Us
  • Privacy Policy
  • EULA

NEWSLETTER SIGNUP

By subscribing to our mailing list you will always be up to date with the latest news from us..

We will never spam!

GET IN TOUCH

T (855) 78 900 736
Email: contact@sompom.com

Sompom Digital Agency
Parkway Square, St 163, Phnom Penh, Cambodia

Open in Google Maps

13 days agoGARDEN FAMILY QUEST is an addicted casual farming game! https://t.co/Qo7T7AeFHf ##indiedev#indiegame#gamedev#puzzle via @Insompom
13 days ago1WORD! The best wordgame ever!! https://t.co/JC1wq5cwnr ##indiedev#indiegame#gamedev#puzzle via @Insompom
13 days agoFollow Sompom Digital Agency https://t.co/Qo7T7AeFHf #indiegame #indiegamedev #ios #webdevelopment via @Insompom
13 days agoFollow Sompom Digital Agency https://t.co/k6uWBLqZCf #indiegame #indiegamedev #ios #webdevelopment via @Insompom
220 days agoAnother great opportunities offer from SOMPOM. We are looking forward to working with who are experienced and pass… https://t.co/pKAknTFq7R
Follow @Insompom
  • Tweet
  • GET SOCIAL
Sompom Digital Agency

© 2016 All rights reserved. Sompom Web and Mobile agency.

TOP