Basically you'd need to sit down and write out what each letter in English equals in the scripted language.
What our languages do, rather than actually
translate the text you type, is scramble it into an indecipherable string of text that
looks like another language but is, technically, gobbledeygook. It does this by taking each letter of the original text string and exchanging it with another letter.
So for example:
You say "Hello" with a language widget on or using a language /command.
The script changes each of the letters into a pre-defined other letter based on the set determined beforehand - the conversion cipher.
H becomes... say... Y.
e becomes l
l becomes a
o becomes c
So you typing "Hello" would display a text string of "Ylaac", and anyone who had the associated language widget or was the appropriate race/class to have it auto-translated would see "Hello" in their combat log.
Some languages - particularly Elven, Sylvan, and Draconic - sometimes sub multiple letters for one English letter, but I've never taken the things apart to see what equals what, or experimented to decipher the entire alphabet.
This, in context, is why we get a little annoyed when people use online translators and copy-paste elven text (or other languages, but nine times out of ten it's always Tolkienan Elvish) into the game; this prevents people whose characters should be able to understand what's said from being able to decipher it, because it's not using the in-game script to speak the language and thus doesn't get translated in the combat log.