Localization in Godot 4 with POT - gettext

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 23

  • @VoylinsGamedevJourney
    @VoylinsGamedevJourney  7 місяців тому +2

    How have you been doing localization for your games and projects? ^^

    • @_Guigui
      @_Guigui 7 місяців тому +2

      still using csv😅 though now i have no excuse to look into it, although the only downside i can think of atm is that there's no real website i could use to host translations using PO files that isn't paid with a very limited free tier

    • @VoylinsGamedevJourney
      @VoylinsGamedevJourney  7 місяців тому

      @@_Guigui Yeah, when you are working on an open source project there are free options. Else your best bet is to use Git with Github and let people use tools like poedit for ease of use. But making people use git and poedit may start to become too complicated if they just want to submit translations ^^"

  • @jerryzhao666
    @jerryzhao666 3 місяці тому +1

    Thanks for the unique tutorial, the po and mo make me crazy at first but now I understand more with your help!

  • @smitner
    @smitner 5 місяців тому +1

    Thank you! This convinced me to migrate from csv to gettext for my game Hazard Pay.

  • @Sizriz
    @Sizriz Місяць тому +1

    Thank alot. You are great.

  • @MrHumbuck
    @MrHumbuck 7 місяців тому +2

    Looks nice to work with! Good video, I like that you’re looking out for things that need tutorials as you make Gozen, it'll make things easier for similar projects in the future.
    Do you think this system would cope well if you're translating full dialogue boxes, like for an RPG or something?

    • @VoylinsGamedevJourney
      @VoylinsGamedevJourney  7 місяців тому +2

      Translating entire dialogues without problem is perfectly possible. The gettext system is quite amazing and this video only covers the very very basics. You can get a lot more complicated by entering words separately and having the words have a plural form.
      But the way I explain it in the video is probably the way most people will use it. I won't be using any of the plural and sentence building structures, but it's good to have the option. Also the compiled translations are so great for saving space.
      I want to make the tutorials which I wanted to see but couldn't find ^^

  • @owenlloyd2528
    @owenlloyd2528 7 місяців тому +2

    Thank you, this is really useful and I will be dropping csv for this

  • @-Solenya
    @-Solenya 6 днів тому

    Hey, thanks for the awesome tutorial!
    Do you know how to combine a localized text key with normal text in the same label. $label.text = "key" + "normal text" doesn't work for me.

    • @VoylinsGamedevJourney
      @VoylinsGamedevJourney  6 днів тому +1

      @@-Solenya i think you'll have to put it on 2 lines line this:
      Label.text = key
      Label.text += text

    • @-Solenya
      @-Solenya 6 днів тому +1

      @@VoylinsGamedevJourney Oh i will try that too, thanks. I found out you can do this with tr(). label.text = tr("key") + "text"

  • @favouriteyoutube21
    @favouriteyoutube21 7 місяців тому

    HI! How can we use this method to translate custom String variables? For example-my Poedit didn't parse my custom Strings.

    • @VoylinsGamedevJourney
      @VoylinsGamedevJourney  7 місяців тому

      Be certain that you include all the files when you generate the pot file

  • @favouriteyoutube21
    @favouriteyoutube21 7 місяців тому

    what is name of ur PO files reader?

  • @shomykohai
    @shomykohai 7 місяців тому +2

    This is so useful! I've not been interested into the localisation part of a godot project yet, but surely this helped me a lot to understand how much easy it is! Keep up the good work you're doing! Can't wait to try a stable release of GoZen

    • @VoylinsGamedevJourney
      @VoylinsGamedevJourney  7 місяців тому

      I'll be making a plugin which will make localization even easier and faster ;)

  • @dueddel
    @dueddel 7 місяців тому +1

    The first time I worked with *.po and *.mo files using Poedit was about 15 years ago. And yes, it was a bit confusing and somehow overcomplex for such a "simple" thing like translating one string to another. But I can confirm what you basically said in the video: The effort of getting used to it is worth it.
    Though I would still recommend to simply use *.csv files for smaller projects (like game jam games or helper tools), for them the simplicity of CSV is enough. For bigger projects like GoZen, however, it makes sense to make use of the better feature set provided by Poedit.
    One last note: I am not exactly sure about it, but I was told so long ago and I never questioned it. As far as I know the MO format is not only smaller than PO due to compilation - it also requires less CPU time for processing the translations since it's optimized somehow. No idea if that's also true for Godot, but I can imagine it isn't slower, right? 😉

    • @VoylinsGamedevJourney
      @VoylinsGamedevJourney  7 місяців тому +1

      I think it's true for Godot as well. Could be helpful as most people will probably need to use their CPU power for video editing 😅 at this moment not that much ui, so can't really test if it's actually faster or not.
      Will test it when my hands have healed (had an accident and can't move my hands easily at the moment so can't use my pc properly) 😅

    • @dueddel
      @dueddel 7 місяців тому +1

      @@VoylinsGamedevJourney Oh, no!! Get well soon.
      Well, in the end having a bunch of UI labels loaded from a CSV wouldn't make too much of a difference performance-wise in comparison to loading them from PO/MO, I guess.
      I mean, I have in fact no actual clue, but I think it's really only micro optimization.
      I suppose a video editor can't have that many labels and help texts and instruction manuals and whatnot that it is really having an impact to choose one over the other format, does it? 😉
      But still, how to edit the translations (by you or contributors) does have an actual impact on chosing a format, if not memory and/or CPU usage does.
      That being said, there are enough other reasons to keep using Poedit in your case, I'd say. Especially because you already fell in love with it anyway.
      As with game engines in general it's the same here: Use whatever suits you best or whatever you simply like more. 🙂