Greeting All :-)
Briefly introduce myself, I’m one of the administrators and contributors on DF Chinese Wiki, as well as the maintainers of the Chinese version DF (CLASSIC 0.47.05).
I have read the localization discussion that Toady One replied:
http://www.bay12forums.com/smf/index.php?topic=169696.msg8206593#msg8206593But I still want to explore the feasibility of translation.
Let's start by explain the localization principle (not current use but close)———modifying font rendering library to intercept & replace the text to be output.
However, this way doesn't require a syntax or grammar processing system, just require a special dictionary set. In order to build it, needs to extract the text containing the placeholders from the game and divide them into somehow.
The principle of replacement is to use the longest text and the text containing placeholders. Process them recursively, in the order of speech.
Take the “The Mountains of Slaying”example from the previous discussion, but Chinese.
Assume we have that (Ignore comments):
Mountains = 山岭 /*Mountain*/
Slaying = 杀戮 /*Slaying*/
The = 该 /*This*/
......
The Mountain of %s = %s之山 /*%sMountain*/
First, match “The”, but not the longest
Second, mach “The Mountain of %s”
Replace it
Now the %s is “Slaying”, matched and replace it
Get result “杀戮之山” /*Slaying Mountain*/
Return, it may also be a %s
Core idea is to create enough “special cases”. This leaves the grammatical issues to translators. Official just need to publish the extracted text and let the community of corresponding language add to it.
This can be done without changing the entire generation mechanism and the scattered strings. Simply add a replacement function to the bottom output function.
Considering multiple meanings and the order of expressions in different regions, may can also add recognition to the replacement function (Simply check of the current interface or history replacement records), and the ability to adjust the order of placeholder output, such as——
Assume:
Date: %s,%s,%s = Date: %1,%2,%3
“Date: 06,12,2022” still is “Date: 06,12,2022”
But assume:
Date: %s,%s,%s = Date: %3,%2,%1
“Date: 06,12,2022” can become “Date: 2022,12,06”
------------------------------------------------------------------------
bad news: steam version of DF supports only graphic fonts, so no unicode, no support for such languages as Chinese, Japanese, Korean
------------------------------------------------------------------------
That's all I can think of for now.
We have enough players, enough enthusiasm, and enough understanding of DF.EXPECT NATIVE LOCALIZATION SUPPORT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!