How to do localization of plugin in UE

This posting is based on engine version 5.4

Conclusion

If you search the engine source for LocalizationTargets, you will get the most important part.

Detail

  1. Set the CanContainContent item to true in the uplugin file. If it is already true, proceed to the next step.
    • By this, the plugin can have the localization data as content.
  2. In the localization dashboard, in the same way as localizing the UE project, proceed with the localization work, for the things to be need the localization, in the plugin.
  3. This work makes the result of data of localization. This data is saved in a folder with the designated target name under the \Content\Localization\ folder of the project.
    • Target Name means what is shown in the image below.
  1. Copy that folder where this localization data is saved to the \Content\Localization\ folder of the plugin as shown below.
Project
 └─Content
    ├─Localization
    │  └─ExampleTargetName // <- <- Copy this, and...
    │     ├─cn
    │     ├─en
    │     ├─jp
    │     └─ko
    └─Plugins
       └─PluginName
          └─Content
             └─Localization
                └─ExampleTargetName // <- Paste here like this!
                   ├─cn
                   ├─en
                   ├─jp
                   └─ko
  1. Open the uplugin file, add an item with the name ``LocalizationTargets```, and paste the target name, and set the LoadingPolicy, as shown below.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "FileVersion": 3,

  //... other settings ...

    "CanContainContent": true,
    "IsBetaVersion": false,
    "IsExperimentalVersion": false,
    "Installed": false,
    "Modules": [
        {
            "Name": "ExampleModuleName",
            "Type": "Editor",
            "LoadingPhase": "Default"
        }
    ],
    "LocalizationTargets":
    [
        {
            "Name": "ExampleTargetName",
            "LoadingPolicy": "Always"
        }
    ]
}
  1. Now package the plugin.
  2. If you paste the packaged folder to the \Engine\Plugins\Marketplace\ folder and test it, you will see translated characters.

Else

For Investigating this, the time it took to start debugging the engine source code and get the results was overwhelmingly shorter than the time it took to research based on Internet search results, including official documents, and repeat trial and error. The localization part of Unreal Engine felt like small improvements were often made at a short pace. Perhaps that’s why it was much more efficient to look at the code directly rather than look at official documents or records of experiences.

This is a note to my future self and anyone else who might have a similar experience.

tags