سؤال

we have a website that is serving both chinese and english version using angular-translate. The frontend determines the language settings. It is fine from client side but when google bot crawls our content for SEO purposes, they cannot crawl the content. Instead, they crawled the syntax before translation

{{'CONTENT_1' | translate }}

Also as attached in photo below!

Google Bot search result

We are currently using ajaxsnapshots to serve snapshot to google bot. Wondering if anyone knows how to serve internationalised content correctly with AngularJS and angular-translate!

هل كانت مفيدة؟

المحلول

The current issue does not relate to angular-translate, but the inability for crawlers to execute javascript before indexing the page. Some improvements have been made, but services like prerender.io will render the page and serve HTML only snapshot to crawlers instead.

Angular-translate SEO issues are discussed here: http://fadeit.dk/post/angularjs-seo-for-angular-translate

نصائح أخرى

For example, you can try to determine a language from the URL. This way you'll be able to give a bot a static version of the page. Another question is how to get this static version of the page. But, I'm not sure if it can help somehow.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top