Closed halostatue closed 4 years ago
Sounds good to me. Let’s call it default_domain though!
Should this be global or per-backend? I’m leaning toward per-backend, but it won’t be hard to make it work like :default_locale
.
Also, I’m looking at this and assuming that Gettext.gettext/3
would always use "default", or should it use dgettext(backend, binding.__gettext__(:default_domain), magic, bindings)
?
I’ve been working with a couple of different JS implementations of gettext (before rolling a fork of one of them to work better with Vue), and it appears that most JS implementations use
messages
as their default domain—and have an easy way to change the active default domain.As best as I can tell, this would be set by calling
textdomain(domainname)
in the C version of gettext. What I think would be useful would be providing adomain
value touse Gettext
:I can work up a PR for this if that makes sense.