Issues & Limitations
As I mentioned before, GM-I18n is still in very early stages of development, so you should be aware of the following issues before using it in your game.
Limited Support for HTML5 Export
GM-I18n is not fully compatible with HTML5 export yet. There are some issues with the font loading and drawing functions. For the drawing functions, I'm already working on it, but I still don't know how to solve it. If you have any idea or suggestion, please feel free to open an issue or start a discussion on the GitHub repository.
Issue with Font Loading
The font asset created either from the IDE or from code will not be loaded correctly in HTML5 export. It seems like the fonts is loaded asynchronously, so the font asset is not ready when the GM-I18n system tries to use it. This issue can be solved by setting the font manually after the font asset is loaded.
Temporary solution:
// create the font asset if you're using non-Latin characters
global.font_ja = font_add("fonts/NotoSansJP-Medium.ttf", 32, 0, 0, 32, 127);
// add a drawing preset for each locale
i18n_add_drawings("en", "header", [
new I18nDrawings(fNotoSansMedium, fa_left, fa_middle, #FFFFFF, 0.65, 0, 1)
]);
i18n_add_drawings("ja", "header", [
new I18nDrawings(global.font_ja, fa_left, fa_middle, #FFFFFF, 0.65, 0, 1)
]);
// refresh the drawing preset if it's running on browser
if (os_browser != browser_not_a_browser) {
alarm_set(0, game_get_speed(gamespeed_fps) * 2); // 2 seconds delay, change it to your needs
}
oI18n
object in the demo project. Don't worry, I'll try my best to fix this issue in the future.Issue with Text Drawing

There's no issue with text drawing if you're using Latin-based fonts. But, for non-Latin fonts, here's the issue that I found so far:
- The text is not drawn correctly. As you can see in the image above, the text is only drawn on the button.
- Even if it's drawn correctly, the text is not drawn in the correct configuration like in the drawing preset. For example, the font size, color, and alignment is not applied correctly.
Here's what I tried so far:
- I tried to use the
draw_set_font
built-in function instead ofi18n_use_drawing
ori18n_draw_message
function, it doesn't work. - I tried drawing the text manually using
draw_text
function (and its derivatives), it doesn't work. It also the same if I use thedraw_set_font
function. - I change the
Draw Event
toDraw GUI Event
. The text is drawn, but it's not drawn in the correct configuration like in the drawing preset. - I tried to toggle the WebGL option in the HTML5 export settings. It doesn't work.
I'm completely stuck, so there's no temporary solution for this issue. If you have any idea or suggestion, please feel free to open an issue or start a discussion on the GitHub repository.
No Built-in Text Analysis Function
GM-I18n doesn't have any built-in text analysis function yet. So, if your translation is a "one word message", it will be drawn as a single line even if you set the width in the drawing preset.
Temporary solution: you have to add the newline character (\n
) or space manually in the translation string.
{
"text": "この文は静的です。選択されたロケールに翻訳されます。ロケールを変更してもこの文には影響しません。"
}
I've actually implemented a force_wrap
parameter in the I18nDrawings
constructor back then, but it was causing performance issue. Since GM-I18n is a performance-oriented library, I decided remove it for now. Stay tuned for future updates!
No Support for Complex Scripts
I've tested GM-I18n with some languages that has a complex script, like Arabic, and the text is not drawn correctly (no cursive connection between the characters). I haven't tested it with other complex script (such as Thai, Tamil, Devanagari, etc.) yet, but it's likely to have the same issue.
I had thought about implementing the RTL feature, but I decided to hold off for now (because languages that use RTL also use complex scripts). If you need it, feel free to open an issue or start a discussion on the GitHub repository.