Hello everyone
I'm using constants to display my page titles in different languages:
// lang.en.php
define(_PAGE_TITLE, "Pagetitle");
// lang.de.php
define(_PAGE_TITLE, "Seitentitel");
I've placed a facebook like button on that page and everything works except for one thing: If I submit the link using the like button, the title in facebook shows up like this:
XY likes _PAGE_TITLE
The constant isn't replaced by it's value in facebook but it is replaced in the HTML code. Does anyone have an idea, why the constant isn't replaced if facebook grabs the pagetitle from my site?
Thank you.
Edit: Just found out, that the facebook bot has the HTTP_ACCEPT_LANGUAGE header set to english and there was a problem with my language file. Anyway, I would like the bot to take the german translation by default. Is there a way to catch the facebook bot and overwrite the language settings for it?