xfangfang / borealis

Hardware accelerated, Nintendo Switch inspired UI library for PC, Android, iOS, PSV, PS4 and Nintendo Switch
Apache License 2.0
31 stars 21 forks source link

Adding an overload for the function brls::loadTranslations #49

Closed PoloNX closed 9 months ago

PoloNX commented 9 months ago

I wanted to use translations which are not in the nintendo switch system. I added it, it will search in the romfs:/i18n if there is the translation

PoloNX commented 9 months ago

whoops my last commit

xfangfang commented 9 months ago

to set custom locale, you can do this:

brls::Platform::APP_LOCALE_DEFAULT = “some locale id”;

make sure this line is run before brls::Application::init()

PoloNX commented 9 months ago

And how do you load one specific translation after ?

xfangfang commented 9 months ago

restart the app?

I think Borealis does not support runtime switching unless all activities are manually removed and overloaded, which is similar to restarting the app.

PoloNX commented 9 months ago

I found it, it's good