Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add languages thing #376

Open
Aldair502 opened this issue Jan 7, 2024 · 4 comments
Open

Add languages thing #376

Aldair502 opened this issue Jan 7, 2024 · 4 comments

Comments

@Aldair502
Copy link

Aldair502 commented Jan 7, 2024

Idk. i mean, i could change every dialogs on https://github.com/taisei-project/taisei/tree/master/src/dialog to another language.
but i don't want to make forks and edit every .c file everytime i want to use another lang

@Nhalrath
Copy link
Contributor

A language selector? I think it's a nice addition to the game, but do we have people willing to translate the game?

I'm no professional in programming and Taisei's large codebase still overwhelms me, but maybe I can give this one a shot! It's a good opportunity to learn more about the internals of the game.

@Nhalrath
Copy link
Contributor

I attempted to take this one today, but it looks like non-English characters are not supported. My guess is that the fonts themselves doesn't have the necessary glyphs for these.
screenshot

I'm not familiar with how fonts are handled, so I guess I'll pass on this one.

@Akaricchi
Copy link
Member

Taisei's text renderer can handle non-English characters just fine, but the font we're using indeed doesn't support any CJK characters. GUI applications typically fall back to other fonts when the desired one is missing glyphs. Unfortunately, Taisei does not support this yet; we can only draw with one font at a time. Adding a fallback system is possible, but non-trivial… anything to do with text rendering is generally more complicated than you'd expect.

The idea of supporting localization came up quite a few times. I'd like to tackle it eventually, but it's a low-priority thing for now. I definitely want to finish the extra stage and finalize all the dialogue before starting on localization.

For the brave and adventurous: if you want to try implementing font fallback yourself, start here. Everything to do with font loading, glyph caching, and text drawing is currently in that file. And always feel free to ask me on Discord or by email about any aspect of the codebase.

@Firestar-Reimu
Copy link

Yes, I wish to make a Chinese translation (as non-CJK characters are too out-of-character when playing this game), and the Chinese/Japanese font can use the open source Source Han Sans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants