ID:132491
 
Something to think about : Recently i have discovered that when i play games, languages cannot be converted.Of course everyone would know this. THE ISSUE didnt really reach my attention until i played a Naruto game in wich its language was portuguese.Will Somone be able build a code or demo that will allow people to convert Languages? Such as choosing whether or not you want to see english or spanish in a game...
Doubtful. You could maybe create a simple word swapper, but even that would be a pretty major undertaking, and wouldn't really yield worthwhile results.
This is not a trivial feature. There are entire scientific and mathematical fields dedicated to this, which have yet to yield good results.
Mikeche wrote:
Something to think about : Recently i have discovered that when i play games, languages cannot be converted.Of course everyone would know this. THE ISSUE didnt really reach my attention until i played a Naruto game in wich its language was portuguese.Will Somone be able build a code or demo that will allow people to convert Languages? Such as choosing whether or not you want to see english or spanish in a game...

Only a couple of people have been so foolish enough to attempt this... I was one of them. It's a lot easier than people think, it's also incredibly tedious, and requires people who can speak said languages fluently, and enough trust in them so they don't screw you over. It's been a really long time, but I believe I did something like this:

For example, I was generating savefiles for each language and loading that file into a list, omitting the English language as it seemed unnecessary to make a savefile from it.

mob/var/list/language = new/list


Afterwards I would generate a savefile using keywords as a means to grab the necessary string I wanted. For example:
#define WELCOME                    1
#define INTRO 2
#define STEVE_OPENING_DIALOGUE 3

mob
verb
MakeGerman()
var/list/L = new/list
L += "Crazy German Text"
L += "Insane German Text"
L += "Fifty million letters for a word"
// Something about saving the list.
src.language = L // This is just to test.


The generation process was of course left out of the game, as it's unnecessary to include it. The macros however were kept, as they were a link to it all.

I'm fairly sure, to make the translation, I did it this way:
mob
proc
translate(keyword, default)
if(!src.language) // Language savefile failed to load for whatever reason.
return default
else return language[keyword]


As I said, it's been an awfully long time (about 2008). And I'm sure the method I used (although similar than that) was far better (it worked like a charm).

Either way, it's impossible for BYOND to make the translations for you. It's something either game makers will have to do on their own, or a library based on how to do it that will do the majority of the work for the developer be released (even then, they still have to find someone fluent in the desired languages to make the complete translations).

Method above is based off what phpBB2 was doing with it's languages.
The problem really is that no one really has the motivation to not only convert words, but sentence-structure, grammar, and etc.

It would take a great amount of time, effort, and understanding of the related languages.

As far as "BYOND Languages" go, the actual programming language will most likely never be converted since it's by average that programming languages are in plain English.
In response to Tiberath
Icon Ultima has a language translation facility, but a) I don't know any actual language besides English and b) it's presently used for silliness like translation to lolcat.
In response to Mobius Evalon
Where is that? I've never heard of it.
As mentioned in the previous posts, BYOND can't and won't actually translate between languages for you, but there are programming techniques that can make supporting multiple languages very realistic. Creating a library to handle localization and globalization (ie. supporting different locale formats, such as dates, dollars) is very feasible.
In response to Unknown Person
One thing BYOND could support that would help this is the embedding of arbitrary values in strings at a time separate from the string's definition, to allow for languages where the structure is different, for example:
Language 1 structure: "Hello John Smith, how are you today?"
Language 2 structure: "John Smith hello, today how are you?"

This is an overly simplistic example, but would be aided by a feature that DM partially supports. That is:
// This would likely better be served in a multi-dimensional list of strings per language, or 
// in some other obscure definition (XML loading, etc.), but has been greatly simplified here:

var
lang1 = "Hello [], how are you today?"
lang2 = "[] hello, today how are you?"

This won't work, because no value is specified for the embedding. However, DM does support this:
text("Hello [], how are you today?", "John Smith")
// The above statement is actually what the following compiles to:
"Hello ["John Smith"], how are you today?"


In the DM bytecode it actually stores the string separate from its embedding of values, and makes a call to text() as needed. In an ideal situation, you could do something like so:
var/lang1 = "Hello [], how are you today?"

// ...

text(lang1, "John Smith")

However, the DM compiler doesn't support this, though the bytecode inherently does. If the compiler could be updated to support this, I think it would be a highly useful feature that has been oft-requested in the past and would naturally be applicable to internationalization; unfortunately, I believe such a thing falls out of both Tom and Lummox JR's understanding of the DM compiler.
In response to Kuraudo
I think I missed something. How do those examples relate to this? And how are they not already doable? How do they even relate to your initial comment o.O unless you're suggesting something like that somehow be applied to every word in a string.
Sorry im TWO years late on this, I didn't even realize this many people were active then on this post, but I was really trying to figure out on whether or not language translation was possible in BYOND games. But as the previous commented stated, it's possible but requires an extremely amount of time and motivation. Thanks for all your comments :D
My question is why on earth you would want it? I know google translate is horrible and that's a mega corporation's attempt. How on earth any Byond developer could think they would include high quality translation software is beyond me.
You can use the Babel API for relatively correct sentence-translation to German, Dutch, Russian, French, and Korean. Spanish and Italian are correct in translation, but not in structure.

To do it, all you'd need is Nickr5's cURL lib to query Babel with the phrase, the fromLang, and the toLang.