I don't know why that's happening, but I've seen it as well. Have you tried using an essentially empty tiles_en.xml? It might have the same effect as the ApplicationResources_en.properties. I would assume it would need to be a well formed, but empty xml document. (*Chris*)
On Wed, Jul 23, 2008 at 1:07 PM, Pierre Thibaudeau <[EMAIL PROTECTED]> wrote: > Using Struts 2.1.2 > My browser (Firefox 3) has a prefered locale (and only one): fr_CA > Struts2 constant: struts.locale=en_US > > I use i18n throughout the software. > There is a "default" resource (whose content happens to be in > English): ApplicationResource.properties. > There are also resource bundles in 4 languages: > ApplicationResources_fr.properties, > ApplicationResources_it.properties, > ApplicationResources_de.properties, > ApplicationResources_es.properties. > > Until last week, there was no English resource file (since the default > one was taking care of it). > That strategy worked perfectly in Struts1, but it seems that in > Struts2, the system has a mind of its own: > given my browser's preference, the default bundle (on my system) seems > to be ApplicationResources_fr.properties insteand of > ApplicationResources.properties... > > I solved that by creating an empty ApplicationResources_en.properties, > and everything fell back into place: English pages display in > English, while German pages display in German (when German is > available) and in English (when not available). Great. (I don't > understand why creating an empty ApplicationResources_en.properties > would ensure missing German resources to be displayed in English > rather than in French, but what matters is that it now works.) > > A new problem arises when I wish to localize an entire page using > Tiles2. For the pages containing paragraphs and paragraphs of static > text, it is easier to maintain localized tiles, than localized > resource messages. Therefore: > I have one general Tile definition file: tiles.xml > and four localized ones: tiles_fr.xml, tiles_it.xml, tiles_de.xml, > tiles_es.xml > > And this is where a new version of the earlier problem surfaces... > > Since I have not yet had time to translate every single static page in > every single available language, I would like to revert to some > default English when the localized version is unavailable. That's > what tiles.xml is for, yet I presently get served the French version > by default. I understand the logic: if my browser gives French as > the preferred language, it's reasonable to assume that I would be > happy to cope with that language. Indeed I would. But looking at the > Italian version of my site may now give me a Neapolitan-combo with > three languages: > * Italian for the bits that have been translated, > * English for the _messages_ that have not been translated in Italian, > * and French for the _static tiles_ (according to tiles_fr.xml). > > That's a little Byzantine. > A Russian salad, as we'd say in French. > A smörgåsbord, if you will. > > Have I, as the developer, got control over what "default" version the > user is going to see? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]