Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. if(window.location.href.indexOf("sv") > -1) {
  2. //CUSTOM TRANSLATIONS
  3.  
  4. var translations = {
  5. 'All' : 'alla',
  6. 'Filter Members' : 'Filtrera medlemar',
  7. }
  8.  
  9.  
  10.  
  11. for (var key in translations) {
  12. if (translations.hasOwnProperty(key)) {
  13.  
  14. console.log(key + " -> " + translations[key]);
  15. $body = jQuery("body");
  16. replaceThis = new RegExp(key, "g");
  17.  
  18. alert(replaceThis);
  19.  
  20. $body.html($body.html().replace(replaceThis, translations[key]));
  21.  
  22. }
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement