Perl Monk, Perl Meditation | |
PerlMonks |
Re: Umm. . .Mom, Dad, I'm Bi! (-lingual web site coding, that is)by pmas (Hermit) |
on Jul 31, 2001 at 23:57 UTC ( [id://101291]=note: print w/replies, xml ) | Need Help?? |
My advice is not related to perl, but rather to database design:
Usually you have a lot of codes which are just abreviations, so you have tables with "code" "description", and you may use "code" where is not enough space for full description. In multi-language design, you want to avoid that, because code in one language might not mean anything (or worse, is common-sence widely-used abreviation for something else) in another language. Every string what ever you might to display on user-friendly screen needs to have ID, code (short abreviation meaningfull in user language) and description. In your programs you'll use ID instead of code. In my case mentioned earlier, we might want to use 'bk' as ID, and "BK" as english code for bankruptcy.
And back to perl, you can create functions using global $user_language returning proper code and description for each ID, so implementation details will be hidded to your scripts. pmas
In Section
Seekers of Perl Wisdom
|
|