Language- and domain-specific getter? #113
Unanswered
IngwiePhoenix
asked this question in
Q&A
Replies: 1 comment
-
Hi! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I am trying to find a nice way to integrate this into an app using Templ, and I would love to build a small wrapper for this package that would just let me call a simple function to retrive the translation for a given
msgid
.In theory, it'd be nice to do something like this:
This is pseudo-code, obviously. But what would you suggest would be a good solution? The idea is to translate the UI served via templ and thus I need to load a different language depending on the users' preference - and switch domains, depending on what view I may be rendering (I mainly think of doing that to keep the individial POs organized a little better).
Thank you and kind regards,
Ingwie
Beta Was this translation helpful? Give feedback.
All reactions