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

Update docs on custom routes via rewrites #785

Closed
mqtik opened this issue Aug 2, 2020 · 3 comments
Closed

Update docs on custom routes via rewrites #785

mqtik opened this issue Aug 2, 2020 · 3 comments

Comments

@mqtik
Copy link

mqtik commented Aug 2, 2020

Hi.
I see in the example that the languages are splitted by language and by element such as footer, ..

I'm looking for something more simple, like so:

about: {
  en: 'About us',
  es: 'Acerca de'
},
search: {
  en: 'Search',
  es: 'Buscar'
},
...

Can this be done?

@isaachinman
Copy link
Contributor

@mqtik You can establish custom routes. Check out this user's comment: #689 (comment).

We should update the docs to answer this question, as it will be a common one.

@isaachinman isaachinman changed the title How can I define a custom structure? Update docs on custom routes via rewrites Aug 3, 2020
@mqtik
Copy link
Author

mqtik commented Aug 3, 2020

I'm sorry if I didn't explain myself well, no custom routes.
Keys and values.

You can trigger them like t('search'), t('about').

I did a library for React Native for this, so you could call the keys like language.about[getLang()] and I'm looking for somethig similar. Since this library seems to handle everything, it would be a cool feature, so translation can get done pretty quickly.

@isaachinman
Copy link
Contributor

Oh, I see. Have a look at the i18next documentation. This package doesn't handle any of the actual localisation work. Good luck!

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