Last active
February 9, 2016 21:15
-
-
Save ray-peters/a6934577940a32a35b51 to your computer and use it in GitHub Desktop.
OPTv2 uberGlobalize Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* @author Ray Peters <rpeters@ontraport.com> */ | |
| jQuery( document ).ready( function(){ | |
| /* CUSTOMIZATIONS */ | |
| /* A list of cultures available @ http://cdnjs.com/libraries/globalize */ | |
| /* A list of cultures to try and load is available on the left-most column of @ http://download1.parallels.com/SiteBuilder/Windows/docs/3.2/en_US/sitebulder-3.2-win-sdk-localization-pack-creation-guide/30801.htm */ | |
| /* Common country codes -- AUSTRALIA: en-AU, GREAT BRITAIN: en-GB */ | |
| var COUNTRY_CODE = "en-GB"; | |
| /* DO NOT EDIT ANYTING BELOW THIS LINE */ | |
| if ( COUNTRY_CODE ) { | |
| jQuery.getScript( "https://cdn.rawgit.com/ray-peters/3618446832df71f66d7c/raw/3d5ce09e5839ceddbfbf2e8ec78bb42e633bdc19/generic-uberglobalize.js", | |
| function(){ | |
| var attachGlobalizeCall = function() { | |
| if ( !window.uberGlobalize ) { | |
| /* Try again later */ | |
| setTimeout( attachGlobalizeCall, 50 ); | |
| return; | |
| } else { | |
| window.uberGlobalize.done( function( helper ) { | |
| helper( COUNTRY_CODE ); | |
| } ); | |
| } | |
| }; | |
| attachGlobalizeCall(); | |
| } | |
| ); | |
| } else { | |
| alert( "uberGlobalize seems to be missing it's country code. Please refer to the original script @ https://gist.github.com/ray-peters/a6934577940a32a35b51" ); | |
| } | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment