Open xill47 opened 3 years ago
That's what I am probably going to do, but it was just out of old habit. Still need to find comfortable tooling to use with gettext (csv will just become too cluttered if there will be additional translations).
Do you add *.resx
files in your export filter to ensure they get included in the PCK? Godot by default only exports known resources, and doesn't know about *.resx
.
That's what I am probably going to do, but it was just out of old habit. Still need to find comfortable tooling to use with gettext (csv will just become too cluttered if there will be additional translations).
You can use PO files with Godot's Translation
resource.
@akien-mga
Both .NET and Mono compile .resx
files down to .dll
files (I can find them inside .mono\temp\bin\Debug\{lang id}
in Godot project) so it doesn't seem necessary. I tried anyway, it didn't make any difference.
I understand that I can use Godot's Translation resource, I am just looking for a convenient way to generate PO templates and edit translations. (For future reference or anyone who will find it with similar problem: I will probably create .txt
file with strings, use txt2po
from translate-toolkit
package and then Poedit
as recommended in Godot Documentation, or similar alternative)
You might be interested in @SkyLucilfer's GSoC work: https://github.com/godotengine/godot/pull/39415 It's for Godot 4.0 though.
I'm not familiar with the .NET translation workflow but we probably need to support it independently of Godot's own features. @neikeq might know more about this.
It could work pretty easily - in the minimum project you provided after build you can find the compiled resources in: ResxLocalizationProblemMinimum/.mono/temp/bin/Debug
There will be a "ru" folder in your case. Copy that ru folder to the exported project location as in:
I will take a look if the folder can be included in the export process
I will take a look if the folder can be included in the export process
@object71 Bump :slightly_smiling_face: Did you manage to do this?
Considering I wrote it an year ago we can safely assume I forgot about it.
Any news on this front? Would be super cool to have type-safe resource strings supported with Godot.
This was fixed on 4.0, tho the issue likely remains on 3.x.
Godot version: 3.2.3.stable.mono
OS/device including version: Windows 10 2004 (also tested in Ubuntu VM)
Issue description:
When I use
.resx
file and its localized counterpart, I am getting the right string (ResourceManager
respectsCultureInfo.CurrentCulture
) when running the game from Godot Editor, but string fallbacks to the default (unlocalized one) when running exported project.Probably relevant: https://github.com/mono/mono/issues/19928 Mentioned workaround doesn't work in exported project since all assemblies seem to be packed into
.pck
file.Steps to reproduce:
resx
fileresx
fileMinimal reproduction project:
ResxLocalizationProblemMinimum.zip