hreflang has proven extremely frustrating for me to implement with my previously clean site layout. I've finally bitten the bullet to risk it because Google still doesn't index our translated versions with hreflang: I'm putting things like /ja/ before the URLs.
My question is this:
The links used to be very simple. You could watch a piece of content by visiting
/watch/<slug>
or see a user by visiting
/user/<slug>
read a news article by visiting
/news/<slug>
You can log in by visiting
/login/
And once logged in, there's additional things you can do like visit
/watch/edit/<slug>
to edit your own content.
When I now have things like /ja/watch/<slug>
to deal with, what should be done with the actual links on the page? Should they also have the language code prefix added to the URL?
For example, linking to a user's profile from a piece of content that they've created, and accessing it from /ja/watch/<slug>
:
<a href="/ja/user/<slug>">Username</a>
Or is it fine just to leave them as is, e.g
<a href="/user/<slug>">Username</a>
I built the site using a template system (Twig). I don't fancy having to go in and drop a piece of code before every single navigation link, nor having to deal with duplicate/broken content because of one that's missing or is generated outside of Twig.
If there is no langcode in the URL, the site will still switch languages based upon your browser's Accept-Language header.
ja.example.com/user/<slug>