That's a whole other issue I wasn't considering... but I think it could be covered by one of the systems that's been proposed above... at least internally. The UI issues for picking diplo messages I hadn't considered at all... but is a bit out of scope of what I was considering... though probably shouldn't be.
I think you misunderstand what I've been proposing. A major goal of the system is to avoid any built-in preference to a particular language. That means that the game code itself has no idea what language it's working in, and all the grammar rules for each language are encoded in the stringtable entries using the markup itself.Then, what about formal vs nonformal and other stuff that isn’t in the English language?
To accomplish this, I've suggested using "flags" on strings, which the translator can add or remove and add or remove checks for, and make different forms of strings in response to the presence of different flags. Since the translator can set up as many or as few flags and checks as they want / need, we should presumably have full language independence.
I think your XML suggestion is just a differently formatted version of the same thing really...
No, it wouldn't. Avoiding language synthesis is a major goal of the proposed systems, since it's practically impossible to do it in english, let alone in a language independent way, let alone without a slew of programmer who speak each language...As far as I can see, a string table based translator would have to have a fragment for "I like" in the native language, one for "is nice", one for "he" and "she" and perhaps one for "name."
From the suggestions above, there would just be stringtable entrires for:
a) complete phrases, like: "I like $NAME. He/She is nice." as a single sentence.
b) single nouns, like "Bill"
The noun entires come in two flavours:
b1) The noun has known grammatical properties, such as gender, plurality, (formality?) etc, which are embedded into the noun stringtable entry using some sort of flag or marker, and which alter the sentence into which they are inserted
b2) Generic nouns that can change their form depending on the sentence into which they are inserted, which have different versions of the string for the noun in the stringtable entry for all the possible combinations of gender, plurality, formality, etc, which are properties of the sentence
It's possible we might need to extend the noun-type entries to include other things like adjectives, but these are probably best left in the complete sentence entries, I think. It's really the nouns that are most in need of being treated like parameters, to allow some re-use of sentence stringtable entires...
As for canned diplomatic responses, that's probably a good idea to allow play with players of different languages to play together. I suspect the flags / parameters system will work for this as well... and can probably be encoded in XML for transmission.
However I'm more concerned about the format the translators will use to indicate the flags / checks they want to use while editing the stringtable to do their translation. These flags probably wouldn't appear in the string sent to players in other languages unless we establislhed a set of flags to be used across languages to mean the same thing (gender, plurality, formality) which could be ignored by languages that don't have similar concepts... This standardization wouldu probably be done outside of the game code though, and it would be the translator's responsibility to conform to these standards when doing their translation of the stringtable.