Jump to content

About localization


Recommended Posts

The default manual of Torquescript for "Localization" mentions the use of a tool for compiling the language files called langc. But it seems that file isn't included anymore.

The first search with google for a fix shows this 2010 thread:


There, there is a change of the C++ code to use as substitute of langc.

I guess -I haven't tested- the codified/open issue with the .lso files could be changed using them inside a zip with a password.

It seemed to work but it's a fix of the code from over four years ago. Do you think anything should be changed or added or is it alright like this? Will any issue arise if the language files are too big (like the ones from a RPG or a VisualNovel)?

Or should I use another way for localization? I wasn't able to find many support for that.

Link to comment
Share on other sites

honestly, the easiest way that I could think of doing this is to not even touch the engine at all for localization. Instead, an alternative could be to just use torquescript and store a bunch of global variables in a language.cs file for each language. It would be a ton of variables though to store, but that depends on your style of game.

Link to comment
Share on other sites

I think we need something built-in. For example, the way GUIs can use text_id instead of text, which allows you to actually select language on-the-fly and edit your GUI sensibly.

It looks like the fix in the thread above should work, but as they note, strings are limited to something like 2048 bytes (which is 2048 ascii characters, less for non-ascii encoding, AFAIK). So if you need really long strings, you might have to break them down, store them in some other fashion (like in their own files, and select the file based on the language), or find a way to increase that limit.

I think we should try to get the fix in the thread linked ported and included in the engine sometime soon.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...