On Jun 13, 2008, at 5:55 PM, Kimball Larsen wrote:
When I wrote the first versions of my main application, it was all
done in english - button labels, strings displayed in dialogues,
etc. We recently decided it was really time to provide alternate
languages.
So, I went through all my source and UI elements looking for hard-
coded english strings and changed them to constants. I (possibly
mistakenly) chose to leave english as the default for each constant
(i.e., I filled in the english string in the "default", and left the
entry for "english" blank.)
I then sent it off to my translator, who used lingua to provide
spanish versions of all my strings.
So far, so good.
If I change the OS Language to spanish, I get spanish stuff, change
it to anything else, I get english. Good.
However, my requirements have now changed (marketing dept stepped
in... )
I need to be able to offer versions as follows:
English Only
Spanish Only
English Add-On Pack
Spanish Add-On Pack
We are planning to expand to many, many more languages, so I will
need "only" versions of each language, as well as "add on" packs for
each. Thus, eventually someone could buy the French Only version,
and add German as an add-on pack to it.
This brings up several questions:
How do I make it so that the app will show only a specific language
regardless of what the host OS is set for?
Secondly, how do I make it so that the user can select which
language they want to see in the UI once they have purchased a
language pack?
I'm assuming that my language packs will really mostly consist of
new language files for their selected language, and a new images
database (some of the app images have words on them that will be
translated as well).
Any suggestions?
Of course. I'd suggest replacing the constants with something like
LocalString(Foo)
where 'Foo' is the constant. LocalString is a function that checks to
see what the selected language is and returns the string for that
language and the constant passed.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|