====== Magnific Popup ======
[[http://dimsemenov.com/plugins/magnific-popup/|Magnific Popup]] ist eine Lightbox-Lösung.
===== Texte übersetzen =====
Während der Initialisierung:
$('.lightbox').magnificPopup({
type: 'image',
gallery: {
enabled: true,
preload: [0, 2],
navigateByImgClick: true,
arrowMarkup: '',
tPrev: 'Zurück (Linke Pfeiltaste)',
tNext: 'Vorwärts (Rechte Pfeiltaste)',
tCounter: '%curr% von %total%'
},
image: {
tError: 'Das Bild konnte nicht geladen werden.'
}
});
Abhängig von '''':
$(document).ready(function () {
var curLang = $('html').attr('lang');
switch (curLang) {
case 'de':
$.extend(true, $.magnificPopup.defaults, {
tClose: 'Schließen',
tLoading: 'Wird geladen...',
gallery: {
tPrev: 'Zurück',
tNext: 'Weiter',
tCounter: '%curr% von %total%'
},
image: {
tError: 'Das Bild konnte nicht geladen werden.'
},
ajax: {
tError: 'Der Inhalt konnte nicht geladen werden.'
}
});
break;
default:
// english already included
}
});
Quelle: [[https://gist.github.com/RexDude/5b332a5772fa18572fd03bacbeca0356|GitHub: RexDude/mp-german-translation.js]]