How do I use translation module in vibe.d?
karabutaworld at gmail.com
Tue Oct 13 08:03:26 UTC 2020
On Friday, 9 October 2020 at 21:07:28 UTC, jack wrote:
> Documentation tells to use
> @translationModule!TranslationContext on class, like this:
> but it return the error:
> it seems that construtor was removed but I can't find the
> replacement anywhere. Could someone help with that?
> : see "location" section: https://vibed.org/docs#Localization
> : https://vibed.org/api/search?q=translationModule
Did you do this?
> Using GNU gettext compatible .po translation files, it's
> possible to localize Diet templates at compile time. This just
> requires putting the translation files with the naming scheme
> <name>.<language>.po into a path that is registered in the
> "stringImportPaths" field of the dub.json. <language> must be a
> language identifier of the form en_US.
More information about the Digitalmars-d-learn