Include ini file in another ini

Is there a way to include (somewhat like #include in c) a custom ini in one of the default inis? E.g. in DefaultEngine.ini include a custom made ini DefaultLang.ini with the Internationalization section, so that when packaging the game for different languages it is enough to put the right DefaultLang.ini version in the Config folder.

If there is not something like #include, what is the best way to deal with different config for different packages?

I’m not sure when this was introduced, but in the 4.26 source code there is support for including one .ini from another. It looks like it will only include exactly one file, and the include must be the first line. An included .ini can include another .ini tho. It would not be difficult to modify the source to allow including multiple .ini files, maybe Epic will do that one day.

The source can be found in FConfigFile::Combine and syntax is a line that starts with #! immediately followed by a path relative to the current .ini file of the other .ini file to include.

For example:

The source comments say this:

// this will import/"execute" another .ini file before this one - useful for subclassing platforms, like tvOS extending iOS
// the text following the #! is a relative path to another .ini file
// now import the relative path'd file (TVOS would have #!../IOS) recursively

Seems like this was bugged from the start and never fixed in last 7 years, but the local ini files, which UE4 generates in %LOCAL% arent being processed for includes.