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

Not creating paths with locales as intended #184

Open
pelcasandra opened this issue May 13, 2021 · 0 comments
Open

Not creating paths with locales as intended #184

pelcasandra opened this issue May 13, 2021 · 0 comments

Comments

@pelcasandra
Copy link

Whenever I call a path like users_path(locale: 'en') the result is always like /users/?locale=en and not /en/users.

My routes.rb is:

Rails
  .application
  .routes
  .draw do
    mount SolidusPaypalCommercePlatform::Engine,
          at: '/solidus_paypal_commerce_platform'
    filter :locale
    mount Spree::Core::Engine, at: '/'

  end

I can manually type in /en/users and it loads in the appropriate locale passed but I have no way to link to the correct paths with the locale prefix.

Another issue I'm having is that I can have a previously set locale and still be able to navigate using the naked paths with no locales passed (i.e. /users). I can still navigate in the previous locale instead of switching to a default locale (i.e. english). I'm not sure if this is the intended use of the gem or it is a bug, but I believe having multiple locales on the same url will confuse the locality of google crawlers.

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

1 participant