Translation of text online is available through DEARFLIP.defaults.text
and through flipbook options.
using DEARFLIP.defaults.text
is recommended.
var flipBook;
$(document).ready(function () {
//preferred method by global translate
DFLIP.defaults.text= {
toggleSound: "Ton ein/aus schalten",
toggleThumbnails: "Vorschaubilder",
toggleOutline: "Lesezeichen",
previousPage: "vorherige Seite",
nextPage: "nächste Seite",
toggleFullscreen: "Vollbildschirm",
zoomIn: "Vergrößern",
zoomOut: "Verkleinern",
toggleHelp: "Hilfe",
//more buttons sections
singlePageMode: "einzel Seite",
doublePageMode: "doppel Seiten",
downloadPDFFile: "Download PDF",
gotoFirstPage: "erste Seite",
gotoLastPage: "letzte Seite"
};
});
jQuery(document).ready(function () {
var options = {
webgl: false,
hard:'cover',
height: 500,
duration: 800,
//or local translate but not recommended
text:{
toggleSound:"Translated Sound",
gotoFirstPage: "First page translate"
}
};
flipBook = $("#flipbookContainer").flipBook("example-assets/books/dflip manual.pdf", options);
});
Translation texts #
// TRANSLATION text to be displayed
text: {
toggleSound: "Turn on/off Sound",
toggleThumbnails: "Toggle Thumbnails",
toggleOutline: "Toggle Outline/Bookmark",
previousPage: "Previous Page",
nextPage: "Next Page",
toggleFullscreen: "Toggle Fullscreen",
zoomIn: "Zoom In",
zoomOut: "Zoom Out",
resetZoom: "Reset Zoom",
pageFit: 'Fit Page',
widthFit: 'Fit Width',
toggleHelp: "Toggle Help",
search: "Search in PDF",
singlePageMode: "Single Page Mode",
doublePageMode: "Double Page Mode",
downloadPDFFile: "Download PDF File",
gotoFirstPage: "Goto First Page",
gotoLastPage: "Goto Last Page",
print: "Print",
play: "Start AutoPlay",
pause: "Pause AutoPlay",
share: "Share",
close: "Close",
mailSubject: "Check out this FlipBook",
mailBody: "Check out this site {{url}}",
loading: "Loading",
thumbTitle: "Thumbnails",
outlineTitle: "Table of Contents",
searchTitle: "Search",
searchPlaceHolder: "Search",
analyticsEventCategory: "DearFlip",
analyticsViewerReady: "Document Ready",
analyticsViewerOpen: "Document Opened",
analyticsViewerClose: "Document Closed",
analyticsFirstPageChange: "First Page Changed",
},
Example usage and Demo: #
Change the text before loading dflip.min.js but before the scripts starts to run on.
jQuery(document).ready(function () {
DEARFLIP.defaults.text.loading ="My custom loading";
DEARFLIP.defaults.text.downloadPDFFile ="Custom Download Text";
});
If you do not have jquery. You can use DEARFLIP
callback function beforeDearFlipInit
window.beforeDearFlipInit = function(){
DEARFLIP.defaults.text.loading ="My custom loading";
DEARFLIP.defaults.text.downloadPDFFile ="Custom Download Text";
};