Localizing a Unity project is usually described as a translation problem. In practice, a big part of it is an extraction problem: before a translator can touch anything, every string has to be found, and in most projects it is scattered everywhere.
Strings live in at least four places:
-
.csscripts —label.text = "Game Over";, including interpolated strings like$"{name} earned {coins} coins!" -
.prefabfiles — serialized text fields such asm_Text: Play -
.unityscenes —m_Caption: Continue? -
.assetfiles used by ScriptableObjects
Miss one of these and the translated build ships with a line of English still in it.
What has to be extracted, not just searched
A localization pass is only as good as its coverage. What actually needs to come out of the project:
-
C# string literals, normal and interpolated. Real parsing matters here:
$"{name} earned {coins} coins!"must come out as{name} earned {coins} coins!, with placeholders intact for the translator. -
Serialized text fields inside prefabs, scenes and assets:
m_Text,m_text,m_Caption,m_Title,m_Description,m_Name,m_Label,m_Content. -
Escaped text restored —
"\u4F60\u597D"becomes 你好,\nbecomes a real newline. Translators should never see escape sequences. -
Duplicates grouped, with locations — the same
"Back"may appear 40 times; you need every file and line, or you fix one and miss 39. -
Junk excluded —
Debug.Log/LogWarning/LogError,print,PlayerPrefs.*,Resources.Load,GameObject.Find,FindObjectOfType(s), comments and attributes. None of that belongs in a translation file.
If you do it by hand, that is roughly an afternoon per project, redone every time the game grows. Regex makes it worse: it mangles interpolated strings and happily returns comments and log calls.
What I built
I wrote a small Windows tool that runs outside the Editor and does the whole pass: it reads the folder you point it at, parses C# with Roslyn (real syntax tree, not regex), reads the serialized text fields, restores escaped text, de-duplicates, and records the file and line for every string.

There is also a lossless mode: if you would rather collect everything and filter manually, it keeps every candidate instead of applying the junk filters.

The output is one CSV — Key, Id, Text, Path, Line, Type — that imports into I2 Localization, or opens in Excel / Google Sheets and goes straight to a translator.


It's here: https://unitytextextractor.tech — free to try, 10,000 characters on sign-up. I'm the developer, so if it misses a string or picks up junk in your project, tell me and I'll fix it.
Before you hand files to a translator
A quick checklist that has saved me more than once:
- every
.cs,.prefab,.unity,.assetunder the project folder covered - interpolated strings intact, placeholders not broken
- escaped characters readable
- duplicates de-duplicated but all locations kept
- one file the translator can actually open
Top comments (0)