Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8698143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:40:25+00:00 2026-06-13T01:40:25+00:00

I am developing an application which the user can select a language and It

  • 0

I am developing an application which the user can select a language and It will show a message lets say for example “Hello” in a different language.

I have created a spinner.The user will select whatever language he/she wants to translate “Hello”.

Here is my code on selecting items on the spinner. I dont know what to do next. How can I get the values from the folder values-es(Spanish), values-fi(Finnish) and so on.

public void onItemSelected(AdapterView<?> parent, View view, int pos,
        long id) {
    int position = parent.getSelectedItemPosition();
    switch (position) {
    case 0: // English

        break;
    case 1:// Spanish
                     //Display the value on  values-es/strings.xml
        break;
    case 2:// Finnish
                     //Display the value on  values-fi/strings.xml
        break;
    case 3:// French
                     //Display the value on  values-fr/strings.xml
        break;
    case 4:// Protuguese
                     //Display the value on  values-pt/strings.xml
        break;
    default:
        break;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:40:25+00:00Added an answer on June 13, 2026 at 1:40 am

    Use the following code

    Locale locale2 = new Locale("fr"); 
    Locale.setDefault(locale2);
    Configuration config2 = new Configuration();
    config2.locale = locale2;
    getBaseContext().getResources().updateConfiguration(config2,       context.getResources().getDisplayMetrics());
    
     /** Update activity or restart application in order to update resources.**/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application with which user can view files in the
I am developing an application suite that consists of several applications which user can
I'm developing an application which will be storing user sensitive data. My issue is
I am developing an application in which user can purchase any image he likes.
I am developing an application in which user can share messages with his/her Facebook
I am developing an application where the user can tap multiple hit areas which
I am developing one application which needs the gmail user authentication? How can I
I am developing a reporting application where a user can select(and order) reports from
I am currently developing a web application in which the user can download some
I am developing an application which allow user to take photo and can set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.