covid19-passbook-generator
covid19-passbook-generator copied to clipboard
Localization of open graph metadata
When I tried to share the Chinese link to social media, I found the preview of the link is still in English (description and image).
I wonder if we could make these metadata localized? The strings should be easy. If you have the original banner image file, I could help edit it and make it localized too.
Hey there 👋🏼 Thanks for your first issue. This is an automated message but a real human will handle your issue very shortly.
After digging a bit further, I found out the problem isn't that strings aren't translate but because Facebook follows the canonical eta tag and use the English version metadata instead.
Not sure what is the best practice to translate opengraph metadata for a multi language website. I'll spend some time figuring it out.
For image i18n, usually it's something made server-side. The picture is rendered "on the fly" using translation strings. I just don't have any server to do so and creating a lambda to do it seems too much work.
I think there's some webservices that could do that, but for a fee obviously 🤷🏻♂️
According to Meta documentation and a quick StachOverflow search, if you want to do it you need to implement Meta propriatary mecanism where Meta will request a specific language for a ressource (like the image). https://stackoverflow.com/questions/12201245/facebook-opengraph-crawler-doesnt-send-me-fb-locale