4

I'm able to translate views titles and menus thanks to config_translation core module. I would like to have path aliases translated as well but it seems to lack this feature. Any other way to do it?

9

On my multilingual Drupal 8 sites, I go to /admin/config/search/path/add for adding URL alias, which asks you to select a language for this alias.

Is this what you were looking for?

  • I was thinking about a configuration kind of solution, aliases are content that I need to reinsert on every site change – Angus Nov 12 '16 at 10:25
  • 3
    The path that you enter isn't an alias, it is the actual route path, those can not be translated. You need to create aliases in different languages, that's the only way. You could "deploy" it with hook_install and update functions. – Berdir Nov 12 '16 at 11:21
  • If you are using path prefix for languages, e.g. you want to use /de/ansicht for the english /view, don't add /de to the path when creating a new alias, even though it's the path you want. You just add /ansicht. – Tim Sep 24 '17 at 7:02
1

You can manage your translated aliases with the Pathauto module, which will automatically create a translated URL Alias from the translated node Title. The URL alias will be constructed from a pre-configured Pathauto "Pattern" and will be automatically managed and updated.

1

I was looking exactly for that and finally I contrib with the fixed path alias module, just create the alias for the views page as mentioned before and set it as fixed to be exported into config. The alias will be re-created on the fly when required if not found.

  • This should be considered also as a valid answer since adds the capability to export aliases which is a requirement by the OP – d70rr3s Dec 11 '19 at 12:43
0

I had same issue and I have done this way:

first create view page with alias, for example "alias-test" view page alias

then go to admin/config/search/path and click "add alias"

choose language you want to translate, in my case I choose "PT"

on "existing system path" write your path "alias-test" and in "path alias" added alias translation "teste-alias" path translation

This works with language swticher, if you have more than 2 languages you have to repeat this process to all languages you want to translate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.