Last active
August 29, 2015 14:18
-
-
Save masakielastic/68d414dea605c5cd3880 to your computer and use it in GitHub Desktop.
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
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/i18next/1.6.3/i18next-1.6.3.min.js"></script> | |
<script> | |
var resources = { | |
en: { | |
translation: { | |
"content": { | |
"access": "Access" | |
} | |
} | |
} | |
}; | |
</script> | |
<script> | |
jQuery(function() { | |
var lang = navigator.languages ? navigator.languages[0] : | |
(navigator.language || navigator.userLanguage); | |
if (lang.substr(0,2) !== 'ja') { | |
i18n.init({ | |
resStore: resources, | |
lng: lang, | |
fallbackLng: 'en', | |
}).done(function() { | |
$('#cc-m-header-4150570958').attr('data-i18n', 'content.access'); | |
$('div[data-container="content"]').i18n(); | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment