IDE : I have a dream!

I would like to have in the inspector a popmenu with all the languages and that the content of the localized strings are displayed in the form.

I haven’t done a localized app since the mid 1990s but if I had a client requirement for one, I would prefer a separate app so that translators could work with strings from the app without stumbling around in the IDE (or, even more ideally, a translator mode in the app itself that would allow users to translate components visually). It would be nice if the IDE gave you the option to adjust verbiage as well, but to me that is a secondary requirement.

There IS a separate app called Lingua. There is even an open source version called Open Lingua. The only really annoying aspect is that Xojo only exports one language at a time.

Philippe, I suppose you wish to see how is your interface with the different language. If a translation is not too long for a button etc. ?
If this is the goal, change the language in the Shared property of your project, close the project and re-open it. The IDE will show the interface in that language.

You can have an IDE script that exports everything you need. See here:

2 Likes

A bit laborious, no?
It would be so much easier and faster to have it in the inspector…

Yes it is laborious. I reported a bug #69810 : SegmentedButton localization IDE where I also spoke about this problem. Maybe you could fill another bug report (or a request feature I don’t know which one it is) to this specific problem.

I have developed a couple of applications (not especially complex ones) that were bilingual, English and Spanish. I put all the program’s texts in an SQLite db with one column for English and one for Spanish. The main program had a configuration option that included a choice of language. Switching language updated all the on-screen texts immediately. One problem was that Spanish translations were frequently longer than their English equivalents, meaning that space had to be allowed for them in text boxes, buttons, labels, etc. The rather tedious aspect was that of setting all the on-screen texts whenever a window opened, but that was my problem as the programmer. For the user the right texts just appeared as required.

long ago i made a feature request of having a multilingual text input field or
at least having a propertie which can call a method
(in the form designer and not by code)
Window1.Title=⍰Module1.Translate(“KeyMainWindowTitle”)
if the Title get set then through a method call at runtime.

Forgot to add that this method had two advantages: only one version of the program to maintain and the relative ease of adding other languages (French, German, Kreen-Akrore, etc) since no change was required to the source code for the user to switch language.

Good all that but we digress, the idea is to have a popup in the inspector when developing a window…

It’s simple for Xojo to make this feature…

There’s nothing like having other people tell you how easy something is to implement.

4 Likes

True, I can’t remember how many easy things I have implemented in my softwares which broke something I saw weeks after and took me days to resolve.

Let me see if I understand.

Quoting Philippe GUEDJ:

I would like to have in the inspector a popmenu with all the languages and that the content of the localized strings are displayed in the form.

and

the idea is to have a popup in the inspector when developing a window…

And quoting Bob Grommes:

or, even more ideally, a translator mode in the app itself that would allow users to translate components visually

Does all this mean that translation should be done within the IDE or by the user within the app? Wouldn’t the result of doing it in the IDE be a different version of the application for each language? And why should the users be expected to provide the translation? I was describing a method for keeping the translations outside the application and allowing users to choose their preferred language from those already translated for them.

Another point: localizing an application doesn’t mean translating just the on-screen texts. Error messages and help texts (if any) also require translation.

Indeed, but already if there was help in this area for the realization of screens, it would be a real plus.

Philippe, are you talking about localizing applications in general or localizing Xojo itself? If the latter, Xojo would have to decide on which language(s). I guess that you are French or French-speaking (Canadian?), but what about German, Spanish, etc, etc. Then there’s the question of the documentation…

I was once marginally involved in an attempt to translate a programming language: “Si X = 0 Entonces…” It was ridiculous.

I’m talking about being able to view the translations when creating a window…

Do you mean the window’s properties (visible, etc)? Only the Xojo guys can tell you if it’s even possible tecnically. But of course there would be the question of which languages. After all, there are said to be 7,117 languages in the world so including even 5% of them would make for a rather cumbersome IDE :grinning:

What I think Philippe is asking for is a pop-up menu in the layout editor to be able to preview the localized strings for each language.

When using localized constants in the IDE, one can assign them directly in the inspector to the caption/text of labels, buttons and so on using:
Caption = #MyLocalizedConstant

In my opinion this is a great idea.

@Philippe_GUEDJ the current workaround is to launch the App and use this utility to change the language on the fly ‎App Language Chooser dans le Mac App Store