projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.08k stars 97 forks source link

Switching windows process/thread ui languages #322

Closed crlf0710 closed 1 year ago

crlf0710 commented 1 year ago

I'm trying to find a way to set either windows thread ui language(https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-setthreaduilanguage) or process prefered ui languages(https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getprocesspreferreduilanguages, >= windows 7) according to what fluent decides to use from bundle. I wonder if this functionality could/should be part of fluent itself? Thanks!

zbraniecki commented 1 year ago

Hi @crlf0710 - FluentBundle is in a given locale. You can perform a locale negotiation between requested and available locales to select the best bundle. You can look into fluent_fallback for inspiration.

crlf0710 commented 1 year ago

Thanks