-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Language auto doesn't seems to work #27
Comments
This affects other languages as well, I'm guessing it has something to do with sphaira expecting the locales to have the exact same region code as the one set in the console? |
I don't realy know, I wanted to make some tests by adding some logs in source code but compiling, at least on Windows (environement up to date on Windows 11), seems to be a problem. The first time it compile properly but the second time it doesn't work, "multiple ptarget patterns" error", even if the first compilation doesn't go to the end (compile.make files are modified during build and the second time it doesn't work) so I must delete the "build" folder and re-launch the compilation from the begining, this is too long so I have given up. |
Been really busy with work so I won't be able to look at this until a few days. The call to get the language is here sphaira/sphaira/source/i18n.cpp Line 47 in 3178f11
I do notice that I don't init set service here sphaira/sphaira/source/main.cpp Line 50 in 3178f11
|
Can you post the errors when building? Did you build using cmake preset? It should be "cmake --preset Release" to configure and then "cmake --build --preset Release" to build. |
I used these commands except that I use "MinSizeRel" preset, here is the result of the "cmake --build --preset MinSizeRel" command the second time:
|
I've tried to compile on a ubuntu wsl console and like that it seems to work, it's at least a possibility for me to do my own tests quicker than on my pur Windows environment. |
OK I've found the problem, you seem to not use "setInitialize();" so the condition in "/sphaira/source/i18n.cpp" file "if (R_SUCCEEDED(setGetSystemLanguage(&languageCode))) {" is never true, just as I suspected it. If you want I can do a pull request but do you prefer I initialize "set" directly in the "i18n.cpp" file (directly in the case for index == 0 and closing the service at the end of the case juste before the break line) or in "main.cpp" file when initializing the app and exiting the service when denitializing the app? |
Finaly I have made a pull request #31 to fix the problem, I fixed it by init and exit the Set service in the main.cpp file. For the cmake compile error on Windows maybe I will open an other issue, for now I close this one cause it is fixed. |
At least with french "FR_fr" console, the auto language set the language of the app to English, not tested by set an other console's language . If I force the langauge to French it works.
The text was updated successfully, but these errors were encountered: