First, prepare a local MOD by following "Create the MOD folder" on the home page.
A translation MOD lets you create translations of the text built into the game.
You can also use it for things like changing "Continue" in the English display to "Resume".
Create a Localization folder directly under the MOD folder and put translation.json in it. It does not go inside the Json folder. Use exactly these folder and file names.
Documents/TheEndOfHistory/MOD/<MOD name>/mod.json
Documents/TheEndOfHistory/MOD/<MOD name>/Localization/translation.json
A translation-only MOD does not need Json, Texture or Parameters.json. The format is a dedicated JSON file. Placing Game.archive, Game.po or Game.locres as they are, or just changing their extension to .json, will not load.
In your Steam library, right-click "The End of History" and open "Manage" → "Browse local files". The source file is History_Game/Content/Localization/Game/<language code>/Game.archive in the game's install folder. In the default location, the English one is C:\Program Files (x86)\Steam\steamapps\common\The End of History\History_Game\Content\Localization\Game\en\Game.archive. Use en/Game.archive for English and ja/Game.archive for Japanese.
The batch file below runs with PowerShell, which comes with Windows. You do not need to install UE or Python. This conversion cannot be used with distributed versions that have no Game.archive.
Create a working folder, for example on your desktop.
Copy the "Conversion batch code" below into Notepad and save it in the working folder as GenerateTranslationJson.bat. Set "Save as type" to "All Files" so the name does not end in .bat.txt.
Drag and drop Game.archive from the language folder you want onto the batch file's icon. The original archive is not changed. To run it without dragging, put a copy of Game.archive in the same folder as the batch file.
If you are asked for a language code, enter one of en, ja, zh-Hans, zh-Hant or eo. If you dragged the file from its original language folder, the folder name is used.
translation.json is created in the same folder as the batch file. Edit it and copy it to <MOD name>/Localization/translation.json.
The output lists every non-empty translation in the original archive. Keep only the entries you want to change and delete the rest. Keeping all of them can overwrite changes made by other translation MODs. Regenerating replaces the JSON in the same place, but the previous JSON is kept as a .bak file with the date and time. You do not need to include the working archive, the batch file or the .bak files in the MOD you distribute.
The following example changes the English translation of 「続きから」 (Continue) to "Resume". To try just this one entry, you can save the text below as is as translation.json in UTF-8.
{
"language": "en",
"nativeCulture": "eo",
"translations": [
{
"namespace": "",
"key": "41B81EC8498C20F7B2A324AD7C602BB3",
"source": "続きから",
"translation": "Resume"
}
]
}
language: The target language of the translation to change. en = English, ja = Japanese, zh-Hans = Simplified Chinese, zh-Hant = Traditional Chinese. Japanese is ja, not jp. This value does not switch the game's display language.
nativeCulture: The localization setting of the original game. For The End of History, keep eo. Do not change it to ja even though the source text is Japanese.
namespace, key, source: The information that identifies the text to translate, and the source text. Keep the original values. An empty namespace is valid.
translation: The translated text you want to display. This is the value you normally edit. Empty translations do not overwrite anything.
Even the same word may have different keys depending on where it is displayed. When changing other text, find the matching entry in the generated JSON. If you rewrite the source text, it may no longer match the original game text and the translation may not be applied.
Keep placeholders such as {name} and {count}, and formatting tags, with their names and format unchanged. Write quotation marks as \" and line breaks as \n (or the original \r\n), following JSON syntax. Do not add comments or trailing commas.
Currently, one translation.json specifies one language. The translation that matches the display language selected in the game is used. A translation MOD alone does not add choices to the language selection screen or add fonts. Text without a translation key, such as text fixed as a plain string, is not covered.
First, disable other translation MODs and enable only your MOD.
Quit and restart the game, and select the language you specified in language in the game.
Open the place you changed and check that the text is what you intended.
When using it with other MODs, adjust the priority, restart, and check for conflicts on the same keys.
Among translation MODs that contain the same namespace and key, the entry from the MOD with the higher priority is used. MODs that register the same key conflict even if they target different languages. The current system does not automatically merge multiple languages for the same key.
A MOD without translation.json does not change translations. If the file exists but reading it or parsing the JSON fails, check the details in the error message. The file size limit is 16 MiB and the limit on translation entries is 100,000. A file containing only empty translations cannot be used.
After fixing files, or after changing a MOD's enabled state or priority, quit and restart the game. The game's own translation files are not rewritten, so disabling the MOD and restarting returns the original translations.
This code is for The End of History's Game.archive (FormatVersion 2). It outputs nativeCulture as eo.
@echo off
setlocal
set "TEOH_INPUT=%~f1"
if "%~1"=="" set "TEOH_INPUT=%~dp0Game.archive"
set "TEOH_OUTPUT=%~dp0translation.json"
set "TEOH_SELF=%~f0"
powershell.exe -NoLogo -NoProfile -Command "$text = [IO.File]::ReadAllText($env:TEOH_SELF); & ([scriptblock]::Create(($text -split '(?m)^# POWERSHELL_START\r?$', 2)[1]))"
set "TEOH_STATUS=%ERRORLEVEL%"
pause
exit /b %TEOH_STATUS%
# POWERSHELL_START
$ErrorActionPreference = 'Stop'
$tempPath = $null
try {
$inputPath = (Resolve-Path -LiteralPath $env:TEOH_INPUT).ProviderPath
if ([IO.Path]::GetExtension($inputPath) -ine '.archive') {
throw 'Input must be a .archive file.'
}
$language = [IO.Directory]::GetParent($inputPath).Name
if ($language -notin @('en', 'ja', 'zh-Hans', 'zh-Hant', 'eo')) {
$language = Read-Host 'Target language (en, ja, zh-Hans, zh-Hant, eo)'
}
if ($language -cnotin @('en', 'ja', 'zh-Hans', 'zh-Hant', 'eo')) {
throw 'Use one of the listed language codes, with the exact spelling.'
}
$archive = ConvertFrom-Json -InputObject ([IO.File]::ReadAllText($inputPath))
if ($archive.FormatVersion -ne 2) { throw 'Archive FormatVersion 2 is required.' }
$rows = [Collections.Generic.List[object]]::new()
$seen = [Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal)
function Convert-Namespace($node, [string]$parent) {
if ($node.Namespace -isnot [string]) { throw 'Invalid archive namespace.' }
$namespace = $node.Namespace
if ($parent.Length -gt 0) { $namespace = $parent + '.' + $namespace }
foreach ($entry in $node.Children) {
if ($entry.Translation.Text -isnot [string]) { throw 'Invalid translation.' }
if ($entry.Translation.Text.Length -eq 0) { continue }
if ($entry.Key -isnot [string] -or $entry.Key.Length -eq 0 -or
$entry.Source.Text -isnot [string] -or $entry.Source.Text.Length -eq 0) {
throw 'Missing key or source text.'
}
$identity = $namespace.Length.ToString() + ':' + $namespace + $entry.Key
if (-not $seen.Add($identity)) { throw 'Duplicate namespace/key in archive.' }
$rows.Add([ordered]@{
namespace = $namespace
key = $entry.Key
source = $entry.Source.Text
translation = $entry.Translation.Text
})
}
foreach ($child in $node.Subnamespaces) {
Convert-Namespace $child $namespace
}
}
Convert-Namespace $archive ''
if ($rows.Count -eq 0 -or $rows.Count -gt 100000) {
throw 'Output must contain 1 to 100000 translated entries.'
}
$payload = [ordered]@{
language = $language
nativeCulture = 'eo'
translations = @($rows.ToArray())
}
$json = ConvertTo-Json -InputObject $payload -Depth 10
$bytes = [Text.UTF8Encoding]::new($false).GetBytes($json + [Environment]::NewLine)
if ($bytes.Length -gt 16MB) { throw 'Output exceeds the 16 MiB plugin limit.' }
$outputPath = [IO.Path]::GetFullPath($env:TEOH_OUTPUT)
$tempPath = $outputPath + '.' + [guid]::NewGuid().ToString('N') + '.tmp'
[IO.File]::WriteAllBytes($tempPath, $bytes)
$check = ConvertFrom-Json -InputObject ([IO.File]::ReadAllText($tempPath))
if (@($check.translations).Count -ne $rows.Count) { throw 'Output readback failed.' }
if ([IO.File]::Exists($outputPath)) {
$backup = $outputPath + '.' + [DateTime]::Now.ToString('yyyyMMdd-HHmmss-fff') + '.bak'
[IO.File]::Replace($tempPath, $outputPath, $backup)
Write-Host "Previous output backup: $backup"
} else {
[IO.File]::Move($tempPath, $outputPath)
}
$tempPath = $null
Write-Host "Generated $outputPath"
Write-Host "Language: $language; entries: $($rows.Count); nativeCulture: eo"
exit 0
} catch {
if ($tempPath -and [IO.File]::Exists($tempPath)) { [IO.File]::Delete($tempPath) }
[Console]::Error.WriteLine('ERROR: ' + $_.Exception.Message)
exit 1
}