Home > Archive > Visual Basic Syntax > February 2006 > Thesaurus & internationalisation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Thesaurus & internationalisation
|
|
|
| Hi
I am writing a web application (visual basic language) that must be
multi-national. I know that I can handle different languages using resource
files.
However, I need to extend this application to handle a Thesaurus. By this,
I mean that a user may wish to over-ride any of the words that they see with
words that they are more familiar with (or just prefer).
As an example:
Imagine an eCommerce site. If you are a regular customer you may wish to
set up a set of shopping lists, one that you access every Friday and one
that you access on the first Monday of each month. You would create these
shopping lists and then save them, giving each a unique name.
When accessing the shopping lists, there would (presumably) be a drop-down
list showing all the shopping lists that you have saved.
Besides this list would be a label which would say something like "Please
select your shopping list". This value would be saved in a resource file
and the relevant language would be chosen; so something like "Veuillez
choisir votre liste d'achats" would appear if you were French (please excuse
me if this is incorrect French - I just used http://babelfish.altavista.com/
to create it).
Now, that's all well and good, except that some people may dislike the term
"shopping list" and wish to see "order pad", or "requisition" or whatever
they think is appropriate (and the French equivalent).
I'm not sure of the best way to do this - it's got to be scalable both in
terms of performance, load and general administration.
My first thought would be to have the string (held in the resource file)
contain a place holder, so something like "Please select your ^list^" or
"Veuillez choisir votre ^list^". I would then replace ^list^ by their
preferred term (or use a default term if not specified). This term would
exist in a data base (and be held in some sort of session-cache for
performance).
I can't believe that I am the first person to need to do this sort of thing,
so I'd like to know if there is a recognised "best practice" for this sort
of thing.
Many thanks in advance
Griff
| |
|
|
"Griff" <howling@the.moon> wrote in message
news:Ocfmq2%23JGHA.3696@TK2MSFTNGP15.phx.gbl...
> Hi
>
> I am writing a web application (visual basic language) that must be
> multi-national. I know that I can handle different languages using
resource
> files.
>
> However, I need to extend this application to handle a Thesaurus. By
this,
> I mean that a user may wish to over-ride any of the words that they see
with
> words that they are more familiar with (or just prefer).
>
> As an example:
>
> Imagine an eCommerce site. If you are a regular customer you may wish to
> set up a set of shopping lists, one that you access every Friday and one
> that you access on the first Monday of each month. You would create these
> shopping lists and then save them, giving each a unique name.
>
> When accessing the shopping lists, there would (presumably) be a drop-down
> list showing all the shopping lists that you have saved.
>
> Besides this list would be a label which would say something like "Please
> select your shopping list". This value would be saved in a resource file
> and the relevant language would be chosen; so something like "Veuillez
> choisir votre liste d'achats" would appear if you were French (please
excuse
> me if this is incorrect French - I just used
http://babelfish.altavista.com/
> to create it).
>
> Now, that's all well and good, except that some people may dislike the
term
> "shopping list" and wish to see "order pad", or "requisition" or whatever
> they think is appropriate (and the French equivalent).
>
> I'm not sure of the best way to do this - it's got to be scalable both in
> terms of performance, load and general administration.
>
> My first thought would be to have the string (held in the resource file)
> contain a place holder, so something like "Please select your ^list^" or
> "Veuillez choisir votre ^list^". I would then replace ^list^ by their
> preferred term (or use a default term if not specified). This term would
> exist in a data base (and be held in some sort of session-cache for
> performance).
>
> I can't believe that I am the first person to need to do this sort of
thing,
> so I'd like to know if there is a recognised "best practice" for this sort
> of thing.
>
> Many thanks in advance
>
> Griff
>
There are as many different methods (abstractions, mechanics, technologies,
yadda, yadda, ...) of handling multiple languages as there are projects. No
OSFA exists. (In spite of the personal feelings and pride of the authors.
<g> )
The best source of information and clues is to browse websites and demo apps
that provide I18n content. "Good artists copy, great artists steal". Through
it all you will discover there is a rather short of list of "Thou shall"s
and a very long list of "Thou shall not"s. It depends a great deal on what
you are doing and how the app is structured - one app's simple elegance is
another's app's "dialog box from hell".
However there is one main strategy that is universal. Maintain as much
separation between 'code' and 'presentation' as possible - to the point of
being anal. Design the entire app so presentation is the last step in the
process.
I can offer one concrete piece of advice - you should completely eliminate
the idea of simple substitution as you suggested in your example above.
Obviously you will have to at some level, but don't start off trying to make
it work within language structures (grammar) themselves. There is just too
much variety. Too many 'entry points' that seem logical to an English
speaker - will come out stilted, clownish, or inappropriate to a non-english
speaker.
hth
-ralph
| |
| J French 2006-02-02, 7:09 pm |
| On Thu, 2 Feb 2006 11:41:51 -0000, "Griff" <howling@the.moon> wrote:
>Hi
>
>I am writing a web application (visual basic language) that must be
>multi-national. I know that I can handle different languages using resource
>files.
>
>However, I need to extend this application to handle a Thesaurus. By this,
>I mean that a user may wish to over-ride any of the words that they see with
>words that they are more familiar with (or just prefer).
<snip>
>I can't believe that I am the first person to need to do this sort of thing,
>so I'd like to know if there is a recognised "best practice" for this sort
>of thing.
You are not the first one
The way I did it was to write the App in English, but have all text
wrapped in a Function eg:
Me.Caption = Lex( "Acme Stock Control" )
The Function Lex() digs into something a bit like an INI file which is
read into RAM on the first call
Acme Stock Control | Translation is here
If nothing is found for the English word/phrase then the English is
added to the Lexicon and the English word/phrase is returned
- if found the translation is returned
There are a few problems with Menu keys and short cuts, but the rest
of it is pretty easy.
If one provides an editor for the Lexicon file then the User can do
all the translation
| |
| Michael Höhne 2006-02-02, 7:09 pm |
| I totally agree with Ralph's last point. Substituting single words will
cause trouble, sooner or later. Assuming you have a database storing some
user information, I would use a very simple approach: as long as the user
does not change a specific term in your web site, you use the strings stored
in the resource files (represented by a null value in the database). If a
user did change it, the value goes into the user table of your database and
overrides the default value from the resource (through code, of course)
If a user wants to change the "Please select your shopping list" text, he
should get a text field with the complete text as the default value, not
only "shopping list". It even will allow a user to change it to "My shopping
lists" or "Profiles" or whatever he can imagine.
--
Michael
http://www.stunnware.com/crm
----------------------------------------------------------
"Griff" <howling@the.moon> schrieb im Newsbeitrag
news:Ocfmq2%23JGHA.3696@TK2MSFTNGP15.phx.gbl...
> Hi
>
> I am writing a web application (visual basic language) that must be
> multi-national. I know that I can handle different languages using
> resource files.
>
> However, I need to extend this application to handle a Thesaurus. By
> this, I mean that a user may wish to over-ride any of the words that they
> see with words that they are more familiar with (or just prefer).
>
> As an example:
>
> Imagine an eCommerce site. If you are a regular customer you may wish to
> set up a set of shopping lists, one that you access every Friday and one
> that you access on the first Monday of each month. You would create these
> shopping lists and then save them, giving each a unique name.
>
> When accessing the shopping lists, there would (presumably) be a drop-down
> list showing all the shopping lists that you have saved.
>
> Besides this list would be a label which would say something like "Please
> select your shopping list". This value would be saved in a resource file
> and the relevant language would be chosen; so something like "Veuillez
> choisir votre liste d'achats" would appear if you were French (please
> excuse me if this is incorrect French - I just used
> http://babelfish.altavista.com/ to create it).
>
> Now, that's all well and good, except that some people may dislike the
> term "shopping list" and wish to see "order pad", or "requisition" or
> whatever they think is appropriate (and the French equivalent).
>
> I'm not sure of the best way to do this - it's got to be scalable both in
> terms of performance, load and general administration.
>
> My first thought would be to have the string (held in the resource file)
> contain a place holder, so something like "Please select your ^list^" or
> "Veuillez choisir votre ^list^". I would then replace ^list^ by their
> preferred term (or use a default term if not specified). This term would
> exist in a data base (and be held in some sort of session-cache for
> performance).
>
> I can't believe that I am the first person to need to do this sort of
> thing, so I'd like to know if there is a recognised "best practice" for
> this sort of thing.
>
> Many thanks in advance
>
> Griff
>
| |
| J French 2006-02-02, 7:09 pm |
| On Thu, 2 Feb 2006 17:54:03 +0100, "Michael Höhne"
<michael.hoehne@nospam.nospam> wrote:
>I totally agree with Ralph's last point. Substituting single words will
>cause trouble, sooner or later. Assuming you have a database storing some
>user information, I would use a very simple approach: as long as the user
>does not change a specific term in your web site, you use the strings stored
>in the resource files (represented by a null value in the database). If a
>user did change it, the value goes into the user table of your database and
>overrides the default value from the resource (through code, of course)
>
>If a user wants to change the "Please select your shopping list" text, he
>should get a text field with the complete text as the default value, not
>only "shopping list". It even will allow a user to change it to "My shopping
>lists" or "Profiles" or whatever he can imagine.
True
In my case the client changed 'Bond Adjustments' to something totally
different to fool the Spanish Customs officers who monitored their
warehouse.
|
|
|
|
|