Custom language files are JSON files that have a .lang extension.
They are installed just like any other MagicLoader mod - drop them in the data folder alongside your other MagicLoader .json files, and MagicLoader 2 will pick them up from there.
The schema of these files only contains a few fields, just enough information for MagicLoader to hopefully be able to access the new language.{
"LogName": "Russian",
"ShortCode": "ru",
"DetectionPak": "SFRusTranslation_P.pak",
"JsonHandle": "RU",
"LocresPath": "Localization/Game/ru/Game.locres"
}
- "LogName" here is just what MagicLoader 2 will call it in the log, for error reporting and whatnot.
- "ShortCode" is used internally as part of the LOCRES filepath in the output. Typically just the two-character lowercase language code.
- "DetectionPak" is the filename, without path, of the .pak file the language uses. The language support won't activate if the pak file is not present, because MagicLoader would need to read that data to be able to provide any features.
- "JsonHandle" is what you'll call it in MagicLoader .json files, e.g. "RU" adds the "RU" and "RU_Edit" keys.
- "LocresPath" is the internal relative path to the locres file. Seems many of the translation mods that have cropped up use nonstandard root paths. This allows them to work, but figuring what they used requires a bit of knowledge of the pak format, or at least the tools involved, and is beyond the scope of this article. (Try copying the value here and changing the shortcode in it first, that might work.)
As new unofficial language mods get added, hopefully this will allow MagicLoader 2 to support them.
0 comments