quisquous / cactbot

FFXIV TypeScript Raiding Overlay
Apache License 2.0
792 stars 379 forks source link

Set cactbot config shown language to PC's locale. #1074

Closed Jaehyuk-Lee closed 4 years ago

Jaehyuk-Lee commented 4 years ago

Summary

Brief explanation of the feature you'd like to request.

Like this, shown language is not determined by FFXIV parsing plugin's language, I think this is based on PC's locale setting. K-001

cactbot is in English (FFXIV parsing plugin's language) K-002

I think cactbot can determine in which language user is using their PC. I don't know how though.

Also, I've tried to match config's language setting to Alert Language's language setting. Example, If Use FFXIV Plugin Language - follow FFXIV Plugin's language If English - fix to English whatever user's PC language is.

But... I couldn't do that.

Jaehyuk-Lee commented 4 years ago

navigator.language.substr(0,2) is not working well with Cactbot config javascript : it's always 'en' It works on real browser though.

quisquous commented 4 years ago

Another option (pun not intended) is to add an option for language to show the config page in?

quisquous commented 4 years ago

Actually, a better solution would be that if OverlayPlugin has this information, then OverlayPlugin could send it along with the ffxiv plugin language, and then config page could use that.