How can I redirect translated url to the same page
See original GitHub issueI want to translate url, but have an issue in ssr loading.
here is my configuration `
// nuxt.config.js
module.exports = {
...
modules: [
[
'nuxt-i18n',
{
seo: true,
lazy: true,
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',
alwaysRedirect: false,
fallbackLocale: 'hy'
},
locales: [
{
name: 'English',
code: 'en',
iso: 'en-US',
file: 'en.json'
},
{
name: 'Հայերեն',
code: 'hy',
iso: 'hy-AM',
file: 'hy.json'
}
],
langDir: 'locales/',
defaultLocale: 'hy',
parsePages: false,
pages: {
about: {
en: '/about',
hy: '/մեր֊մասին'
},
}
]
}
it works in client side when i link to localePath(‘about’) . but when i refresh my page it cant find http://localhost:4000/մեր֊մասին
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Best practices for language redirection - Weglot
When it comes to enhancing your localization strategy, language redirection is definitely something that you might want to consider.
Read more >php - Getting page language and redirecting to same ...
So I need to find a way to get if the current link if /fr or /en and redirect to the page in...
Read more >Articles - Website Builder - Redirecting from old website pages
Click Advanced Settings · Click Redirects · Click + Add Redirects · Under Old Page enter the path of the previous webpage. ·...
Read more >24122 (Redirect to translated url after setting language)
When user change language using set_language view, we can redirect him either to url from 'next' post value or 'HTTP_REFERER' header.
Read more >How to Redirect a Page or URL in WordPress
Go to Tools > Redirection and scroll down to the Add new redirection section. WordPress Redirect Tutorial add new redirect. In the Source...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The removal of encodePaths is almost a year old.
At the time the removal made sense as VueRouter didn’t expect encoded paths.
If you have an issue now because VueRouter and Nuxt made changes then feel free to report an issue about it with proper reproduction steps and it will be fixed.
Paths encoding was fixing issue #7 but that one doesn’t reproduce in latest Nuxt anymore so I’m even more confident in getting rid of
encodePaths
option.