Announcement

Collapse
No announcement yet.

Localization Dashboard preview, and explanation of UE4's text localization process

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    In order to localize UMETA data the following works (https://answers.unrealengine.com/que...ization.html):

    Gathering from meta-data is a separate step to gathering from source code or assets.

    If you're using the Localization Dashboard, then you can gather from meta-data by enabling "Gather from Meta Data" option, and adding a path and key to gather text from.

    Something like this:

    Click image for larger version

Name:	UMETAData.png
Views:	1
Size:	18.4 KB
ID:	1105843

    Comment


      #17
      How do I get the localized text from enumerations? Currently, I have the following:

      Code:
      .h
      UENUM(BlueprintType)
      enum class ControllerSetup : uint8
      {
          Conventional    UMETA(DisplayName = "Conventional"),
          Southpaw        UMETA(DisplayName = "Southpaw")
      };
      
      .cpp
      FText UMyGameInstance::GetControllerSetupText(ControllerSetup controllerSetup)
      {
          const UEnum* EnumPtr = FindObject<UEnum>(ANY_PACKAGE, TEXT("ControllerSetup"), true);
      
          if (!EnumPtr)
              return FText::GetEmpty();
      
          return EnumPtr->GetEnumText((int32)controllerSetup);
          //return EnumPtr->GetDisplayNameText((int32)controllerSetup);
      }
      I see the enumeration in the localization files, and it is translated. However, I can't get the proper text for the selected locale.

      Thank you.

      Comment


        #18
        Does anyone know how to get the localized string from a UENUM?

        Comment


          #19
          Hi,

          In the Children Json Format, Keys is an array, What the purpose of it? Are you handling, in the same namespace, different keys with the same default text as just one translation?

          Thanks for the clarification,

          Comment


            #20
            Originally posted by Elvince View Post
            Hi,

            Thanks for the dashboard explanation. That's great to see it coming.

            I'm stuck with a case where I don't know how to get a translation working.
            Let's say that I'm pulling data from my database and I want to use translation on one data, how can I get this?

            If I'm doing FromString, it will be culture invariant ;(
            Should I use a Format?

            Thanks,
            I'm seing FTextStringHelper::ReadFromString in UT that seems to come from 4.12 but I can't see it under Github, is it planned to be delivered with 4.12?
            As it seems to adressed my question of Database String FText.

            Comment


              #21
              Does this new system imply we cannot have different strings with the same English text and different translations since the string IDs (category.key combinations in the Unreal 3 internationalization files) are gone?

              Comment


                #22
                I tried to make a shortcut macro, but the Gather Text doesn't find it:

                Code:
                #define LOCA( InKey ) FInternationalization::ForUseOnlyByLocMacroAndGraphNodeTextLiterals_CreateText( TEXT( "MyGame" ), TEXT( InKey ), TEXT( InKey ) )
                Any ideas, why not?

                Comment


                  #23
                  Hi,
                  Thanks for your tutorial.

                  I made a custom widget with some buttons to select language at first time install and run the game. and it's saved to my save file, but I don't know how i can tell to game how to use that language at startup.

                  I can read saved language from game instance at startup but i don't how to tell the game every time runs with -culture=*CultureName*

                  I developing for Android / iOS

                  Thanks
                  ABC Augmented Reality by UE4
                  GooglePlay

                  ArchVis VR

                  Comment


                    #24
                    Great Post!

                    I have a question. I would like to use the same approach for swapping out text, but with images. Is it possible to do?

                    Comment


                      #25
                      When i delete or change some text that text still exist in list even when i use GatherText
                      ABC Augmented Reality by UE4
                      GooglePlay

                      ArchVis VR

                      Comment


                        #26
                        It's simply great

                        But i have a question: how can i translate UE's FTexts?
                        For instance, i'm using Fkey s for my hotkey system, and i'm using their DisplayName for getting the FText to display on screen, but it come obviously not translated, because i can't gather its data (for example, space bar will always be "Space ba

                        How can i do to gather and translate them?

                        Comment


                          #27
                          I just spent ages trying to figure out why this didn’t work, and finally found out why... should anyone also be as dense as me; don’t assume the default ‘Game’ target is a viable target for gathering text. You still have to create a new target to gather text.

                          One thing though; I tried exporting translations as a .po file and opening them in Virtaal (a .po editing tool), and it didn't let me. Virtaal claimed the .po files were empty. Any ideas?

                          Comment


                            #28
                            Gathering From Meta Data does no longer work. It just produces entries in the Game_Conflicts.txt and adds no entries to the Game.manifest:

                            >From metadata for key DisplayName of enum value Autumn of enum ESeason in None

                            Comment


                              #29
                              OneSky plugin can not use, there's no place to configure prject id and project name

                              Comment

                              Working...
                              X