PHP. Dynamic Internationalization and Localization with the JQuery Globalization Plugin
This small PHP snippet dynamically includes the JQuery globalization plugin (globalize.js) and the user specific locale and culture to the webpage. This is done by checking the headers sent by the browser, and finding out the user's preferred language. For instance, if the Accept-Language field in a header sent by Firefox is "en-us, en;q=0.5", this means the primary culture of the user is "en-us" with the value "q=1.0", the safe fail over for the system is "en" neutral ad has the value "q=0.5". Then the snippet will load the "globalize.culture.en-US.js" and "globalize.culture.en.js" to the webpage and finally will initiate the culture on browser webpage load.