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 9072595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:12:24+00:00 2026-06-16T18:12:24+00:00

Right now I’m starting to think about localisation of my ANDROID app. I’m coding

  • 0

Right now I’m starting to think about localisation of my ANDROID app. I’m coding in JAVA and I’m using the ADT environment. The app is supposed to run in German and English once it is finished.
I found quite a few nice tutorial about how to access resources like strings, labels images etc. based on the devices UI.

However, I need to make DECISIONS in my code based on the language the app is running in. Let me give you a brief example of what I’d like to achieve (just as an example) with some pseudo-code:

If ("language-is-german") {

  start an audiostream playing a .wav-file saying "Guten morgen lieber Benutzer!!!";
  Integer intErgebnis = 2 + 4;

}
Else If ("language-is-english") {

  start an audiostream playing a .wav-file saying "Good morning dear user!!!";
  Integer intResult = 2 + 9;

}

The basic idea is to play different sound files (I know that you could also achieve that by pointing to different resources) – but they need to be played in different orders etc. I added the calculation just to show you that I really want to do different things based on the language set up on the user’s computer.

How can I check for that in my code behind (i.e. what do I have to type instead of language-is-german in my pseudo-code above?

  • 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-16T18:12:25+00:00Added an answer on June 16, 2026 at 6:12 pm

    Locale.getDefault() returns the user’s preferred locale.

    Test if its language is equal to Locale.FRENCH.getLanguage() or Locale.GERMAN.getLanguage().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now, I have developed an android app that is available free on the
Right Now I am making a twitter app and I am Using IFTweetLabel. I
Right now I am using sqlite within a ios application, and I want to
Right now, I'm getting information of the currently played song using: MPMusicPlayerController *controller =
Right now I'm thinking about a pattern to have the 'current user' as a
right now I am retrieving images using following piece of code and it is
Right now I am using learning to program for the iphone and I am
Right now I'm working on a Internet Explorer add on which is supposed to
Right now, I am buffering bytes using strings, StringIO, or cStringIO. But, I often
Right now, I'm using: TerminateProcess(pi.hProcess, 0) ... but this doesn't allow the application to

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.