How to Make a Language Pack


Recommended Posts

  • Developer

You can also view this guide directly in steam here.

Language Pack Content Guidelines

  • Unless specifically stated in the pack description, language packs are expected to be a reasonable interpretation of the original content localized into the language provided.
  • You may provide new versions of the text in the game that does not adhere to the original script, however you must specifically provide this information in the description of the language pack.
  • All language packs must adhere to steam content guidelines and our own community standards guidelines.
  • You may not use text from other language packs unless specifically authorized to do so. Please add the original creator as a collaborator whenever possible.

Failure to comply with these guidelines may result in the removal of the pack from the workshop.

Setting up your Mod Locally
 
The game will search for language packs in the <InstallPath>/mods directory, where <InstallPath> is the game's installation folder, where the game binaries reside.  Each language pack is a folder within the mods/ directory, and initially can have whatever name you like.  Later, once your language pack is uploaded to Steam Workshop, it will be downloaded to this same location with a unique name related to its unique Steam Workshop identifier.
 
Each language pack should have the following files:

  • fonts - A directory containing all the required .png and .fnt files for each font used in the game.
  • lang.po - A .po file (http://en.wikipedia.org/wiki/Gettext)  containing all the language's translated strings.
  • modinfo.txt - A simple text file with some basic information about the language pack
  • preview.jpg - A JPG image used as the preview image for your Steam Workshop mod.

For example, your language pack directory structure would look something like this:
 

+ invisibleinc.exe+ characters.kwad+ gui.kwad...+ mods/    + language_pack/        + lang.po        + modinfo.txt        + preview.jpg        + fonts             + courier_14.0.png             + courier_14.fnt             + font1_10.r.fnt             + font1_10_r_0.png             + ...

 
lang.po
 
To generate a .pot (PO Template) file for translating, launch Invisible, Inc. and from the main menu enter the credits screen.  Once in the credits screen, hit CTRL+INSERT.  A black console window should open in the middle of the screen, in front of the credits movie.  Click the area beside the '>' prompt so that a line cursor appears, and type 'localize' followed by ENTER.  This will cause you to reappear in the main menu, but will also produce a strings.pot file in the game folder.
 
You can use any tool you like to load the strings.pot file and perform the translations. You should use it to save a .po file named after your language of translation.  (For example, german.po would be apt)
 
modinfo.txt
 
This file contains a list of key-value pairs of the form <KEY> = <VALUE>, separated by new-lines. The required values should appear like follows:
 
locale = <Language Name>
poFile = <.po filename>
id = <unique id>
 
The 'locale' field should be a readable name that represents your language.  This string will appear in the Languages combo-box in the Gameplay tab of the options dialog.
 
The 'poFile' field should be the filename of the .po file you translated.
 
The 'id' field should be a unique identifying string for your language pack.
 
preview.jpg
The preview image should be a JPG or PNG formatted image with square dimensions no larger than 512x512.  This preview image is only for display in the Steam Workshop.
 
fonts
 
You can override the game's font textures by including filenames of the same name within this folder.  If you do not override the font textures, then the game's default font textures will be used.  The game's default font textures may not have all the characters that you require for your translation, however.  By default, glyphs are included representing code points 32-126,128,130-140,142,145-156,158-180,182-255 of the Basic Latin and Latin-1 Supplement Unicode character range.

 

Below is a list of all the referenced fonts in the game. To override a given font, you would need to include both the .png and the .fnt of a given name within your mod's font folder.  The filename gives a hint as to the style of font it contains (eg. font1_12_sb indicates the main game font at size 12, semibold).  Your overridden font does not strictly need to adhere to these hints, but if they do not, then text using that font may not fit within the space allotted for it in the UI.

 

Each .png represents a bitmapped font, and contains all the glyphs necessary to render text at a given size and style.  The corresponding .fnt files describe the location of each glyph and other details about how the font should be rendered.

 

To generate these files, you can use the popular AngelCode freeware BMFont Generator.  There is documentation on the site that describes how to go about generating bitmapped fonts.

 

courier_14.fntcourier_14_0.pngfont1_10_r.fntfont1_10_r_0.pngfont1_11_sb.fntfont1_11_sb_0.pngfont1_12_l.fntfont1_12_l_0.pngfont1_12_r.fntfont1_12_r_0.pngfont1_12_sb.fntfont1_12_sb_0.pngfont1_14_l.fntfont1_14_l_0.pngfont1_14_r.fntfont1_14_r_0.pngfont1_16_b.fntfont1_16_b_0.pngfont1_16_l.fntfont1_16_l_0.pngfont1_16_m.fntfont1_16_m_0.pngfont1_16_r.fntfont1_16_r_0.pngfont1_16_sb.fntfont1_16_sb_0.pngfont1_18_r.fntfont1_18_r_0.pngfont1_18_sb.fntfont1_18_sb_0.pngfont1_24_r.fntfont1_24_r_0.pngfont1_32_sb.fntfont1_32_sb_0.pngfont1_33_l.fntfont1_33_l_0.pngfont1_36_m.fntfont1_36_m_0.pngfont1_36_r.fntfont1_36_r_0.pngfont1_48_m.fntfont1_48_m_0.pngfont1_52_b_i.fntfont1_52_b_i_0.pngfont1_m_15px.fntfont1_m_15px_0.pngfont1_m_20px.fntfont1_m_20px_0.pngfont1_r_20px.fntfont1_r_20px_0.pngfont1_sb_15px.fntfont1_sb_15px_0.pngfont1_sb_20px.fntfont1_sb_20px_0.pngfont1_sb_25px.fntfont1_sb_25px_0.pngfont1_sb_80px.fntfont1_sb_80px_0.pngfont4_32_r.fntfont4_32_r_0.pngfont4_8_r.fntfont4_8_r_0.pngpixel_16.fntpixel_16_0.pngpixel_18.fntpixel_18_0.pngpixel_27.fntpixel_27_0.pngpixel_8.fntpixel_8_0.pngpixel_9.fntpixel_9_0.png

 

Uploading Your Mod
 
Download and run the Localization Uploader from Steam.  Hover your mouse over “LIBRARY” at the top of the Steam client, and select “Tools” from the dropdown list.
 
Find “Invisible Inc Localization Uploader” in the list, and double click to run the Localization Uploader. The main window of the Localization Uploader contains a list of mods which you have published to Workshop (which will start off empty), and buttons to Add, Delete or Edit mods that you have uploaded. There are also links to the Steam Workshop and the Steam Subscriber Agreement.

  • Click the Add button, which will bring up the Mod Properties window. When adding a mod for the first time, all of the fields are required
    • The data folder, which contains all of the files for your mod.
    • A preview image, to be displayed in the Steam Workshop
    • A name, and description to be displayed in the Steam Workshop
    • You may optionally select from one or more Tags to help players find your mod on Workshop.
  • Click Browse next to the Update Data field, and select the folder which contains your mod. At a minimum, the folder must contain a valid modinfo.lua file.  The Localization Uploader will warn you if the folder you have selected doesn’t contain a valid modinfo.lua
  • Notice: ALL of the files in the folder that you selected will be uploaded to Steam Workshop, regardless of whether you have used them in making your mod or not.  So make sure there are no temporary or extra files contained in your mod folder that you don’t want to be included with your mod. You can always include a ReadMe.txt or similar file if you want.
  • Your mod also requires a Preview Image.  The Localization Uploader will default to looking for a file called “preview.jpg” in your mod folder, but you can click Browse to select a different JPG or PNG image if you wish. The preview image should be square and no larger than 512x512. This preview image is only for display in the Steam Workshop.
  • Press Publish!

The Localization Uploader will package and upload your mod to Steam Workshop. If all goes well, the upload will succeed and your mod will be uploaded to Workshop.  You may need to wait a few seconds and click Refresh before your mod will be displayed in the Localization Uploader, and it may take several minutes before your mod is visible on the Workshop website.

  • Like 6
Link to comment
Share on other sites

Ok, can someone explain me what I have to do to get fonts that support ä,ö,ü and ß. Im kinda not get that fonds thing

Edit: Also what do you mean with NT in the file

Edit 2: Now Im at 2% this is going to take a while

Edited by HumanKirby
Link to comment
Share on other sites

Ok, can someone explain me what I have to do to get fonts that support ä,ö,ü and ß. Im kinda not get that fonds thing

Edit: Also what do you mean with NT in the file

Edit 2: Now Im at 2% this is going to take a while

 

The game supports them by default:

s8rOFLT.png

 

according to IEC_8859-1 codepage.

The only thing you should take into account, is that you have to use utf-8 as main codepage of your PO file.

Edited by Some1
Link to comment
Share on other sites

Hi there!

 

I'm new around here, but asked in twitter, told me to ask here... well, here I am. I did a spanish translation of this game (loved it, btw!), but I need something... I kinda now a little of this and that, but in the font, I'm absolutely lost. I could read above this, and in the steam guide and such, that you can override the fonts in the game, with the ones you put in the "fonts" directory of your mod.

 

Well, yes, but... I don't know the name of the fonts. Also, I wouldn't like to change at all the font style. I think it suits almost perfectly the game. I would like to edit the existing fonts, and by the looks of the image Some1 posted, can I?

 

I have almost every character I need for a spanish translation, but I need "¿", "¡", it's really important. Also, in some places, it seems to have a different font (in the skills level description, for example), so I couldn't even place some " á ", " é "... etc. Not even the "ñ" (which I could in other places)

 

That's about all... Oh, and in some cases, if I translate VAULT as CÁMARA, it shows at CáMARA... only in a few spots.

 

Too long, I know, but... any help, would be appreciated ^^

Link to comment
Share on other sites

I can't edit, so... sorry for the double post. Just REALLY read the Some1 post and.. god, I feel stupid. utf-8 codification, of course! Didn't saw that in my notepad++... I think it was already at utf-8. But I forgot I change my hard drive, so I installed everything again and... agh. Goddammit. I'm sorry.

 

Although, I'll love some info in the font matter, though. A friend is making a french translation, and I think he need it for 2 or 3 characters or such. So... sorry, and could a mod merge the post? Please?

 

Thanks for all anyway ^^

Link to comment
Share on other sites

  • Developer

How about GOG-version of game? Any chance to get localization working with DRM-free?

 
Regarding localization support on the non-Steam builds, this will hopefully be supported by a new build at some point in the near future.

 

Hi there!

 

I'm new around here, but asked in twitter, told me to ask here... well, here I am. I did a spanish translation of this game (loved it, btw!), but I need something... I kinda now a little of this and that, but in the font, I'm absolutely lost. I could read above this, and in the steam guide and such, that you can override the fonts in the game, with the ones you put in the "fonts" directory of your mod.

 

Well, yes, but... I don't know the name of the fonts. Also, I wouldn't like to change at all the font style. I think it suits almost perfectly the game. I would like to edit the existing fonts, and by the looks of the image Some1 posted, can I?

 

I have almost every character I need for a spanish translation, but I need "¿", "¡", it's really important. Also, in some places, it seems to have a different font (in the skills level description, for example), so I couldn't even place some " á ", " é "... etc. Not even the "ñ" (which I could in other places)

 

That's about all... Oh, and in some cases, if I translate VAULT as CÁMARA, it shows at CáMARA... only in a few spots.

 

Too long, I know, but... any help, would be appreciated ^^

 

Hi Azure,

 

I updated the original post to include a list of all the font files that can be overridden.  See the 'Spoiler' button under the section describing the fonts folder. Be warned the process is somewhat technical.  Also, I would suggest looking at the Russian mod by Some1 that is currently on Steam, if you haven't already.  It is an excellent reference point, and overrides all the game's fonts.

 

If you don't intend on changing the look of the fonts and are just missing a few certain characters, it is possible I can look at adding glyphs for those missing code points into the game's fonts by default so that no overrides are necessary. This would alleviate the burden for many translators.

 

Thanks for your efforts!

Link to comment
Share on other sites

@rooks, I think it would be nice, if you provide people with bmfont presets, as Brook did for me. Though developing of those presets without assistance could turn to true headache, you know...

 

 

It is an excellent reference point, and overrides all the game's fonts.

Yeah, and even some extra-fonts, which were deleted during past steps of developement :)

Edited by Some1
Link to comment
Share on other sites

 

I updated the original post to include a list of all the font files that can be overridden.  See the 'Spoiler' button under the section describing the fonts folder. Be warned the process is somewhat technical.  Also, I would suggest looking at the Russian mod by Some1 that is currently on Steam, if you haven't already.  It is an excellent reference point, and overrides all the game's fonts.

 

If you don't intend on changing the look of the fonts and are just missing a few certain characters, it is possible I can look at adding glyphs for those missing code points into the game's fonts by default so that no overrides are necessary. This would alleviate the burden for many translators.

 

Thanks for your efforts!

 

 

Thanks for the info! In fact, with the utf-8 encoding in the .po file, it works.... in one font, I assume. In the little one, like in the description of the skill levels and such, doesn't seem to support any latin-1 character as I need, like ñ, á, é, ¡, ¿....

 

If you could add it to the default font, that would be awesome, but in the meantime, we'll just workaround that ^^. So... I'll need to modify that font, or at least create one As Some1 said (that looks like a quote, lol), it can be a headache... but if it's no other way, I'll do it without hesitate. I mean, I know enough to learn really fast. And don't mind the work.

 

Some1, if you wish, could you tell me a little about it? :3

Link to comment
Share on other sites

Hey, @AzureBalmung, why don't you just use my versions of those?

They seem to have all glyph you need:

JFmu8LD.png

 

That's awesome!

 

I didn't realized. I mean, I think you added cyrillic, not all that :D. I'll use it (with proper credits, of course).

 

Thanks a lot ;)

Link to comment
Share on other sites

Hi, sorry for joining in a little bit late, but I also have issues with the characters/glyphs.

I would like to translate the game into Hungarian, and these letters are not supported:

 

Ő, Ű, ő, ű

 

I tried to override the font files, but this BMF program is quite a challenge for me. Is it possible to put these

characters into the fonts (I don't intend to change the default game font), or I have to do it manually?

 

Thank you for your help.

Link to comment
Share on other sites

Hello,

 

   I'm working on Turkish Translation and I need some characters. I tried BMfont, used courier font as well and added courier_14.fnt and courier_14_0.png files in fonts folder but i couldn't apply the characters that i want to game.

 

   I need " Ğ - ğ - Ü - ü - Ş - ş - İ - ı - Ö - ö - Ç - ç " characters. It seems game already has " Ü - ü - Ö - ö - Ç - ç ". So i just need 6 characters. Can anyone show me how to apply font file to mod. Just drop the file and .bmp to fonts folder?  Maybe I'm doing wrong something with BMFont program. 

 

Or is it possible to add " Ğ - ğ - Ş - ş - İ - ı " characters to game.

 

Thanks for help.

Link to comment
Share on other sites

38 minutes ago, ZephyrSails said:

Hello, I'm a Chinese translator, I found my translation couldn't change line automatically, do we need to insert the '\n' character manually?

I just found Japanese translation's .po file add the "\n" manually, and another Chinese translation version's .po file add the "\n" manually too. ...... Please tell me there are a better way to do this :$

----edit----

I just found the Korean translation didn't add "\n" in their .po file, and their translation change line correctly, but how did they do this?

Edited by ZephyrSails
found something new.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now