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

Suggestion: location url -> change domain based on language #104

Open
aleclerc7 opened this issue Mar 15, 2022 · 0 comments
Open

Suggestion: location url -> change domain based on language #104

aleclerc7 opened this issue Mar 15, 2022 · 0 comments

Comments

@aleclerc7
Copy link

Hello,

I do not know if this is proper for a sitemap, but I would like to suggest adding an option in the plugin to allow domain name change based on language.

Option 1: Based on the language code, force domain/subdomain name

Based on the page language code.

  • Like if the language code of the page is fr then always use domain-fr.com without the /[lang] url prefix.
  • Or, if the language code of the page is en then always use en.domain.com without the /[lang] url prefix.
    ...

Option 2: Based on "location" URL, do a find-replace

If a location URL begins with X, then change it to Y.

Change location https://domain-fr.com/en/ to https://domain-en.com/
Change location https://domain-fr.com/pt/ to https://domain-pt.com/
Change location https://domain-en.com/fr/ to https://domain-fr.com/
Change location https://domain-en.com/pt/ to https://domain-pt.com/
Change location https://domain-pt.com/fr/ to https://domain-fr.com/
Change location https://domain-pt.com/en/ to https://domain-en.com/
...

So for example, a location that would have https://domain-fr.com/en/page1 would be changed to https://domain-en.com/page1.

But any of these two options would be nice to have a very precise location URL for those who have a multilingual site with multiple domains or subdomains.

Kind regards.

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