dansingerman / jquery-browser-language Goto Github PK
View Code? Open in Web Editor NEWGets browser's language setting in a useful way
License: MIT License
Gets browser's language setting in a useful way
License: MIT License
I really need this functionality, but am a n00b... horrid, I know. Over 60, too! Haven't programmed since the early '80s on a mini (PICK OS.) Sad case, I'm afraid.
Saw the examples on http://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference, but have not had luck trying to use them
If you might kindly restate for me the lines to put in the header, and those for the body section, in order to use the plugin, it would really, really help.
For the body, instead of "nowDoSomethingWithIt(language);" perhaps a line that just outputs the language detected to the html would be very nice. I can hack things from there, hopefully.
FWIW, I have five subdomains that are language versions (en,es,fr,de,ca) of the same content, and am trying to redirect to the right language from the top level domain (users would be then allowed to switch among subdomains in case they object to the redirected language choice.)
Thanks so much in advance for any tips you might provide.
Hlaf.
Hi Dan!
I noticed that the server used to check languages on the HTTP request is down due to over quota, it's giving out a 503 error. Found out because I was using your checker on a small site.
This service is down:
http://ajaxhttpheaders.appspot.com/
Hi there, thanks for doing this... it is clever!
Would you mind sharing the server side script that echoes back the HTTP request headers?
"... service at http://ajaxhttpheaders.appspot.com which echoes back the HTTP request headers in JSONP."
Thanks!
Nice and simple plugin. Thanks!
I think you should add a new function, a callback function that is executed when the information of the language is ready for use.
In my case, i needed to update some divs once the information about the browser language is ready.
Let me know if this is something you can do.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.