In game language support
Well
Join Date: 2006-10-04 Member: 58054Members, Squad Five Blue, Reinforced - Shadow
in Translation
<div class="IPBDescription">The localization is working?</div>I download localization file, copy it to C:\Steam\steamapps\common\natural selection 2\ns2\gamestrings\ but still game in English.
Try rename my file to enUS.txt, but still in English.
The localization is working?
Try rename my file to enUS.txt, but still in English.
The localization is working?
Comments
It's looks like not all message support Russian.
Russian not present in language list.
Who is responsible for supporting the language in the game?
I do not understand what happens, but it does not take into account everything into the file, for example "Death" on the screenshot do not match the one in the file. The weird thing is? Yesterday it was displaying the right string ingame... can't understand that.
Sometimes like the word "Version" on top of the screen, it fails and deletes one character, and it's a regular "i" there, nothing too fancy.
<img src="http://uppix.com/f-Untitled_1505ae8100010e3c8.jpg" border="0" class="linked-image" />
On the website translate.unknownworlds there is a problem too. When I change something, approve it and try to download the file, the file do not reflect those changes, perhaps we have to wait?
Russian not present in language list.
Who is responsible for supporting the language in the game?<!--QuoteEnd--></div><!--QuoteEEnd-->
Yeah, some fonts only support the english part of the latin alphabet. The language list is hardcoded, so you have to contact the devs on that.
<!--quoteo(post=1980670:date=Sep 20 2012, 11:46 AM:name=Regnareb)--><div class='quotetop'>QUOTE (Regnareb @ Sep 20 2012, 11:46 AM) <a href="index.php?act=findpost&pid=1980670"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Well, I have some problems with the localization too.
I do not understand what happens, but it does not take into account everything into the file, for example "Death" on the screenshot do not match the one in the file. The weird thing is? Yesterday it was displaying the right string ingame... can't understand that.
Sometimes like the word "Version" on top of the screen, it fails and deletes one character, and it's a regular "i" there, nothing too fancy.
<img src="http://uppix.com/f-Untitled_1505ae8100010e3c8.jpg" border="0" class="linked-image" />
On the website translate.unknownworlds there is a problem too. When I change something, approve it and try to download the file, the file do not reflect those changes, perhaps we have to wait?<!--QuoteEnd--></div><!--QuoteEEnd-->
Yeah, I've noticed it takes a while before it shows up in the file you download. Not sure what the magic number is, though.
Not sure on the rest... I've never had an issue with that.
does the game use different fonts for different parts of the strings?
for instance,
<img src="http://i.imgur.com/6XeYc.jpg" border="0" class="linked-image" />
If you take a look at this screenshot, the scoreboard displays the korean font fine but alient alert and tooltip doesn't.
So, I guess the fonts used to display scoreboard and that of alien alert and tooltip are different.
If so, is it possible to change them via LUA scripts or file replacement?
I just would like to see how they are displayed on screen without having to worry about fonts first.
I know there's an alien font, a marine font, and then the "generic" scoreboard fonts, so I'm not sure why it would show up in the scoreboard correctly but not on the notifications... maybe email charlie? Their emails are <a href="http://www.unknownworlds.com/about" target="_blank">here</a>.
I think they mentioned they wanted to change the alien font so it supported more characters, but probably latin alphabet only at this point.
X:\Steam\SteamApps\common\natural selection 2\core\fonts
Agency FB type are use for marine text.
Stamp type for alien text -> this one have serious problem, as it don't even support latin accent character
They're other "normal font" like arial, calibri I suppose they use it for game menu.
There are 2 different font types used in the game: TrueType Font (ttf) and Bitmap Font (fnt)
TTF files seem to be hardcoded and cannot be changed via LUA files. These include, but not all, the following
calibri.ttf (scoreboard)
Candara.ttf (used for some Alien strings)
TTF files naturally support unicode characters so any strings that use TTF fonts will be displayed properly regardless of the language.
Size and style, however, is another story so strings will look off-sized and very generic for non latin alphabets.
And then, there are FNT files that do not seem to support unicode characters, which is causing us the problem at hand.
These files namely include:
AgencyFB_*.fnt
Arial_15.fnt
Stamp_large.fnt
Kartika_*.fnt
For some of these files, there are multiple files for a particular font. For instance, AgencyFB has medium, large, small, and tiny fnt
files and it seems fnts have fixed sizes. I have tried many different font viewers but failed to view any of these files so I can't
say it for sure but it seems to be the case. Unlike TTF fonts, FNT fonts can be changed via LUA files and here is the list of all LUA
files that use fnt files.
<!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->lua\Globals.lua
<blockquote> Line 20: kMarineFontName = "fonts/AgencyFB_large.fnt"
Line 23: kAlienFontName = "fonts/AgencyFB_large.fnt"
Line 26: kNeutralFontName = "fonts/AgencyFB_large.fnt"</blockquote>
lua\GUIActionIcon.lua
<blockquote> Line 62: self.pickupKey:SetFontName("fonts/AgencyFB_small.fnt")
Line 72: self.pickupText:SetFontName("fonts/AgencyFB_small.fnt")
Line 82: self.hintText:SetFontName("fonts/AgencyFB_small.fnt")</blockquote>
lua\GUIAlienHUD.lua
<blockquote> Line 26: local kHealthFontName = "fonts/Stamp_large.fnt"
Line 27: local kArmorFontName = "fonts/Stamp_medium.fnt"
Line 28: local kAbilityNumFontName = "fonts/Kartika_small.fnt"
Line 30: local kUmbraTextFontName = "fonts/Stamp_large.fnt"</blockquote>
lua\GUIAlienTeamMessage.lua
<blockquote> Line 18: local kMessageFontName = "fonts/Stamp_large.fnt"</blockquote>
lua\GUIBulletDisplay.lua
<blockquote> Line 33: self.ammoTextBg:SetFontName("fonts/MicrogrammaDMedExt_large.fnt")
Line 43: self.ammoText:SetFontName("fonts/MicrogrammaDMedExt_large.fnt")</blockquote>
lua\GUIChat.lua
<blockquote> Line 22: local kFontName = { marine = "fonts/AgencyFB_small.fnt", alien = "fonts/AgencyFB_small.fnt" }
Line 22: local kFontName = { marine = "fonts/AgencyFB_small.fnt", alien = "fonts/AgencyFB_small.fnt" }</blockquote>
lua\GUICommanderLogout.lua
<blockquote> Line 30: GUICommanderLogout.kFontName = "fonts/AgencyFB_large.fnt"</blockquote>
lua\GUICommanderManager.lua
<blockquote> Line 21: GUICommanderManager.kLocationTextFont = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUICommanderTooltip.lua
<blockquote> Line 96: local fontName = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUICountDownDisplay.lua
<blockquote> Line 14: GUICountDownDisplay.kFontName = "fonts/Arial_15.fnt"</blockquote>
lua\GUIDeathMessages.lua
<blockquote> Line 15: local kFontNames = { marine = "fonts/AgencyFB_small.fnt", alien = "fonts/Kartika_medium.fnt" }
Line 15: local kFontNames = { marine = "fonts/AgencyFB_small.fnt", alien = "fonts/Kartika_medium.fnt" }</blockquote>
lua\GUIDeathScreen.lua
<blockquote> Line 15: local kFontName = "fonts/AgencyFB_medium.fnt"</blockquote>
lua\GUIFadeDoubleJumpHelp.lua
<blockquote> Line 17: local kFontName = "fonts/Stamp_large.fnt"</blockquote>
lua\GUIFeedback.lua
<blockquote> Line 15: GUIFeedback.kTextFontName = "fonts/AgencyFB_tiny.fnt"</blockquote>
lua\GUIGameEnd.lua
<blockquote> Line 22: local kMessageFontName = { marine = "fonts/AgencyFB_huge.fnt", alien = "fonts/Stamp_huge.fnt" }
Line 22: local kMessageFontName = { marine = "fonts/AgencyFB_huge.fnt", alien = "fonts/Stamp_huge.fnt" }</blockquote>
lua\GUIGrenadelauncherDisplay.lua
<blockquote> Line 59: self.ammoDisplay:SetFontName("fonts/MicrogrammaDMedExt_large.fnt")</blockquote>
lua\GUIInsight_AlertQueue.lua
<blockquote> Line 37: local kFontName = "fonts/AgencyFB_medium.fnt"</blockquote>
lua\GUIInsight_Location.lua
<blockquote> Line 14: local kFontName = "fonts/AgencyFB_large.fnt"</blockquote>
lua\GUIInsight_Logout.lua
<blockquote> Line 15: local kFontName = "fonts/AgencyFB_large.fnt"</blockquote>
lua\GUIInsight_Overhead.lua
<blockquote> Line 17: local kFontName = "fonts/AgencyFB_medium.fnt"</blockquote>
lua\GUIInsight_TechPoints.lua
<blockquote> Line 23: local kFontName = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUIMarineBuyMenu.lua
<blockquote> Line 28: GUIMarineBuyMenu.kFont = "fonts/AgencyFB_small.fnt"
Line 29: GUIMarineBuyMenu.kFont2 = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUINotifications.lua
<blockquote> Line 48: GUINotifications.kGeneralFont = "fonts/Arial_15.fnt"
Line 49: GUINotifications.kMarineFont = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUIProgressBar.lua
<blockquote> Line 16: GUIProgressBar.kFontName = "fonts/AgencyFB_medium.fnt"</blockquote>
lua\GUISelectionPanel.lua
<blockquote> Line 15: GUISelectionPanel.kFontName = "fonts/AgencyFB_large.fnt"
Line 20: GUISelectionPanel.kStatusFontName = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUISensorBlips.lua
<blockquote> Line 17: GUISensorBlips.kFontName = "fonts/Arial_15.fnt"</blockquote>
lua\GUIShotgunDisplay.lua
<blockquote> Line 40: slash:SetFontName("fonts/AgencyFB_large_bold.fnt")
Line 42: slashBg:SetFontName("fonts/AgencyFB_large_bold.fnt")
Line 59: textBg:SetFontName("fonts/MicrogrammaDMedExt_medium.fnt")
Line 68: text:SetFontName("fonts/MicrogrammaDMedExt_medium2.fnt")</blockquote>
lua\GUIUnitStatus.lua
<blockquote> Line 15: GUIUnitStatus.kMarineFontName = "fonts/AgencyFB_small.fnt"</blockquote>
lua\GUIWaypoints.lua
<blockquote> Line 31: local kMarineTextFontName = "fonts/AgencyFB_small.fnt"
Line 32: local kAlienTextFontName = "fonts/Kartika_small.fnt"</blockquote>
lua\GUIWelderDisplay.lua
<blockquote> Line 67: self.percentageText:SetFontName("fonts/AgencyFB_large_bold.fnt")</blockquote>
lua\GUIWorldText.lua
<blockquote> Line 11: GUIWorldText.kFont = "fonts/AgencyFB_small.fnt"</blockquote>
lua\Hud\GUIEvent.lua
<blockquote> Line 107: GUIEvent.kFontName = "fonts/AgencyFB_small.fnt"</blockquote>
lua\Hud\GUIInventory.lua
<blockquote> Line 14: GUIInventory.kFontName = "fonts/AgencyFB_tiny.fnt"</blockquote>
lua\Hud\GUINotificationItem.lua
<blockquote> Line 36: GUINotificationItem.kFontName = "fonts/AgencyFB_small.fnt"</blockquote>
lua\Hud\GUIPlayerResource.lua
<blockquote> Line 44: GUIPlayerResource.kTextFontName = "fonts/AgencyFB_small.fnt"
Line 45: GUIPlayerResource.kTresTextFontName = "fonts/AgencyFB_tiny.fnt"
Line 46: GUIPlayerResource.kResGainedFontName = "fonts/AgencyFB_tiny.fnt"</blockquote>
lua\Hud\Marine\GUIMarineHud.lua
<blockquote> Line 103: GUIMarineHUD.kTextFontName = "fonts/AgencyFB_small.fnt"
Line 104: GUIMarineHUD.kCommanderFontName = "fonts/AgencyFB_small.fnt"
Line 105: GUIMarineHUD.kNanoShieldFontName = "fonts/AgencyFB_large.fnt"</blockquote>
lua\Hud\Marine\GUIMarineStatus.lua
<blockquote> Line 63: GUIMarineStatus.kFontName = "fonts/AgencyFB_large_bold.fnt"</blockquote>
lua\Loading.lua
<blockquote> Line 153: statusText:SetFontName("fonts/AgencyFB_large.fnt")
Line 160: dotsText:SetFontName("fonts/AgencyFB_large.fnt")
Line 172: tipText:SetFontName("fonts/AgencyFB_small.fnt")
Line 191: tipNextHint:SetFontName("fonts/AgencyFB_small.fnt")</blockquote>
lua\menu\DropDown.lua
<blockquote> Line 15: local kDefaultOptionFontName = "fonts/Arial_15.fnt"</blockquote>
lua\menu\Font.lua
<blockquote> Line 19: local kDefaultFontName = "fonts/Arial_15.fnt"</blockquote>
lua\menu\MenuButton.lua
<blockquote> Line 14: local kDefaultMenuButtonFontName = "fonts/Arial_15.fnt"</blockquote>
lua\menu\SlideButton.lua
<blockquote> Line 15: local kDefaultSlideButtonFontName = "fonts/Arial_15.fnt"</blockquote>
lua\menu\TitleBar.lua
<blockquote> Line 17: local kDefaultTitleBarFontName = "fonts/Arial_15.fnt"</blockquote>
lua\menu\main_menu.css
<blockquote> Line 83: font-name: fonts/AgencyFB_large.fnt;
Line 89: font-name: fonts/AgencyFB_small.fnt;
Line 97: font-name: fonts/AgencyFB_small.fnt;
Line 104: font-name: fonts/AgencyFB_small.fnt;
Line 121: font-name: fonts/AgencyFB_small.fnt;
Line 133: font-name: fonts/AgencyFB_large.fnt;
Line 293: font-name: fonts/AgencyFB_large.fnt;
Line 367: font-name: fonts/AgencyFB_large.fnt;
Line 392: font-name: fonts/AgencyFB_large.fnt;
Line 497: font-name: fonts/AgencyFB_small.fnt;
Line 511: font-name: fonts/AgencyFB_large.fnt;
Line 537: font-name: fonts/AgencyFB_small.fnt;
Line 573: font-name: fonts/AgencyFB_small.fnt;
Line 634: font-name: fonts/AgencyFB_large.fnt;
Line 647: font-name: fonts/AgencyFB_large.fnt;
Line 661: font-name: fonts/AgencyFB_large.fnt;
Line 678: font-name: fonts/AgencyFB_large.fnt;
Line 695: font-name: fonts/AgencyFB_large.fnt;
Line 712: font-name: fonts/AgencyFB_large.fnt;
Line 731: font-name: fonts/AgencyFB_medium.fnt;
Line 750: font-name: fonts/AgencyFB_medium.fnt;
Line 769: font-name: fonts/AgencyFB_medium.fnt;
Line 820: font-name: fonts/AgencyFB_tiny.fnt;
Line 862: font-name: fonts/AgencyFB_small.fnt;
Line 995: font-name: fonts/AgencyFB_medium.fnt;
Line 1070: font-name: fonts/AgencyFB_small.fnt;
Line 1080: font-name: fonts/AgencyFB_small.fnt;
Line 1113: font-name: fonts/AgencyFB_small.fnt;
Line 1120: font-name: fonts/AgencyFB_small.fnt;
Line 1189: font-name: fonts/AgencyFB_small.fnt;
Line 1206: font-name: fonts/AgencyFB_medium.fnt</blockquote><!--QuoteEnd--></div><!--QuoteEEnd-->
LUA file and variable names should give a clear sense of what each font is used for. Also note that main_menu.css is the style
schema for the main menu. I have tried replacing fnt files with ttf files in LUA but the game does not display any
strings so I guess the fonts needs to stay in fnt format.
Strangely, a quick dirty fix for the problem is to actually replace these FNT files with TTF files. For example, rename
AgencyFB_large.fnt to AngecyFB_large.old and rename arial.ttf to AgencyFB_large.fnt. Then, all the strings using AgencyFB_large
will be displayed properly with non latin alphabets but again, the size will be off and will look generic. Even latin alphabets will lose
their size and style.
Well, this is I have so far but more thorough explanation from the dev would be very much appreciated.
The problem roots from the fact that FNT files included in the game only contain latin alphabets.
So, we need to re-make FNT font files, which "read" images of fonts from associated png files, with
characters that we wish to display. These fonts are created by using a program called BMFont that converts
TTF files into FNT files, and bmfc (BMFont configuration file) included in the game tells us so.
Upon realizing this, I have tried the following methods.
1. Create a new TTF font by combining the existing font with a font that has Korean characters
-> doesn't work in game but the font works in other applications, MS word etc.
2. Create FNT by converting a font that has Korean characters -> does not work
3. Any other possible combinations of what I did above. -> none of them works
when I say "it doens't work", I mean that the latin alphabets are displayed corrently in game but not
unicode characters. Therefore, at this point, I'm fairly certain that the game simply does not read unicode
characters from FNT files, which leaves us no hope whatsoever.
that's correct. the same happened in chinese characters.
and i made a FNT+PNG file include chinese characters, and rename it to "AgencyFB_large.fnt" and replace. like this:
<img src="http://i.imgur.com/xt1gS.jpg" border="0" class="linked-image" />
see? but it <u>only show latin alphabets</u>.
<img src="http://i.imgur.com/u2sQo.jpg" border="0" class="linked-image" />
It's a simple way to show chinese characters. only need edit .lua files. like this:
<img src="http://i.imgur.com/Age4j.jpg" border="0" class="linked-image" />
but there are some problems with this method, because build 221 add consistency checking to server side.
so if i edited .lua files, i can join non-consistency checks server only.
<img src="http://i.imgur.com/zRofQ.jpg" border="0" class="linked-image" />
now i have no idea about this. hoping uwe developers give more supports to localization characters displaying.
Could you explain this more in detail? Because when I tried to edit LUA files, it still didn't work. (pre 222)
Did you replace FNT files with TTF? or customized FNT?
It's looks like not all message support Russian.
Russian not present in language list.
Who is responsible for supporting the language in the game?<!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="http://imageshack.us/a/img853/8563/ns22012121603542250.jpg" border="0" class="linked-image" />
it's possible display all Russian messages and also use Russian chat and pass consistency on 99.9% servers. In order to do this, we need:
1) Russian fnt+png fonts without Unicode support, so russian characters will use single-byte extended codepages instead of Unicode codes.
2) Replace russian symbols in ruRU.txt with UTF-8 encoding to there symbols like й to é, ц to ö, у to ó and etc. There symbols usually appears in chat when you don't have russian fnt+png.
Explanation of trick:
We replacing symbols because this game converts UTF-8 symbols to single-byte encoding in order to use fnt+png fonts. Game will convert only those symbols, that exists in <a href="http://www.ascii-code.com/" target="_blank">single-byte extended ASCII codepage</a>.
For example game converts the following symbol æ. This symbol have a UTF-8 code 0xC3A6. So, it will be converted to single-byte code 0xC6 because this character exists on single-byte extended ASCII codepage. Now the game will show symbol with the code 0xС6 from fnt+png fonts. With Russian fonts that generated without Unicode support game will display the character ж because it has code 0xС6 in fnt+png fonts.
Another example. Game converts the following symbol Ж. This symbol have a UTF-8 code 0xD096. It will not converted because this character doesn't exists on single-byte extended ASCII code page and will be dropped.