About localization

Expanding and utilizing the engine via C++.
3 posts Page 1 of 1
irei1as
Posts: 76
Joined: Fri Feb 27, 2015 5:13 pm
by irei1as » Fri Feb 27, 2015 5:35 pm
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:
https://www.garagegames.com/community/f ... ead/114207

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.
Hutch
Posts: 42
Joined: Tue Feb 03, 2015 11:12 pm
by Hutch » Sat Feb 28, 2015 3:39 am
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.
buckmaster
Steering Committee
Steering Committee
Posts: 321
Joined: Thu Feb 05, 2015 1:02 am
by buckmaster » Sun Mar 01, 2015 3:21 am
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.
3 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest