Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: 【PROVIDE CHINESE】Thoughts about Localization  (Read 495 times)

RJCV

  • Escaped Lunatic
    • View Profile
【PROVIDE CHINESE】Thoughts about Localization
« on: December 07, 2022, 02:16:14 pm »

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#msg8206593
But 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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Logged
Chinese DF Wiki: dfzh.huijiwiki.com

Lamphare

  • Bay Watcher
    • View Profile
Re: 【PROVIDE CHINESE】Thoughts about Localization
« Reply #1 on: December 11, 2022, 07:53:00 pm »

Bump

Yeah I agree that we need some way to output strings including in their concacnated forms.

A few years back a Korean player actually came up with a way to export combined strings as they appear in game, and output an incomplete dictionary. Basically, these string arrays can be mapped to translations that then injected as a separate layer using native SDL funcitonality, which also relies on truetype fonts and unicode support.

If there is native support for this kind of data structures and truetype fonts (which I belive will be here very soon for the Steam version). Then not only it will help displaying the localized texts, it will make translation much easier and the product much much more sensible like RJCV mentioned.
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: 【PROVIDE CHINESE】Thoughts about Localization
« Reply #2 on: December 12, 2022, 02:19:35 am »

See my FotF question here, along with the resulting discussion and Toady One’s reply here.

Also see:

https://en.wikipedia.org/wiki/Gettext

Logged
Really hoping somebody puts this in their signature.