lang = require("lang.localize")
function love.load()
lang.set_locale("en")
lang.set_text("text1", "this is the first string")
lang.set_text("text2", "this is the second string")
lang.set_text("text3", "this is string number $1")
end
function love.update(dt)
end
function love.draw()
love.graphics.print(lang.get_text("text1"), 10, 10)
love.graphics.print(lang.get_text("text2"), 10, 30)
love.graphics.print(lang.get_text("text3", 3), 10, 50)
end
Supported features:
- utf8
- formatting for $1, $2, $3 flags
- character mapping
- samplar strings
ivan wrote:Added a page on transliteration.
It's generally used to convert non-Latin scripts in the Roman alphabet.
Not sure if we could make this work both ways.
How about IPA characters -> per-language characters that (closely enough) represent those sounds? That would at least allow people to know how to pronounce stuff from other languages;
Usage cases... maybe used like furigana, in subtitles in games; maybe i'll do a demo of this...?
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
zorg wrote:How about IPA characters -> per-language characters that (closely enough) represent those sounds? That would at least allow people to know how to pronounce stuff from other languages;
Usage cases... maybe used like furigana, in subtitles in games; maybe i'll do a demo of this...?
I'm not too familiar with IPA so I don't know how we could make it work.
Sure add some examples to the doc and we'll see how it goes
Alternatively, we could use them as the keys for the transliteration page, since currently, i'm torn whether my accented vowels would go to their "plain" places (e.g. ö -> o) or their "correct" ones (e.g. ö -> oe)
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Sounds good although it might be better to add IPA as a "language" column since it's recommended for the keys to be plain *non-UTF8*.
Either way, it's a good idea
1. IPA characters are phonetic, meaning (mostly) one sound per character, though there are a few "diphthongs" as well (tied ts for example); which can be problematic with languages that have syllabaries instead of alphabets (like Japanese; atomic units are made out of both a consonant and a vowel, except n) so there may be need for combined IPA symbols to identify them.
2. Since i thought that the mapping should assign characters to not just exact matches but similar ones too, every language would need to have a secondary column denoting the correct/true characters/sounds they use (either just an X or their ordinal position in their respective alphabets), so we can separate them from the similar ones, that would be used for reverse-mapping (i.e. everything not in their alphabets).
Positive07: JA and CH/ZH columns in my opinion would only work with their syllabaries, not with the whole kanji/hanzi; those should have a separate library to convert them to furigana/(similar for the Chinese one), and then could this be used to convert the sounds to IPA.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Thanks so much for the help, Admicos.
Any help if much appreciated, including new languages or terms that you want to have translated.
PS. I think we should add Czech, Danish and possibly Vietnamese too.