Creating our own internationalization preset

Hi there,

We are shipping our game with the following languages:
English, French, Italian, German, Spanish, Portuguese, Russian, Korean, Japanese, Chinese and Turkish.

Currently we are forced to set our InternationalizationPreset for packaging to the All setting to get all the language files from the Engine/Internationalization folder that we need.

Is there a process we can do to create our own custom subset of languages from ICU?

Or is the only intended way to have to use all if you use any of the languages outside the main configs
(/** English, French, Italian, German, Spanish, Chinese, Japanese, Korean */)

Has anyone had experience here?

We want to ship on mobile and anything that reduces the download/install size would help.

This is the official documentation for ICU with regards to customizing internationalization data. There is an online tool, but additional steps are still required to unpackage the downloaded data as necessary and to add the preset to the project settings UI. For the online method, you’ll need to use one of ICU’s binary tools ( icupkg.exe ) in order to extract the contents of the *.dat file into individual files.

Manual Method:

  • The gist of it is that you want to look in Engine/Source/ThirdParty/ICU/icu4c-53_1/source/data. In that directory, there are various subdirectories containing files with names matching the pattern *files.mk or *local.mk, which specify the raw internationalization resources that should be built.
  • You must then configure ICU and make the data. For convenience, at least on Windows, you may use Config for Windows - Release.bat and Make on Windows.bat (or Make on Windows - Data.bat, subsequently) within Engine/Source/ThirdParty/ICU/icu4c-53_1.
  • Once executed, the icudt53l directory in Engine/Source/ThirdParty/ICU/icu4c-53_1/Win64/VS2013/data/out/build will contain the necessary data. That directory can be copied to a named directory in Engine/Content/Internationalization.
  • In ProjectPackagingSettings.h, you can add the named directories name to the EProjectPackagingInternationalizationPresets enum’s values. You should then be able to set your new preset in your project’s settings.

It’s not straight forward, but the hope was to make these steps unnecessary in the future and instead generate the presets as desired, on demand, in a user friendly manner. These presets are simply a stopgap measure that covers most cases with generic bundles of supported locales. In cases such as yours, generating custom presets are necessary.

Excellent thanks for that I will give it a go.

On a side note, It seems the editor/frontend uses the Engine\Content\Internationalization\icudt53l folder, which seems to be a custom setup made by epic But it means anything not in there cant be cooked.

Is there an approved way of changing that path?

To date we had just copied all the data from the all folder inside it so we could bake languages that aren’t already in there (like turkish).

Thanks again.

The staging logic will actually take the contents of Engine/Content/Internationalization/InternationalizationPresetName and copy them to Engine/Content/Internationalization/ in the staging directory, which means the icudt53l directory will get “cooked” correctly.

            SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.LocalRoot, "Engine", "Content", "Internationalization", InternationalizationPreset), "*", true, null, CombinePaths("Engine", "Content", "Internationalization"), true, !Params.UsePak(SC.StageTargetPlatform));