Closed GoogleCodeExporter closed 8 years ago
These are already provided by com.google.api.translate.Language, unless I'm
missing
something (quite possible!)
eg. Language.ENGLISH is the String "en", Language.GERMAN is the String "de".
Original comment by rich.mid...@gmail.com
on 15 Dec 2008 at 8:57
The mapping I want is from the abbreviations to strings for the full name of
the
language, "English" in the case of "en" or "German" in the case of "de". So,
right
now Language.ENGLISH resolves to the string "en". I'd like something additional
like
this:
com.google.api.translate.Language.fullName(Language.ENGLISH) => "English"
com.google.api.translate.Language.fullName(Language.GERMAN) => "German"
Original comment by austin.bingham
on 15 Dec 2008 at 9:06
Ah, I see. I'll have to think about how I can accomplish that neatly.
I guess where you expect "English", "German", someone else might expect
"Anglais",
"Allemand" and the next person might even expect "English", "Deutsch". As it
stands I
think that's roughly some 40 Strings for you to maintain or some 1600 for me?
There
should be a neat way to do it somehow though...
Original comment by rich.mid...@gmail.com
on 15 Dec 2008 at 10:18
Yeah, it had also occurred to me that you might want locale-specific full
names. What
you might be able to do is manually maintain a single set of full names in one
language. Then, as a part of the build, generate the code for the rest of the
translations using the translation service itself. This has the benefits of a)
centralizing the maintenance of full names (i.e. in your library) while b)
minimizing
the maintenance load.
Original comment by austin.bingham
on 17 Dec 2008 at 7:43
Original issue reported on code.google.com by
austin.bingham
on 15 Dec 2008 at 11:19