[pygtk] Localization

Alessandro Dentella sandro at e-den.it
Thu Nov 13 21:27:06 WST 2008


On Tue, Nov 11, 2008 at 01:51:26PM +0100, Alessandro Dentella wrote:
> 
> Hi,
> 
>   I want to add support for localization to my package sqlkit[1], for text,
>   numbers and dates.
> 
>   I'm unsure on what kind of support PyGTK gives. 

I give some more details: 

spin button
===========
if I use spin button, depending on the locale in use I can get the decimal
separator "." or ",".

I don't know how to get a thousand separator. Is it possible?

TreeModel
==========

the attached example shows that if I use:

   * model with gobject.TYPE_FLOAT
   * CellRendererText
   * column.add_attribute(self.cell, 'text', 0 )

I get decimal separator correctly (but again no thousand separator)

If I use 

   * model with 'object'  type (the obly way I foound to allow me to set
     NULL values, ie: None)
   
   OR

   * set_cell_data_func


I can't even get the decimal separator correct.



I couldn't find other support for localization provided by PyGTK. Is this
correct?



sandro
-------------- parte successiva --------------
Un allegato non testuale è stato rimosso....
Nome:        tree_view_numeric.py
Tipo:        text/x-python
Dimensione:  1239 bytes
Descrizione: non disponibile
Url:         http://www.daa.com.au/pipermail/pygtk/attachments/20081113/01a87f59/attachment.py 


More information about the pygtk mailing list