Hi All,
Thanks you very much… Now everything is working fine…
I have one more question, now that we have many languages in place…
what the best approach to give the user ability to switch between languages…
- to read the locale from the OS… but this will force the user to change the locale if he wants to check the application in differnt language
2)Can I have change language drop down list with the main frame of applcation … will wxPython supports like a reload or refresh of all language labels to the newly selected one…
3)to read the language preference from a config file… use this on startup… this will restrict the user to close the application ,if he need to see stuffs in different language…
Thanks in advance
Thomas
···
Thomas Thomas
phone +64 7 855 8478
fax +64 7 855 8871
Hi Thomas,
Thomas Thomas wrote:
Hi All,
Thanks you very much… Now
everything is working fine…
I have one more question, now that
we have many languages in place…
what the best approach to give the
user ability to switch between languages…
- to read the locale from the OS…
but this will force the user to change the locale if he wants to check
the application in differnt language
2)Can I have change language drop
down list with the main frame of applcation … will wxPython supports
like a reload or refresh of all language labels to the newly selected
one…
On install (with InnoSetup) I base the default on the users local and
store it with wx.Config. I also have a preference setting were user
can choose the language, after it I call SetGettext() (see the sample I
sent) of each module to force the widgets to take on the new language.
Currently this works fine for most controls but at the time I couldn’t
figure it out for things like listctrl, grid and toolbar (IIRC).
As I also have some tables which are language sensitive I also need to
reload choices in comboboxes, so I would actually like to have a nice
way to just restart the application as it would be much cleaner, but
don’t know how to do that.
However this works quit well as a “normal” user would rarely if ever
switch language after installation.
See you
Werner
···
3)to read the language preference
from a config file… use this on startup… this will restrict the user
to close the application ,if he need to see stuffs in different
language…
Thanks in advance
Thomas
Thomas Thomas
phone +64 7 855 8478
fax +64 7 855 8871
Message
Hi All,
Thanks you very much.. Now everything is working fine..
I have one more question, now that we have many languages in place..
what the best approach to give the user ability to switch between languages..
1) to read the locale from the OS.. but this will force the user to change the locale if he wants to check the application in differnt language
2)Can I have change language drop down list with the main frame of applcation .. will wxPython supports like a reload or refresh of all language labels to the newly selected one..
On install (with InnoSetup) I base the default on the users local and store it with wx.Config. I also have a preference setting were user can choose the language, after it I call SetGettext() (see the sample I sent) of each module to force the widgets to take on the new language. Currently this works fine for most controls but at the time I couldn’t figure it out for things like listctrl, grid and toolbar (IIRC).
As I also have some tables which are language sensitive I also need to reload choices in comboboxes, so I would actually like to have a nice way to just restart the application as it would be much cleaner, but don’t know how to do that.
However this works quit well as a “normal” user would rarely if ever switch language after installation.
I think my use case may be a bit unusual. I agree with Werner that users rarely change languages after installation.
I have a “Language” menu, and my UI refreshes when the user changes languages. It’s probably overkill, but a portion of my user base is involved in studying second language acquisition and I thought the ability to change languages on the fly might be nice for them. It wasn’t that hard to implement a “ChangeLanguages()” method in my app. Probably the major use case for it, actually, is when I’m leading a training session outside the US. Someone will ask a question, and I’ll have to temporarily change the language on their copy of the program to English so I can show them how to do something. Also, I’ve heard about academics who prefer to work in English switching to their local language when working with students who don’t speak English well.
As for the initial language for startup, if there’s not a language selection in my config file, I have the user select from a list of supported languages, each language name shown in that language.
David
Hi David,
David Woods wrote:
Hi All,
Thanks you very much.. Now everything is working fine..
I have one more question, now that we have many languages in place..
what the best approach to give the user ability to switch between
languages..
1) to read the locale from the OS.. but this will force the user
to change the locale if he wants to check the application in
differnt language
2)Can I have change language drop down list with the main frame
of applcation .. will wxPython supports like a reload or refresh
of all language labels to the newly selected one..
On install (with InnoSetup) I base the default on the users local
and store it with wx.Config. I also have a preference setting
were user can choose the language, after it I call SetGettext()
(see the sample I sent) of each module to force the widgets to
take on the new language. Currently this works fine for most
controls but at the time I couldn't figure it out for things like
listctrl, grid and toolbar (IIRC).
As I also have some tables which are language sensitive I also
need to reload choices in comboboxes, so I would actually like to
have a nice way to just restart the application as it would be
much cleaner, but don't know how to do that.
However this works quit well as a "normal" user would rarely if
ever switch language after installation.
I think my use case may be a bit unusual. I agree with Werner that users rarely change languages after installation.
I have a "Language" menu, and my UI refreshes when the user changes languages. It's probably overkill, but a portion of my user base is involved in studying second language acquisition and I thought the ability to change languages on the fly might be nice for them. It wasn't that hard to implement a "ChangeLanguages()" method in my app.
How did you handle things like listctrl headers and e.g. choice for combobox?
Werner
···
Probably the major use case for it, actually, is when I'm leading a training session outside the US. Someone will ask a question, and I'll have to temporarily change the language on their copy of the program to English so I can show them how to do something. Also, I've heard about academics who prefer to work in English switching to their local language when working with students who don't speak English well.
As for the initial language for startup, if there's not a language selection in my config file, I have the user select from a list of supported languages, each language name shown in that language.
David
>> Hi All,
>>
>> Thanks you very much.. Now everything is working fine..
>>
>> I have one more question, now that we have many languages in
place..
>> what the best approach to give the user ability to switch between
>> languages..
>>
>> 1) to read the locale from the OS.. but this will force the user
>> to change the locale if he wants to check the application in
>> differnt language
>>
>> 2)Can I have change language drop down list with the main frame
>> of applcation .. will wxPython supports like a reload or refresh
>> of all language labels to the newly selected one..
>
> On install (with InnoSetup) I base the default on the users local
> and store it with wx.Config. I also have a preference setting
> were user can choose the language, after it I call SetGettext()
> (see the sample I sent) of each module to force the widgets to
> take on the new language. Currently this works fine for most
> controls but at the time I couldn't figure it out for things like
> listctrl, grid and toolbar (IIRC).
>
> As I also have some tables which are language sensitive I also
> need to reload choices in comboboxes, so I would actually like to
> have a nice way to just restart the application as it would be
> much cleaner, but don't know how to do that.
>
> However this works quit well as a "normal" user would rarely if
> ever switch language after installation.
>
> I think my use case may be a bit unusual. I agree with Werner that
> users rarely change languages after installation.
>
> I have a "Language" menu, and my UI refreshes when the user changes
> languages. It's probably overkill, but a portion of my user base is
> involved in studying second language acquisition and I thought the
> ability to change languages on the fly might be nice for them. It
> wasn't that hard to implement a "ChangeLanguages()" method in my app.
How did you handle things like listctrl headers and e.g. choice for
combobox?
Actually, it was a non-issue for me. I don't have any listctrls or
comboboxes visible from my main UI. They all appear in popup dialogs, which
are recreated as needed in the language of the moment. Still, I don't think
it would be that tough.
Selecting the Language menu item triggers a ChangeLanguage() method in the
window that owns my menu system. That triggers a call to the
ChangeLanguage() method in all the other objects that are visible. Why
couldn't the ChangeLanguage() method be taught to clear and repopulate a
ComboBox with translated entries, and to update the listctrl headers with
the appropriate translated labels?
It's not a perfect system. System Menus on the Mac don't seem to get the
word that the language has changed, for example. But it works well enough
that I've kept it in place. You can download my app and judge for yourself
at http://www.transana.org.
David