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

How to use the actual i18n implementation? #5

Open
katja-brunner opened this issue May 19, 2020 · 1 comment
Open

How to use the actual i18n implementation? #5

katja-brunner opened this issue May 19, 2020 · 1 comment

Comments

@katja-brunner
Copy link

Following your instructions in the readme I will call the dummy i18n function that of course returns the key again. The actual implementation doesn't get called. Do you have a working example?

@hinterdupfinger
Copy link
Contributor

Hi,

thank you for the feedback. Let's find out where your issue is so i can update the readme accordingly

the function export function i18n(key: string, params?: { [index: string]: string | number }): string { return key; }

will never get called it is just a dummy function to fix the typing.
the only thing that is missing a bit in the documentation is the format of the translation file, an example can be found in the tests https://github.com/flix-tech/stencil-i18n/blob/master/test/fixtures/i18n/messages.en.json

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

No branches or pull requests

2 participants