Language translation: Developers help developer

Well I am missing the real Empire Language, the first and the last one who dominated the entire known world:

LATIN

:wink:

Nice class Matthew.

Julen, it looks like the images are all stored inside an Images folder next to the project file. After changing the links to point to these images it seems to run without error.

Matthew, I cannot get a phrase to translate, perhaps I’m doing something wrong?

  1. Created file source.txt that contains some text: “Hello world.”
  2. Opened the source file with Simulanics Lingua Pro.
  3. Selected source language to be English.
  4. Selected foreign language to be Spanish.
  5. On the translation tab I then click the Translate button.

A message appears indicating that the translation was successful, but it still shows “Hello world.” in the listbox in English (not Spanish)?

I’d like to chat to you about what I could potentially do on OpenPhrase.org to benefit your class (once I have all the basic features in place). Will PM you once I get to that stage.

On a side note… my biggest challenge with automated translation systems has always been that even when phrases are translated technically correct, it isn’t always in context of the intended message. This is something I hope OpenPhrase.org can improve on with time (doing context sensitive translations). I also found that languages that are not widely spoken (e.g. like my own native language Afrikaans), are rarely translated correctly by automated systems, and I doubt that such languages will achieve a 99% accuracy.

But great work with the component, sure it will benefit lots of people.

  1. [French (France)] A propos Not yet rated.
    À propos (and it may holds an ending …).

  2. Stupid question:
    What if the Windows and OS X versions are different for the same feature name ?
    Sorry, no example (for today use), but I recall there was 20 years ago or so…

Which has never been one language, but many variations throughout the empire, since become French, Spanish, Italian, Portuguese, Romanian, etc.

Something weird happened to me while translating various words to [Dutch (Netherlands)].
I translated the word About to Over (Dutch), but it appeared on the Dashboard/Translations as translation from [English (United States)] to [English (United Kingdom)]. :frowning:
This is obvious wrong (should be About).
I tried to change it, but I can’t.
Every time I get the Dutch translation and not the wrong English translation.
Please remove this entry or adjust the translation to About instead of Over.

Hi Paul,

I’ve just upgraded the website with the ability to delete translations. At the dashboard/Translations, just find the translation that you want to delete and use the “Delete” button next to the translation textbox.

Note, you can only delete your own translations.

I’ll investigate into what might have caused the issue in the first place, and why the website didn’t change the translations when the change was submitted.

I think this is where context becomes important… still thinking about the best way to indicate different contexts for translations. I see some translators “comments” on the context in the translation text… will see if there isn’t perhaps a way to formally indicate different contexts.

[quote=75391:@Emile Schwarz]1. [French (France)] A propos Not yet rated.
À propos (and it may holds an ending …).[/quote]

If I understand you correctly, À propos could/should be written as À propos…?

I was able to delete the wrong translation. :slight_smile:
Thank you Alwyn.

All the time the Translate to language was [Dutch (Netherlands)].
But in this case it suddenly was [English (United Kingdom)] which I noticed it after I had pressed the Translate button.

Both are possible. Context.

In the software context, I will use “À propos…” (or “À propos de…”, etc.). Otherwise it can be “À propos”.

[quote=75405:@Paul Sondervan]All the time the Translate to language was [Dutch (Netherlands)].
But in this case it suddenly was [English (United Kingdom)] which I noticed it after I had pressed the Translate button.[/quote]

O, that would be because of the algorithm used to pick a translation for your dashboard.

The Eng (US) => Eng(UK) translation wasn’t done yet, and it matched this translation with your profile settings.

Some info on the workings of the algorithm…

The phrase was given in English (US), and your profile is configured as English (UK), with your first language probably being Dutch (Netherlands)… so what happens is…

It first presents
Eng (US) => Dutch on your dashboard
then
Eng (US) => Eng (UK)

I’ll see if I can make this less confusing when I start polishing the user interface.

Thanks Alwyn, I’ll check it out later.

Julen

Matthew,

thanks a lot for your class! On a german system, it seems to have problems with special characters / umlauts and finding strings generally. It shows me a lot of internal object names instead of unlocalized strings:

On another project with partly localized constants, they are shown in both languages between the object names:

There is no Polish :wink:

Xojo is a multiplatform development tool, and the terminology used in OS X apps is sometimes different from the one used in Windows or Linux. In Polish, for example, “desktop” is called “biurko” in OS X, but “pulpit” in Windows; “folder” is “katalog” in OS X, but “folder” in Windows; “save” is “zachowaj” in OS X, but “zapisz” in Windows, and so on. Both versions are perfectly understandable, but using Windows terminology in OS X might feel a bit weird for long time Mac users. I believe there are similar platform differences in other languages, even in English: Trash in OS X and Recycle Bin in Windows, for example. In Xojo, it can be solved with dynamic constants for specific platforms, so including some kind of platform indicator on OpenPhrase website might be useful. Or, we may just put the platform difference information in notes, if it is possible to add notes to the translated items on the website.

Another important thing to consider is that in many Slavic languages (Polish, Czech and Russian, for example), nouns sometimes change their plural form to genitive, depending on the number. We say “jeden plik” (one file), “dwa/trzy/cztery pliki” (two/three/four files), but “pi?? lub wi?cej plikw” (five or more files). Therefore, although it might be tempting to use just two different localizable strings, “%@ file” and “%@ files” (for one and for many files), in Slavic languages that would require an awkward (“machine-like”) translation “Plik: %@” and “Plikw: %@”.

I am using the following method to deal with those (for integer values only):

[code]Function getCorrectPluralForm(Number As Integer, FormOne As String, FormTwo As String, FormMany As String) As String

Dim s, zwrot As String

s=str(abs(Number))

if Number=0 then
zwrot=FormMany
else
if abs(Number)>1 then
if right(s,1)=“2” or right(s,1)=“3” or right(s,1)=“4” then
if right(s,2)<>“12” and right(s,2)<>“13” and right(s,2)<>“14” then
zwrot=FormTwo
else
zwrot=FormMany
end if
else
zwrot=FormMany
end if
else
zwrot=FormOne
end if
end if

Return zwrot
End Function[/code]

It returns the correct string (FormOne, FormTwo or FormMany) on the basis of the Number (integer) provided.

For example, when you need to display a localized string for “[NumberOfFiles] files deleted”, instead of using two localizable dynamic constants

kOneFileDeleted="%@ file deleted" kManyFilesDeleted="%@ files deleted"

you might want to do it like this:

kOneFileDeleted="%@ file deleted" // singular form kManyFilesDeleted="%@ files deleted" // plural form kTwoFilesDeleted="%@ files deleted" // ...oh, that weird 2/3/4 form for some crazy languages

Each time you need to display the localized string, you may just use

StringToDisplay=getCorrectPluralForm(NumberOfFiles, kOneFileDeleted, kTwoFilesDeleted, kManyFilesDeleted)

to pick the correct dynamic string. Remember to replace the variable:

StringToDisplay=Replace(StringToDisplay, "%@", CStr(NumberOfFiles))

Although you have three localizable strings, the kTwoFilesDeleted one can be ignored (that is, set to the regular plural form) for German, French, Spanish, Dutch, etc. but it is right there for you if you ever wish to localize your application to Polish, Russian, Ukrainian, Czech, Slovak, Serbian, Slovenian, etc.

There is now :slight_smile:

Great idea. Added this to the todo list, so that when I get to context specific features a platform indicator is included. By default most translations will probably be “All platforms”, but having platform specific translations will definitely be an option.

[quote=75391:@Emile Schwarz]2. Stupid question:
What if the Windows and OS X versions are different for the same feature name ?
Sorry, no example (for today use), but I recall there was 20 years ago or so…[/quote]
In German versions, there is still “Datei” on Windows, which is “Ablage” on OS X,
for the “File” menu item name.

The next upgrade to OpenPhrase.org (v0.13.0) has just been uploaded.

A major new feature was added to make it super easy to capture phrases and/or translations in bulk (requested by a French Canadian translator). Here are the steps to access this new feature:

  1. Sign in
  2. On the dashboard select “Bulk Capture”
  3. Enter the phrases to be translated and click “Submit Phrases” when done.

Use the “Add Row” button to add more rows (maximum of 10 rows allowed per submission).

I’ve also polished the user interface a bit with new culture icons and rating stars. Here is a screenshot of what the translations page now looks like.

You can now also add comments with your translations requests, if you want to give an example or explain the context of the phrase.

Enjoy!

Nowadays, website or software localization has become a must requirement because mobile users are increasing more in numbers globally. In order to reach large audience every website owner should think about app version of the site with localization feature.

It makes sense that an application and/or website should be localized where possible.

Given my attempt at www.openphrase.org… I think I need to call it… it turned out to be less practical than I thought it to be.

Mature engines such as Google translate, combined with professional translation services, really leaves little room for a free collaborative translation website.

Once final update was made to www.openphrase.org.