richardwilkes / unison

A unified graphical user experience toolkit for Go desktop applications
Mozilla Public License 2.0
202 stars 10 forks source link

feat/custom localization #49

Closed Jayrgo closed 7 months ago

Jayrgo commented 7 months ago

This allows the use of a user-defined localization function and is not bound to "github.com/richardwilkes/toolbox/i18n".

richardwilkes commented 7 months ago

It seems like this would have been better done by changing the toolbox implementation to support redirecting rather than adding another layer in unison.

The Callback can't be guaranteed to be set by someone wanting to make use of this prior to other code running (in init() calls) that may call Text().

What is the use case you're trying to address with this?

richardwilkes commented 7 months ago

I had a few spare moments this evening and went ahead and implemented something similar in the toolbox v1.109.0 release.