Mobile app version of vmapp.org
Login or Join
Cofer257

: How to add Google Translate Web Element to site without having to drop code into every single page? To add Google's website translator to your website Google's instructions say that you must

@Cofer257

Posted in: #GoogleTranslate

To add Google's website translator to your website Google's instructions say that you must drop the code snippet into the body of every web page that you would like to be translated. For webmasters managing multiple pages, is there a solution for dropping the code just once, and enabling the translator (and specified default language) for every webpage?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

2 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

Most people these days use Content Management Systems, so there's no need to drop the code in more than one place. Unless you're running a single-page website, there's no reason not to use a CMS, and it's inexcusable for a web developer to not provide one to their client.

There are a lot of times when you need to make site-wide changes to a website. Installing analytics or ad management code and changing layout designs or navigation and header/footer elements are just a few of the more common ones. Not having a CMS is going to create a lot more maintainability problems (violating DRY is just one of them) than just making it inconvenient to add Google Translate to each page.

Likewise, without a CMS, it makes it very difficult for the client to update their site. And the site will most-likely lack other basic features common to modern websites (search, comments, trackbacks, user management, RSS, tagging, etc.).

So fix the fundamental problem, and the rest will fall into place. Modern CMSes are easy to install and easy to use, and many of the best ones are open source. I mean, you can literally hire a high school student to install WordPress or some other CMS on your site for probably (migrating an existing site and converting a design into a theme will cost a lot more though), and with full-page caching, the performance difference from a static site will be negligible. So there's very little reason not to do it (hence why static sites are a rarity these days).

10% popularity Vote Up Vote Down


 

@Shelley277

If your site works with templates, e.g. it has a common header.php file, you can drop the code in there.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme