I have a wxPython xmlrpc client application that I want to
internationalize (i18n). Getting strings translated with the _ method
(using wx.GetTranslation) works like a charm, but the problems lies
in the fact that floats (among other things) are also 'translated'
and that doesn't stroke with the database content on the server that
I want to keep neutral.
Example:
Database contains: 10.40 as a value (float)
- client is set to use wx.LANGUAGE_ENGLISH
- client requests the value and show's it on the screen.
- client is set to use wx.LANGUAGE_DUTCH
- client requests the value and get's the following exception:
invalid literal for float(): 10.40
I don't want to store 10,40 in the database because that will break
the english client.
Is there a solution so that only the messages (strings) are
translated?
I have a wxPython xmlrpc client application that I want to internationalize (i18n). Getting strings translated with the _ method (using wx.GetTranslation) works like a charm, but the problems lies in the fact that floats (among other things) are also 'translated' and that doesn't stroke with the database content on the server that I want to keep neutral.
Example:
Database contains: 10.40 as a value (float)
- client is set to use wx.LANGUAGE_ENGLISH
- client requests the value and show's it on the screen.
- client is set to use wx.LANGUAGE_DUTCH
- client requests the value and get's the following exception:
invalid literal for float(): 10.40
I don't want to store 10,40 in the database because that will break the english client.
Is there a solution so that only the messages (strings) are translated?
I wonder if you use the Python locale module to set LC_NUMERIC back to english would take care of this?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
My apologies for the multiple posts of this message.
Somehow I did't receive anymore messages from the wxpython-users
mailinglist and mistakenly send the message again. How the message
got send three times before beets me.
I saw in the archive that Robin responded to my question, thanks.
He suggested I should try to use the python locale module to set
LC_NUMERIC back to english. I'll give it a try and will get back it.
Remy
···
On Tuesday 27 April 2004 10:35, Remy C. Cool wrote:
Hello,
I have a wxPython xmlrpc client application that I want to
internationalize (i18n). Getting strings translated with the _
method (using wx.GetTranslation) works like a charm, but the
problems lies in the fact that floats (among other things) are also
'translated' and that doesn't stroke with the database content on
the server that I want to keep neutral.
Example:
Database contains: 10.40 as a value (float)
- client is set to use wx.LANGUAGE_ENGLISH
- client requests the value and show's it on the screen.
- client is set to use wx.LANGUAGE_DUTCH
- client requests the value and get's the following exception:
invalid literal for float(): 10.40
I don't want to store 10,40 in the database because that will break
the english client.
Is there a solution so that only the messages (strings) are
translated?
Regards,
Remy
-------------------------------------------------------------------
-- To unsubscribe, e-mail:
wxPython-users-unsubscribe@lists.wxwidgets.org For additional
commands, e-mail: wxPython-users-help@lists.wxwidgets.org