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

Feature Request - Optional hreflang integration #172

Open
JayHoltslander opened this issue May 23, 2017 · 1 comment
Open

Feature Request - Optional hreflang integration #172

JayHoltslander opened this issue May 23, 2017 · 1 comment

Comments

@JayHoltslander
Copy link

It would be nice if the option to use or not use alternate hreflang was available as an on/off selection within the plugin's settings.

On this page "How To Make Sitemaps In Multiple Languages With WordPress" it reads...

According to Google you can indicate that the French URL is equivalent of the English page using hreflang attributes basically in two ways:

A. HTML link in header …
B. Sitemap …

IMPORTANT: Google recommends choosing only one way to implement hreflang annotations, in order to avoid errors.

So it would seem that things are currently set up fine by Transifex. HOWEVER, we would prefer to utilize multilingual sitemaps over the hreflang in the head method.

Justifications:

Currently we can disable it within includes/lib/transifex-live-integration-hreflang.php by commenting out lines 114-138 but that will be undone by the next plugin update.

Aside: Yoast SEO doesn't have support for building multilingual sitemaps. They need to be generated with another tool like Dynomapper (Which does detect Transifex' multilingual pages and builds a sitemap including them.)

@matthewjackowski
Copy link
Contributor

So the current logic adds hreflangs if you enable the 'rewrite' logic in the UI. However a specific toggle to control this was added to the config, but not enforced (see

)

I don't remember why I pulled it out specifically (maybe because hreflangs are only able to properly generate if you are using the rewrite logic, so why not just always do it if you can), but it should be a simple change to also add a logic check for that setting without commenting the render code in includes/lib/transifex-live-integration-hreflang.php

Unfortunately adding a control for this in the admin UI is considerably less simple.

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

2 participants