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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:59:44+00:00 2026-06-12T17:59:44+00:00

I have an app with some localization made by adding folders like values ,

  • 0

I have an app with some localization made by adding folders like values, values-es, values-ru etc. In every folder I have file named strings.xml with, guess what, strings.
Some of them need to be in all languages, but some needed just in one for inner needs of the app. But if there is a string in values/strings.xml that is missing in other versions of this file, it causes an error. I tried to add one more file with

<resources>
    <string name="key">Value</string>
     ...
</resources> 

with different name, like values/additionalStrings, but it didn’t worked. So I just copied all the strings in all the files to fix the app. But how can I avoid it and store some extra strings in separate .xml?

Additional part of the question:
Also, if it is possible (I guess, it is) to store some more info like

 <resources>
        <customObject name="myName">
           text = "Value"
           extraField = 3.14
        </customObject >
         ...
 </resources>

in custom xml and get it via usual R.filename.objectName.subFieldName, it would be awesome. How can I do it?

  • 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-12T17:59:45+00:00Added an answer on June 12, 2026 at 5:59 pm

    The types of Strings you want to store here are not XML, so it doesn’t really make sense to try to store them inside an XML file. Android is not going to parse the inner contents of an element and make constants in the R file based on what it finds.

    An alternative approach would be to store your file as plain text, or some other format, like JSON, and put the file in theraw folder in your application. Then, you can read it using openRawResource(), and parse it however you need to.

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

Sidebar

Related Questions

I have localization in my app(english,spanish,italian).The client sent me strings files but some characters
I have a rails app with some nested data that I'd like to export
in my app I have some text.setTextColor(Color.GRAY) . Now I would like to use
I have a universal app with some localization. My problem is about splash screens.
I have blackberry app (java). My app stores some informations in files (file:///store/home/user/app_name/). When
I have implemented some app preferences for my app. For strings they work great
I have an app that records some data (time, user’s gps position etc). Now
I have question. I have some app on facebook and getting this error Fatal
I have an app which contain some images in res/drawable/ and shows them in
I have an app which generates some files in the app directories I need

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.