button texts that come from CreateButtonSizer()

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

button texts that come from CreateButtonSizer()

Heinz Hummel
Hi,

I create some dialogues using function CreateButtonSizer() to add the OK/Cancel buttons:

CreateButtonSizer(wxOK|wxCANCEL)

This opens buttons with the texts "OK" and "Cancel" on my English Windows which is OK.

Now a Russian user reports he also can see these English texts only but not some translated ones.

So my questions: where do the texts come from exactly? Aren't these strings provided by the underlying operating system? And if not: how can I translate them to Russian from within my application?

Thanks!

Heinz


--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: button texts that come from CreateButtonSizer()

Manolo
When native controls are used is the OS who shows translated texts. For non native, or the rest of your texts, you may use i18 (internationalization) features included in wxWidgets. See http://docs.wxwidgets.org/3.1/overview_i18n.html

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: button texts that come from CreateButtonSizer()

Heinz Hummel
OK...how can I find out if these are native controls or not?

Am Dienstag, 14. Februar 2017 18:28:46 UTC+1 schrieb Manolo:
When native controls are used is the OS who shows translated texts. For non native, or the rest of your texts, you may use i18 (internationalization) features included in wxWidgets. See <a href="http://docs.wxwidgets.org/3.1/overview_i18n.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.wxwidgets.org%2F3.1%2Foverview_i18n.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFNcKbpKEPyXxYhv-tIT4MnE0DCug&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.wxwidgets.org%2F3.1%2Foverview_i18n.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFNcKbpKEPyXxYhv-tIT4MnE0DCug&#39;;return true;">http://docs.wxwidgets.org/3.1/overview_i18n.html

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: button texts that come from CreateButtonSizer()

Manolo
If you need to set the text, then you also need to translate it. If you don't provide text, as for CreateButtonSizer(wxOK), then mostly the OS does translate.
There are a few cases where is wx that sets the text. If you use i18 features then wx provides a ".po" (see yourwxdir/locale) with the translations of such few cases.

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: button texts that come from CreateButtonSizer()

Vadim Zeitlin-4
In reply to this post by Heinz Hummel
On Tue, 14 Feb 2017 03:19:06 -0800 (PST) Heinz Hummel wrote:

HH> I create some dialogues using function CreateButtonSizer() to add the
HH> OK/Cancel buttons:
HH>
HH> CreateButtonSizer(wxOK|wxCANCEL)
HH>
HH> This opens buttons with the texts "OK" and "Cancel" on my English Windows
HH> which is OK.
HH>
HH> Now a Russian user reports he also can see these English texts only but not
HH> some translated ones.
HH>
HH> So my questions: where do the texts come from exactly? Aren't these strings
HH> provided by the underlying operating system?

 Native dialogs, such as wxMessageDialog, use the texts in the current
locale. Your own dialogs will need to translate the button labels just as
they do for all the other strings.

HH> And if not: how can I translate them to Russian from within my
HH> application?

 You need to ensure that you distribute the Russian version of wxstd.mo and
that it's found by wxTranslations when you set the locale to Russian. See
the internat sample and the documentation for more details.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: button texts that come from CreateButtonSizer()

Heinz Hummel


2017-02-16 3:38 GMT+01:00 Vadim Zeitlin <[hidden email]>:

 You need to ensure that you distribute the Russian version of wxstd.mo and
that it's found by wxTranslations when you set the locale to Russian. See
the internat sample and the documentation for more details.


I still have some troubles with the default translation files. I found a directory "locale" with the wxWidgets package which (I guess!?) contain the translations for the default wxWidgets texts.

But where do I have to put the contained .mo files? Copying the locale-folder to the directory where the application is started from does not work. Renaming the directory to "lang" does not work. placing the plain .mo files in parallel to my application does not work.

So what is the correct procedure?

Thanks!


--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: button texts that come from CreateButtonSizer()

Steve Barnes


On 16/02/2017 07:14, Heinz Hummel wrote:

>
>
> 2017-02-16 3:38 GMT+01:00 Vadim Zeitlin <[hidden email]
> <mailto:[hidden email]>>:
>
>
>      You need to ensure that you distribute the Russian version of
>     wxstd.mo and
>     that it's found by wxTranslations when you set the locale to
>     Russian. See
>     the internat sample and the documentation for more details.
>
>
> I still have some troubles with the default translation files. I found a
> directory "locale" with the wxWidgets package which (I guess!?) contain
> the translations for the default wxWidgets texts.
>
> But where do I have to put the contained .mo files? Copying the
> locale-folder to the directory where the application is started from
> does not work. Renaming the directory to "lang" does not work. placing
> the plain .mo files in parallel to my application does not work.
>
> So what is the correct procedure?
>
> Thanks!
>
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

You can pick us some hints from
https://wxpython.org/Phoenix/docs/html/internationalization.html and
http://docs.wxwidgets.org/3.1/overview_i18n.html

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users