From: Martin Gregorie on
On Thu, 27 May 2010 13:37:39 -0400, Rhino wrote:

> The DATA on the resume is all stored in a ResourceBundle, including my
> name, email address, job target, experience and all of that. The labels
> used to present that information, like "Job Target", "Formal Education"
> etc. are likewise stored in the same ResourceBundle.
>
Since you seem likely to want to generate language-specific resumes I
think there's a case for breaking up the resource bundle into one locale-
independent one, which holds all items that are constant no matter what
language is being used, e.g. your name, address, date of birth, etc, and
a set of locale-dependent bundles which would contain information which
is locale-dependent such as language-specific headings and boiler-plate
as well as locale-dependent formatting for dates, time, money, etc.

With this approach you don't end up copying invariant data into multiple
resource bundles and running the risk of forgetting to update them all.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
From: Jean-Baptiste Nizet on
On 27 mai, 21:16, Martin Gregorie <mar...(a)address-in-sig.invalid>
wrote:
> Since you seem likely to want to generate language-specific resumes I
> think there's a case for breaking up the resource bundle into one locale-
> independent one, which holds all items that are constant no matter what
> language is being used, e.g. your name, address, date of birth, etc, and
> a set of locale-dependent bundles which would contain information which
> is locale-dependent such as language-specific headings and boiler-plate
> as well as locale-dependent formatting for dates, time, money, etc.
>
> With this approach you don't end up copying invariant data into multiple
> resource bundles and running the risk of forgetting to update them all.
>

This isn't necessary. You just have to place all the locale-
independent items in the base resource bundle (the one without any
locale at the end), and the locale-dependent items in each of the
locale-specific bundles.

Example :

myBundle.properties :
# invariant : no need to redefine in locale-specific bundles
lastName=Rhino
firstName=John

# default if not defined in locale specific bundle
dateOfBirth=1st May, 1975

myBundle_fr.properties :
# dateOfBirth redefined for French
dateOfBirth=1er mai 1975

When you'll ask for the value associated with the key "firstName",
using the locale "fr", the myBundle_fr resource bundle will fall back
to its parent myBundle resource bundle, because it doesn't have the
key.

No need for two separate set of bundles for this.

JB.
From: Rhino on

"Jeff Higgins" <oohiggins(a)yahoo.com> wrote in message
news:htmf06$4bn$1(a)news.eternal-september.org...
> On 5/27/2010 1:37 PM, Rhino wrote:
>
>> That's the gist of it.
> <http://groups.google.com/group/comp.lang.java.programmer/msg/154ffc8e2c0e0cba?hl=en>

I think you may have misunderstood my remark. The code I posted was REAL
code that compiles and was lifted from the class. I didn't provide all of
the code since it was very repetitive and it seemed pointless to show the
repetition. That's what I meant when I said it was the gist: not that it was
pseudo-code but that it was an excerpt. Sorry if my poor phrasing gave you
the wrong impression....

--
Rhino


From: Rhino on

"Martin Gregorie" <martin(a)address-in-sig.invalid> wrote in message
news:htmgf2$hg2$1(a)localhost.localdomain...
> On Thu, 27 May 2010 13:37:39 -0400, Rhino wrote:
>
>> The DATA on the resume is all stored in a ResourceBundle, including my
>> name, email address, job target, experience and all of that. The labels
>> used to present that information, like "Job Target", "Formal Education"
>> etc. are likewise stored in the same ResourceBundle.
>>
> Since you seem likely to want to generate language-specific resumes I
> think there's a case for breaking up the resource bundle into one locale-
> independent one, which holds all items that are constant no matter what
> language is being used, e.g. your name, address, date of birth, etc, and
> a set of locale-dependent bundles which would contain information which
> is locale-dependent such as language-specific headings and boiler-plate
> as well as locale-dependent formatting for dates, time, money, etc.
>
> With this approach you don't end up copying invariant data into multiple
> resource bundles and running the risk of forgetting to update them all.
>
>
Fair enough. There isn't much that's invariant though. While my name won't
change, pretty much everything else would need to be translated if I
produced a foreign language resume.

--
Rhino


From: Rhino on

"Jeff Higgins" <oohiggins(a)yahoo.com> wrote in message
news:htme14$tec$1(a)news.eternal-september.org...
> On 5/27/2010 11:20 AM, Rhino wrote:
>> I'm trying to implement the advice I was given the other day about the
>> placement of constants that were shared in various classes of my project.
> By writing paragraphs of English prose?
> <http://xmlresume.sourceforge.net/>
> Yes, I know, there are XML naysayers. It's the thought that counts.
>
Actually, I'm not adverse to adding yet another format and XML would seem to
be a good choice....

--
Rhino