Skip to content

Add note where to setup language url segment on language edit page #557

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

Open
BernhardBaumrock opened this issue Feb 7, 2025 · 1 comment

Comments

@BernhardBaumrock
Copy link

BernhardBaumrock commented Feb 7, 2025

Imagine this. You have a multi-language PW site and you want to add the new language "ProcessWireish"

You go to Setup > Languages > New and add a title ProcessWireish plus a name pw:

Image

After save you see this:

Image

Then you want to view the frontpage in your new language and you head over to this url:

  • example.com/pw

---> 404

So you might wonder why things are not working. You set the page name to pw right? So it should show up under /pw right? No! Turns out a language name and a language url segment are two different things and you forgot to setup the language url segment on the home page's settings tab. That's hidden quite well in the process, right?

My suggestion is this:

Image

This is the code for the warning:

<div class="uk-alert uk-alert-warning uk-margin-remove">Warning: No Url-Segment setup for this language yet. <a href="">Edit the homepage</a> and setup the url segment of this language on the settings tab!</div>

PS: I'm not complaining about the language name being different from the url segment - that's perfectly fine (and necessary, I get that). It's just about helping the user stay in the flow and avoid wondering why things are not working.

@BernhardBaumrock
Copy link
Author

PS: There have been several posts in the forum that show that this process can be improved and is confusing:

https://processwire.com/talk/topic/17125-change-language-segment-in-url/

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