Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Template translations

Status Resolved
Add-on / Version Publisher 1.6.7
Severity
EE Version 2.10.1

Madelon

Oct 16, 2015

Hello Brian,

When browsing the Dutch version of the website, it is not possible to reach the English translation of the template. For example:
/artikel can be reached.
/article gives back a 404.

When browsing the English version of the website, both /artikel and /article can be reached.

I have two other issues, which I believe to be related with this. Google webmaster tools rapports it can not crawl the English templates as well as the English alternate links. Further is it is not possible to share an English article on Facebook.

#1

BoldMinded (Brian)

Are you using the language prefix?

#2

BoldMinded (Brian)

Because if you use the prefix this shouldn’t be an issue, however, I think I understand why if prefixes are not used that Facebook and Google are not loading the correct page, b/c they don’t know what language it should load. Without the prefix I don’t think there is a way I can make this work b/c by simply going to one of those 2 URLs there is nothing to identify what language those words are in, thus Publisher doesn’t know what to do. I think if you add ?lang_id=x to the URL it may work for sharing on Facebook.

“When browsing the English version of the website, both /artikel and /article can be reached” - I think I know why this is working, but when you visit /artikel is it showing Dutch content or English?

#3

Madelon

No, I am not using the url prefix. (I added the url to my website in the ticket.)

I tried adding ?lang_id=en to an article url and tested it on https://developers.facebook.com/tools/debug/og/object, but there is still a 404 error returned.

When I go to /artikel and I view the website in Dutch it will display Dutch content. When I view the website in English and I will go to /artikel, English content will be displayed. That is why I thought it to be strange it works for both languages in the templates with a Dutch name, but not vice versa.

#4

BoldMinded (Brian)

Try lang_id=1 or 2, not the language code.

#5

Madelon

That is also not the solution.

#6

BoldMinded (Brian)

Comment has been marked private.

#7

Madelon

Comment has been marked private.

#8

Madelon

Comment has been marked private.

#9

BoldMinded (Brian)

Madelon, it will be a few more days before I get this sorted out. Is there any reason you can’t use the url prefix option? Everything would work the way you are expecting if you turn on prefixing.

#10

Madelon

I could use it but I didn’t turn url prefixing on, because of SEO purposes. I will see if I can get a new version live with url prefixing turned on.

#11

Brian Litzinger

What about prefixing is good or bad about SEO?

#12

Madelon

I remember that relevant words should be in mentioned as soon as possible in the URL as possible. For example /article/name-of-article-with-relevant-words would be better than /articles/article/name-of-article-with-relevant-words

Now I can’t find a source though.

#13

BoldMinded (Brian)

Comment has been marked private.

#14

Madelon

Hello Brian,

Currently I have the previous version of Publisher you sent me running. If I am correct that is the September 1 version. I had to turn it back, because in the last build the Dutch version of the website showed English entries on the homepage.

I agree normal users won’t change the URL manually. The main issue is however Google being unable to crawl the English pages.

#15

BoldMinded (Brian)

Did you try adding alternate link tags recommended by Google, and mentioned in my docs?

https://support.google.com/webmasters/answer/189077?hl=en https://boldminded.com/add-ons/publisher/template-tags

<link rel="alternate" hreflang="en" href="http://www.example.com/article" />
<link rel="alternate" hreflang="ne" href="http://www.example.com/artikel" />
#16

BoldMinded (Brian)

You’d add this to the head tag of your page

{exp:publisher:languages}
    <link rel="alternate" hreflang="{short_name}" href="{translated_url}">
{/exp:publisher:languages}
#17

Madelon

That tag is already present. For articles I added the entry_id parameter.

#18

BoldMinded (Brian)

Comment has been marked private.

#19

BoldMinded (Brian)

With the newest build, try changing your languages tag to this:

{exp:publisher:languages}
    <link rel="alternate" hreflang="{short_name}" href="{translated_url}?lang_id={language_id}">
{/exp:publisher:languages}
#20

Madelon

Comment has been marked private.

#21

BoldMinded (Brian)

Comment has been marked private.

#22

Maurits van Wijland

Sorry for the delay. I tested the new build and it now works as expected. Thank you!

-Madelon

Login to reply