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

  • Home
  • SEARCH
  • 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 3283840
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:05:14+00:00 2026-05-17T20:05:14+00:00

Assume an application that has some locale-based raw resources. But the resources are not

  • 0

Assume an application that has some locale-based raw resources. But the resources are not “corrensponding” to each other – one locale has less resources than another one. Application stores it’s state when closed.

So, user can launch the application in one locale, close it (app remembers its state), then user changes phone locale, and restores the application. App tries to retrieve raw resource, but fails, because some information in that raw resource is missing due to another locale.

The question is: how to store current locale when closing the application?

I know about java.util.Locale, but how can I put Locale to the Bundle?
Can I rely on getLanguage()?

  • 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-05-17T20:05:15+00:00Added an answer on May 17, 2026 at 8:05 pm

    You can store current locale info into Preference when user close app.

    Following is the sample code of how to access current local:

    public class Activity() {
        public getLocal() {
            return getResources().getConfiguration().locale;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that has been running fine for quite awhile, but recently
Assume I have a business object that has some properties that should be read-only.
Assume your application consists only of one war file. My understanding is, that any
We have an application that, amongst many other things, has an export to Excel
All articles I've read about localization of a WinForms application assume that I already
Assume I have a application that stores data,gets data and processes data and stores
assume that i start coding an application from scratch, is the best way to
Assume that we have N erlang nodes, running same application. I want to share
I am writing a web application on Asp.Net MVC 3. Assume that we have
Assume i have a custom Windows application written in C#. This application has only

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.