Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- $('.translate').click(function() {
- var lang = $(this).attr('id');
- localStorage.setItem("language", lang);
- $('.lang').each(function(index, element) {
- $(this).text(arrLang[localStorage.getItem("language")][$(this).attr('key')]);
- });
- });
- if (localStorage.getItem("language") != "") {
- $('.lang').each(function(index, element) {
- $(this).text(arrLang[localStorage.getItem("language")][$(this).attr('key')]);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement