Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #12411
| From | Novice <novice@example..com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | i18n/l10n question |
| Date | 2012-02-27 02:16 +0000 |
| Organization | Your Company |
| Message-ID | <XnsA005D98F1F5D2jpnasty@94.75.214.39> (permalink) |
This is basically a variant on the "additional logging questions" thread I just started but with a focus on i18n. I'd like all of my classes to be locale-sensitive so that all of the things they are displaying in GUIs, including text and error messages, are displayed in the user's language (or, more precisely, the language in the resource bundle that is the "closest fit" to the language of the user). Given that my programs instantiate a variety of classes that themselves display text or error messages, those classes also need to know what locale the program is using. Would I be right to pass a reference to the locale of the main program to each class that it instantiates? Or should I be doing things differently? Also, what if a class isn't GUI-related at all? Should I still pass a locale anyway? Again, I'm thinking of things like Enums. I wouldn't normally expect an Enum to display text of any kind to a user, at least directly. (The enum might determine that day number 1 in the week is Monday and pass Monday to a class that displays that but the enum itself isn't displaying Monday.) What about a holder class (again, assuming I'm using that term correctly; I described my guess in the "additional logging questions" thread): I don't see much need for it to ever display text to a user (or an error message). And what about logs? I know that the java.util.logging classes provide for resource bundles so that the messages in the logs can be in other languages. How common is it for log messages to be in languages other than English? I have no experience with that. So much computer-related stuff seems to be in English first (or English only) that I'm not sure if a European company, say, would write log messages in English even if it isn't the main local language (in Germany say) or would they often write them in the local language? -- Novice
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
i18n/l10n question Novice <novice@example..com> - 2012-02-27 02:16 +0000
Re: i18n/l10n question Arne Vajhøj <arne@vajhoej.dk> - 2012-02-26 21:31 -0500
Re: i18n/l10n question Novice <novice@example..com> - 2012-02-27 04:30 +0000
Re: i18n/l10n question Arne Vajhøj <arne@vajhoej.dk> - 2012-02-27 17:01 -0500
Re: i18n/l10n question David Lamb <dalamb@cs.queensu.ca> - 2012-02-28 07:21 -0500
Re: i18n/l10n question Novice <novice@example..com> - 2012-02-29 14:46 +0000
Re: i18n/l10n question David Lamb <dalamb@cs.queensu.ca> - 2012-03-10 09:13 -0500
csiph-web