A QR code (Quick Response code) is a type of two-dimensional code or a Matrix barcode. In simple words, it makes mobile users to access websites easily without typing in those long URL’s. The user just points the in-built camera at the printed QR code and the corresponding website opens up automatically in the mobile browser. This is a very smart and efficient way to promote a website or any webpage for that matter because it saves times and is hassle free. We’ve already shown you the method to create QR code using Goo.gl URL shortener.
Here’s Blogtechnika’s QR code.
Recently Wikipedia came up with a tool called QRpedia that adds language-detection capabilities to the QR codes. This is a very smart idea as when the user scans the QR code of any article in Wikipedia, the code identifies the default language of the phone and redirects the browser to the same article in that particular language.
Now this can also be done for your websites or web pages. Just copy the given snippet into your website template where you would like the QR code to appear.
var esc = window.encodeURIComponent ? window.encodeURIComponent : escape;
var url = ‘http://ctrlq.org/qrcode/l/?l=en&u=’ + document.location.href;
var cht = ‘http://chart.googleapis.com/chart?chs=200×200&cht=qr&chl=’ + esc(url);
document.write(“<img alt=’QR Code’ src='” + cht + “‘ />”);
Now if your website content is in a language other than English, change the “en” value (highlighted in yellow) to your language code (like es for español or fr for français). Also, the above code generates a 200×200 image but you may change the default values (highlighted in green) to something else that suits your site’s layout.
You can check the working of the QR code now. First change the language of your phone to any language other than English. Now scan the QR code for your website. You will find that the website will open in your browser but the content will be translated into your phone’s language.