Friday 19 May 2017

Make a Multilingual QR Code for your Website



MULTILINGUAL QR CODES DETECT PHONE’S LANGUAGE

Recently Wikipedia unveiled a new tool called QRpedia that adds language-detection capabilities to these static QR codes.

This is such a useful and clever idea. Now when a user scans a QR code image for a Wikipedia article, the code detects the default language of the mobile phone and automatically redirects him to the Wikipedia article in that language.


ADD MULTILINGUAL QR CODES TO YOUR WEBSITE

In case you would like to add Wikipedia style language-detection QR codes to your own web pages, here’s the relevant JavaScript code. Just copy-paste this snippet into your website template where you would like the the QR code image to appear and the code does the rest.

<script language=javascript>
 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=200x200&cht=qr&chl=' + esc(url);
 document.write("<img alt='QR Code' src='" + cht + "' />"); 
</script>

If your website content is in a language other than English, change the “en” value to another language code (like es for español or fr for français). Also, the above code generates a 200×200 QR Code but you may change the default height x width values to something else that suits your site’s layout.


LANGUAGE DETECTION AND LANGUAGE TRANSLATION

To test this QR code, go to your phone settings and change the default locale to español or français or anything other than English. Now scan the QR code image above and it should open this blog but only after translating it from English to your phone’s language.

Here’s what happens behind the scenes. The language detection part is handled by the QR code URL – it determines the user’s phone language after reading the request header sent by the mobile browser and then redirects the user to to translated page. The language translation is handled by Google Translate while the QR image itself is generated using the Google Charts API.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Labels

404 AdBlock Add-on Airtel GPRS Trick Airtel SMS Trick Alexa Amazon Amazon Kindle Amazon Prime Android Android 8 Android Oreo antivirus Apple Apple Mac ASCII Audacity Audio Authotkey Backup Balance Transfer in Vodafone Battery Bing Blogger Blogging Bookmarklet Browser Camera Chromebook clock Cloud colors command lines Computer Computer Tricks configuration Contact Creative Commons Credit Card CSS devolop DIY Doodle DOS Download Dropbox E-Mail eBook Email Email Attachment Embed Encryption English Error Evernote Eyes Facebook Facebook Tricks Feedburner Flipkart Font Foursquare Free Internet Free sms trick in Vodafone G Mail Gadget Game Getty Images GIF Gists Github Google Google AdSense Google Analytics Google Apps Google Chrome Google Contacts Google Currents Google DNS Google Docs Google Drive Google Earth Google Font Google Forms Google Images Google Map Google Photos Google Play Store Google Plus Google Print Google Reader Google Script Google Sheets Google Spreadsheet Google Translate GPRS Setting GPS Hacking Health App HelloFax Hindi Hoodie HTML Icons idea Image Editing Images IMEI Indian Railways Infographics Instagram Internet Internet Explorer Internet Tricks iOS iPad iPhone IRCTC iTunes iTV JavaScript JioCinema JioTV Junglee Kindle Language Translation Laptop Laptop. TV Life Time FREE GPRS Life-Style Link Linkedln Linux logo Make Money Online Microdoft Powerpoint Microdoft Word Microsoft Office Microsoft Outlook Mobile Mosaic Music Name Networking nexus Notepad OCR Online Shopping Open DNS OS Outlook Password PDF Petya Phillips Hue Lights Photogtraphy Pixel Play Station Podcasts Pokemon Pokemon Go Polls Print Productivity Proxy Server Pushbullet QR Code Ransomware Reddit Reliance Hack GPRS Reliance Jio RGB Ringtone Router RSS Safe Mode Samsung Galaxy S Scrabble Screen Capture Screen Sharing Screencast Secrets Security Send free sms from PC SEO Sierra Skype Slideshare SMBv1 SMS Snapchat Snapdeal Social Media Solution Sound Device Speech Recognition Sql Steam Sync Synology NAS Tata Docomo GPRS trick Teleprompter Torrent Trick Tricks TV Twitter UltraISO Unicode Unknown Extension Unlimited 2GB Unlimited 3GB Unlimited GPRS USB USB Security Key Video Editing virtual desktop Virus attack VLC Vodafone 110% working trick for GPRS Vodafone 3g Vodafone GPRS VPN wallpapers WannaCry Web Design Web Domain Website Wget Whatsapp WiFi Wikipedia Windows Windows 10 Windows 10 S Windows KN Windows Tricks windows updates Winows N Wolfarm Alpha WordPress XBox YouTube Zip
Twitter Delicious Facebook Digg Stumbleupon Favorites More