swiftDialog icon indicating copy to clipboard operation
swiftDialog copied to clipboard

Support Message in mutiple language based on system language

Open Tribruin opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. As a global country we are often displaying dialog boxes in multiple countries. By default we use English as the US is our largest population of Macs. However, we occasionally need to deploy dialog boxes in multiple regions for the same policy or deployment. The is especially important in certain areas, like Quebec, CA, where there are laws regardin which language is used. (In Quebec, French much be displayed either alone or alongside any other language.)

Describe the solution you'd like It would nice if we could feed the message field multiple strings (or a single string with language indicators) and have Swift Dialog display the correct string, based on country code. Maybe something like

--message "This is an important message" --message="fr=Ceci est un message important" --message="de=Dies ist eine wichtige Nachricht"

Describe alternatives you've considered The alternative is to have to do elaborate checking the script each time the message is updated in Swift Dialog and compare to the current language or to have separate policies/scripts that run based on region.

Additional context This definitely falls in the "nice to have" bucket of requests.

Tribruin avatar Jul 10 '24 16:07 Tribruin

For my experience, it's a big topic to manage. I had another approach with sending to swiftDialog the string to display in the correct language, meaning the localization is done between the call to display and swiftDialog, with a fallback to a default English string when no localized string has been found in a file which mimics a Wordpress .po file. Hours spent on that.

FranckSartori avatar Oct 19 '24 07:10 FranckSartori