Questions tagged [resourcebundle]

Resource bundles contain locale-specific objects. When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

Resource bundles contain locale-specific objects. When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles. This allows you to write programs that can:

be easily localized, or translated, into different languages handle multiple locales at once be easily modified later to support even more locales Resource bundles belong to families whose members share a common base name, but whose names also have additional components that identify their locales. For example, the base name of a family of resource bundles might be "MyResources". The family should have a default resource bundle which simply has the same name as its family - "MyResources" - and will be used as the bundle of last resort if a specific locale is not supported. The family can then provide as many locale-specific members as needed, for example a German one named "MyResources_de".

Each resource bundle in a family contains the same items, but the items have been translated for the locale represented by that resource bundle. For example, both "MyResources" and "MyResources_de" may have a String that's used on a button for canceling operations. In "MyResources" the String may contain "Cancel" and in "MyResources_de" it may contain "Abbrechen".

If there are different resources for different countries, you can make specializations: for example, "MyResources_de_CH" contains objects for the German language (de) in Switzerland (CH). If you want to only modify some of the resources in the specialization, you can do so.

763 questions
0
votes
1 answer

Lock Embedded Resources in Cocoa

I'm developing on Cocoa using Xcode. I was wondering if there is a way to lock the embedded resources of my app, like logos, images, sounds, ... so nobody can change them?
Abcd Efg
  • 2,146
  • 23
  • 41
0
votes
2 answers

Reload resource bundle in struts2 in Websphere

I have struts.devMode=true in my struts.properties. Which will cause resource bundle to reload each time. But every time when it try to reload it throws exception below. My application is running on websphere 7. Any help will be…
zhumingvictor
  • 109
  • 2
  • 6
0
votes
1 answer

Global Resource Bundle in Struts2

Is it okay to store email in global resource bundle in Struts2 application?
JR Galia
  • 17,229
  • 19
  • 92
  • 144
0
votes
1 answer

java.util.MissingResourceException in Resource bundle

Hello All, I am creating a ResourceBundle to load the property files. My file structure looks like | ---Main | ----ResourceBundleLoad.java | --Resource | --- resourcebundle.properties In normal when i put main class and…
Bathakarai
  • 1,517
  • 6
  • 23
  • 39
0
votes
1 answer

Multiple ResourceBundles with Spring and JSTL

Here's my problem: I want to organize my resource bundle files so that I have the messages in one file and the labels in another. For this I created two .properties files which I declared in my spring configuration files. The actual declaration is…
Daniel Platon
  • 583
  • 7
  • 16
0
votes
2 answers

Specific iPhone/iPad resources for in Universal App

I am building an Universal App, that uses many images. I have optimized the images for iPad and iPhone and my App is using the correct images on the different devices (defined by ~ipad and @2x tags in the files names). But as I can see, all images…
Andre
  • 51
  • 2
0
votes
1 answer

JSF - message bundle always uses default properties file

I cannot get locales to work. System EAR and WAR Glassfish: 3.12 Hibernate 4.2 - jar's on EAR and WAR Mojarra: 2.1.11 Primefaces: 3.3 Omnifaces: 1.1 Property files in source folder: messages_de.properties <- using german language …
djmj
  • 5,579
  • 5
  • 54
  • 92
0
votes
1 answer

Reusing key values in Properties file by overriding ResourceBundle

Can we reuse the key values in Properties files something like below? key1=hello key2=#{key1} world! thanks, Update: Below is the code to override the ResourceBundle that turns key values reusable, public class Messages extends ResourceBundle { …
Jeyan
  • 729
  • 1
  • 14
  • 27
0
votes
1 answer

GWT resource bundle priority

I have a GWT application which uses a style sheet which is defined in a resource bundle and the injected into my main entrypoint as follows: MyResources.INSTANCE.main().ensureInjected(); I then also have another stylesheet that I make use of which…
Clinton Bosch
  • 2,497
  • 4
  • 32
  • 46
0
votes
2 answers

Correct java.util.ResourceBundle Organization

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 +…
naugler
  • 1,060
  • 10
  • 31
0
votes
2 answers

Overriding JSF's default I18N handling

Like the asker of the question here Variable substitution JSF Resource Bundle property file I'm slightly aghast at the inability to reference the value of other property keys in the message bundle. Although I see how easy to write my own rubbish…
solidgoldpig
  • 117
  • 2
  • 13
0
votes
1 answer

Maven - Excluding Resource from a specific artifact

I'm new to maven, and found myself stuck with something which is really bothering me. I have a multi-module project, and my parent pom.xml contains the following plugin:
Meny Issakov
  • 1,400
  • 1
  • 14
  • 30
0
votes
2 answers

Can I add Twitter-Bootstrap styles only to original GWT components

I need to add Twitter's Bootstrap styles to existing GWT component... I found more than one project but all of them creates new custom components for that purpose... I need to stick with GWT standard components and have my app L&F looks like…
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
0
votes
3 answers

How should I send resourcebundle messages across controllers in spring mvc?

Most of the spring tutorials and examples show you how to get the message from the resource file and how to show it in your view (jsp), but not how you should handle those messages in your controller and between views. Here is an example of how im…
Tommy
  • 4,011
  • 9
  • 37
  • 59
0
votes
1 answer

Copy bundle resources

I'm programming on objective-c. I've removed all files from MyTarget -> Build Phases -> Copy Bundle resources. How can I return it because my project doesn't work?
Sveta
  • 1,270
  • 3
  • 16
  • 33
1 2 3
50
51