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
Access current lang in getStaticProps and getStaticPaths #92
Comments
I'm not sure about some hack, but I guess that is not possible, at least right now. However, I think that we should change our way to do the build in the CLI in order to provide it, using dynamic routes with Thank @maksymdukov to report this! This will be very useful for 0.13.0 release 🙂 |
When this issue will be solved vercel/next.js#11309 it will be trivial to wrap the lang to |
@maksymdukov from now on, the I'm going to explain it better in the docs for export function getStaticProps({ lang }){
return { props: { data: getDataFromLang(lang) } }
} The https://github.com/vinissimus/next-translate/releases/tag/0.13.0-canary.1 |
@aralroca However there's one rare case which regexp in hasSpecialMethod doesn't cover: |
Good catch!! Thanks, this should be fixed before |
@maksymdukov |
I wonder if there's a way to identify current language in exported getStaticProps and getStaticPaths functions to have an ability to fetch localized data?
The text was updated successfully, but these errors were encountered: