I’m a localization worker try to export the zh_CN.lproj. Seems like Lingua can’t handle the character. I tried to open the .string file with VS Code, and it told me that this file is corrupted. It confirms that the information from the console.app shows that it can’t load that .string file.
You need to ask the person with the Xojo project to export the Simplified Chinese Lingua file. You can then edit the translations using the Lingua app.
I got the Lingua file with the extention name of .xojo_locale. I’ve finished the localization within Lingua. The part that bother me is export the translation to app.
I’m not the owner of that Xojo project. All I can do is smash the export button… The developer of this app once sends me a copy of the .string file. I’m not sure whether it’s exported from Lingua or a build. That file is also corrupted… So if the file is from a build, then the problem may be caused by the Xojo framework itself…
I’m not really understanding your reply but I think there is a misunderstanding of how this works rather than a framework issue.
This is a summary of what we do:
Our project is designed in English so the English strings are added to the project as localisable constants.
When we want to localise our app we perform the following steps:
a) Import any previously created Lingua files into the project to merge in any existing translations.
b) Use the export option within Xojo to export the Lingua files for the languages we want. This will export the strings we just imported with any new untranslated strings.
NOTE. We don’t save our project at this point (our saved project is always English only).
The Lingua files are edited by the translators.
When we want to create a multi-lingual build of our app we open our project in Xojo, import the Lingua files and then build. It is the Xojo compiler that generates the OS specific language files from the multi-lingual strings we have imported into our project.
How do you create the .string file? Lingua makes xojo_locale files.
I’m using Open Lingua from Thomas Tempelmann (https://github.com/tempelmann/OpenLingua). I’ve added Excel export so that I can do - for instance - spell checking in Excel.
I’m a translator. There’s an export option in the Lingua app for translators like me to test our work without having the Xojo project. The problem now I run into is I want to test my translation but Lingua can’t generate correct zh_CN.lproj folder in the Resource folder.
I found out that the problem is caused by a corrupted Localizable.string file. Neither the app needs to translate, nor any third-party editor can read this file. So to test out exactly which part of the workflow is down, I duplicated the string file of another language, not specifically need to be English, manually change the string file, and find that the app is now localized.
Therefore I assume that this problem might be caused by the Xojo framework or Lingua app.
No need to apologise. Your English is significantly better than my Chinese.
Unfortunately, it is not possible to work this way.
After you have made your changes to the Lingua file you must send it back to wherever owns the project and ask them to send you a build containing the translation.
I just confirmed that the Localizable.string file is misencoded even its extract from the build.
I accidentally found out that the Localizable.string file both from the build and Lingua app is originally UTF-8 encoded. But somehow the metadata tells that the file is UTF-16 LE, which leads to this problem… I can manually fix this problem by reopening the file with UTF-8 and save it as UTF-16 on macOS.
But this workaround is not appliable for the Windows version. The .mo file that Windows platform for localization is not a standard string file, thus it’s still won’t run.