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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:51:03+00:00 2026-06-07T15:51:03+00:00

I have an internationalized project with many modules. Each module has its own set

  • 0

I have an internationalized project with many modules. Each module has its own set of bundles:

- database-module
    + com_naugler_project_database.properties
    + com_naugler_project_database_fr.properties
- mapping-module
    + com_naugler_project_mapping.properties
    + com_naugler_project_mapping_fr.properties

However, many of the internationalized terms are redundant (such as ‘OK’ or ‘Cancel’) and I would like have these terms in one place for easier maintenance and development.

I found this helpful explanation of ResourceBundle inheritance, but it appears as though a (not?) common ancestor would not be internationalized properly because:

- common-module
    + com_naugler_project.properties
    + com_naugler_project_fr.properties          <-- this is not an ancestor
- database-module
    + com_naugler_project_database.properties
    + com_naugler_project_database_fr.properties <-- of this

Am I way off base with my bundle organization? What is the right way to provide a common internationalized ancestor?

  • 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-07T15:51:05+00:00Added an answer on June 7, 2026 at 3:51 pm

    What you want seems to be the hierarchy of Resources, that is, you probably want one class to derive from over (or being composed of some specific part and some common part).

    Basically, ResourceBundle was not designed for it, and you are on your own.

    But you want some advice, I suppose.

    • Make sure that common terms are really common. That is things like “OK”, “Cancel”, “Next >”, “< Previous”, “Open”, “File”, etc. will have common translations in their context. I mean it is fairly safe to translate such standard items only once, but if you want to use them in different context, you still need another entry. Why? Because “Open” button translation would be different than “Open” dialog title translation in quite a few languages.

    • Move all the .properties files to one place (for example a directory called “resources”). Of course module-specific files should be separated to different subdirectories…

      • Create a resource factory that will return an instance of the ResourceBundle class (or your own Facade – this approach will actually let you share some common bundle).
    • The good practice for large applications is to create some Language Pack, that is to separate language resources to their own directories (i.e. /resources/en, /resources/fr, /resources/zh-Hans). The problem with this approach, however would be the fact that you would need to implement resource fallback by yourself (with the aid of an article you mention in the question, the hierarchy is actually resource loading hierarchy). That means some special cases like falling back from language tag “nb” to “no” but not falling back from “nn”; falling back from “zh-CN” and “zh-SG” to “zh-Hans” and then to “zh” but falling back from “zh-HK” and “zh-TW” and “zh-MO” to “zh-Hant” and then to your default language, not falling from “pt-BR” to “pt” (falling back to default language instead).

    Seems like a lot of work? Well, but the maintenance work afterwards would be minimal.

    One thing might come in handy PropertyResourceBundle have two constructors that will let you load whatever properties file you want, namely: PropertyResourceBundle(InputStream stream) and PropertyResourceBundle(Reader reader). Honestly, in large projects standard ResourceBundle mechanism has too many limitations, so you really need your own resource access layer…

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

Sidebar

Related Questions

Like many i have internationalized my app. On the simulator I am able to
I have to internationalize (i18n) a django project. It's combined of many in house
So I have a site that I have internationalized. On my header I have
I've got an internationalized iPhone project. In the various ${lang}.lproj/InfoPlist.strings files I've got a
My JSF2 application is fully internationalized, using a ResourceBundle. Now i have a lot
I have an application that has lessons on British accent. This is for people
I'm pulling some internationalized text from a MS SQL Server 2005 database. As per
I have a django project that uses a worker process that sends emails to
I have an ASP.NET3.5 (C#) ASPX page that is internationalized in 10 different languages.
So here is the scenario. I have an internationalized application using .NET MVC in

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.