Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External dictionary #14

Merged
merged 7 commits into from
Oct 30, 2024
Merged

External dictionary #14

merged 7 commits into from
Oct 30, 2024

Conversation

fullpipe
Copy link
Owner

@fullpipe fullpipe commented Oct 30, 2024

Fix #13

type MessageProvider interface {
  Get(lang language.Tag, msgPath string) (string, error)
}

provider := ... // my custom sql message provider

bundle, err := mf.NewBundle(
    mf.WithProvider(provider),
)

// or simple
bundle, err := mf.NewBundle(
    mf.WithYamlProvider(messagesDir), // embed yaml dictionary
)

@fullpipe fullpipe merged commit 222b9dc into main Oct 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make external message provider
1 participant