473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Internationalisation (i8n) of messages

I've just externalised the messages in my program and was thinking
about internationalisation.

I could probably translate my messages to French and German, and a
friend could do Spanish. I was also thinking of date formats - as a
Brit, I can't get used to the awful American MM/DD/YY format ;o) I
don't think I'll be needing currency or decimal (. or ,) info.

I was basically thinking of doing something like:

import locale
self.locale_array = locale.getlocale()
self.language = self.locale_array[0]

if self.language == "en_GB":
self.dateformat = "DD/MM/YYYY"
elif self.language == "de_DE":
self.dateformat = "DD-MM-YYYY"
else:
self.dateformat = "MM/DD/YY"

So if getlocale returns None, None (like on my Sparc) then it defaults
to US English, otherwise it does UK English or German.

The problem is that the languages I've come across seem to differ
widely between Solaris/py2.3.2, Linux/py2.2.2 and Windows/py2.3.3 (all
I've tested), I was thinking of doing a case-insensitive grep, but
that seems hacky.

The Python 2.3 locale documentation seems crappy, just a bit of info
about POSIX locale.

Any ideas of how I can do this or better documentation URLs? I'm using
wxPython for my GUI, in case that provides some i8n support....?
Jul 18 '05 #1
0 1257

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Richard Shea | last post by:
Hi - I'd like to try applying internationalisation techniques to get an idea of how much extra work is involved. As a first step I'm looking at the class based gettext. I just wondered if anyone...
5
by: Adam | last post by:
Hi, How do i listen for windows messages in c# on compact.net? I have a window containing an instantiation of the HTML viewer control, which is a child of the main form. As the compact...
6
by: FBS | last post by:
Hello I'm currently working on a winform project that must be in 3 languages (French, English et Polish). I know that I have to work with *.resx files, (1 for each language, 1 for the...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Internationalisation in javascript. ----------------------------------------------------------------------- ...
1
by: jyohere | last post by:
What is Locatlization and Internationalisation.What is its use in java
1
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.