|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Localization in JavaScript ES6 PDF Viewer | Syncfusion |
| 4 | +description: Learn about the default language culture and localization in Syncfusion JavaScript ES6 PDF Viewer component. |
| 5 | +platform: document-processing |
| 6 | +control: PDF Viewer |
| 7 | +documentation: ug |
| 8 | +domainurl: ##DomainURL## |
| 9 | +--- |
| 10 | + |
| 11 | +# Localization support in Typescript PDF Viewer |
| 12 | + |
| 13 | +The PDF Viewer fully supports localization, allowing all UI text, tooltips, and messages to be replaced with culture-specific strings so the interface matches users’ language and regional settings. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## Default language (en-US) |
| 18 | + |
| 19 | +By default, the PDF Viewer uses the en-US culture and requires no additional configuration. |
| 20 | + |
| 21 | +{% tabs %} |
| 22 | +{% highlight ts tabtitle="Standalone" %} |
| 23 | +import { PdfViewer, TextSelection, TextSearch, Print, Navigation, Toolbar, Magnification, Annotation, FormDesigner, FormFields, PageOrganizer } from '@syncfusion/ej2-pdfviewer'; |
| 24 | +import {L10n} from '@syncfusion/ej2-base'; |
| 25 | +// Inject required modules |
| 26 | +PdfViewer.Inject(TextSelection, TextSearch, Print, Navigation, Toolbar, Magnification, Annotation, FormDesigner, FormFields, PageOrganizer); |
| 27 | + |
| 28 | +const pdfviewer: PdfViewer = new PdfViewer({ |
| 29 | + documentPath: 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', |
| 30 | + resourceUrl: "https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib", |
| 31 | + locale: 'en-US', //Using locale update culture |
| 32 | +}); |
| 33 | +pdfviewer.appendTo('#PdfViewer'); |
| 34 | +{% endhighlight %} |
| 35 | +{% highlight ts tabtitle="Server-Backed" %} |
| 36 | +import { PdfViewer, TextSelection, TextSearch, Print, Navigation, Toolbar, Magnification, Annotation, FormDesigner, FormFields, PageOrganizer } from '@syncfusion/ej2-pdfviewer'; |
| 37 | +import {L10n} from '@syncfusion/ej2-base'; |
| 38 | +// Inject required modules |
| 39 | +PdfViewer.Inject(TextSelection, TextSearch, Print, Navigation, Toolbar, Magnification, Annotation, FormDesigner, FormFields, PageOrganizer); |
| 40 | + |
| 41 | +const pdfviewer: PdfViewer = new PdfViewer({ |
| 42 | + documentPath: 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', |
| 43 | + serviceUrl: 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer/'; |
| 44 | + locale: 'en-US' //Using locale update culture |
| 45 | +}); |
| 46 | +pdfviewer.appendTo('#PdfViewer'); |
| 47 | +{% endhighlight %} |
| 48 | +{% endtabs %} |
| 49 | + |
| 50 | +[View Sample on GitHub](https://github.com/SyncfusionExamples/typescript-pdf-viewer-examples) |
| 51 | + |
| 52 | + |
| 53 | +## Localization keys reference |
| 54 | + |
| 55 | +The PDF Viewer supports localization using culture-specific string collections. By default, the component uses the "en-US" culture. |
| 56 | + |
| 57 | +The following table lists the default text values used by the PDF Viewer in the "en-US" culture: |
| 58 | + |
| 59 | +|Keywords|Values| |
| 60 | +|---|---| |
| 61 | +|PdfViewer|PDF Viewer| |
| 62 | +|Cancel|Cancel| |
| 63 | +|Download file|Download file| |
| 64 | +|Download|Download| |
| 65 | +|Enter Password|This document is password protected. Please enter a password.| |
| 66 | +|File Corrupted|File corrupted| |
| 67 | +|File Corrupted Content|The file is corrupted and cannot be opened.| |
| 68 | +|Fit Page|Fit page| |
| 69 | +|Fit Width|Fit width| |
| 70 | +|Automatic|Automatic| |
| 71 | +|Go To First Page|Show first page| |
| 72 | +|Invalid Password|Incorrect password. Please try again.| |
| 73 | +|Next Page|Show next page| |
| 74 | +|OK|OK| |
| 75 | +|Open|Open file| |
| 76 | +|Page Number|Current page number| |
| 77 | +|Previous Page|Show previous page| |
| 78 | +|Go To Last Page|Show last page| |
| 79 | +|Zoom|Zoom| |
| 80 | +|Zoom In|Zoom in| |
| 81 | +|Zoom Out|Zoom out| |
| 82 | +|Page Thumbnails|Page thumbnails| |
| 83 | +|Bookmarks|Bookmarks| |
| 84 | +|Print|Print file| |
| 85 | +|Password Protected|Password required| |
| 86 | +|Copy|Copy| |
| 87 | +|Text Selection|Text selection tool| |
| 88 | +|Panning|Pan mode| |
| 89 | +|Text Search|Find text| |
| 90 | +|Find in document|Find in document| |
| 91 | +|Match case|Match case| |
| 92 | +|Apply|Apply| |
| 93 | +|GoToPage|Go to page| |
| 94 | +|No Matches|Viewer has finished searching the document. No more matches were found| |
| 95 | +|No Text Found|No Text Found| |
| 96 | +|Undo|Undo| |
| 97 | +|Redo|Redo| |
| 98 | +|Annotation|Add or Edit annotations| |
| 99 | +|Highlight|Highlight Text| |
| 100 | +|Underline|Underline Text| |
| 101 | +|Strikethrough|Strikethrough Text| |
| 102 | +|Delete|Delete annotation| |
| 103 | +|Opacity|Opacity| |
| 104 | +|Color edit|Change Color| |
| 105 | +|Opacity edit|Change Opacity| |
| 106 | +|Highlight context|Highlight| |
| 107 | +|Underline context|Underline| |
| 108 | +|Strikethrough context|Strike through| |
| 109 | +|Server error|Web-service is not listening. PDF Viewer depends on web-service for all it's features. Please start the web service to continue.| |
| 110 | +|Open text|Open| |
| 111 | +|First text|First Page| |
| 112 | +|Previous text|Previous Page| |
| 113 | +|Next text|Next Page| |
| 114 | +|Last text|Last Page| |
| 115 | +|Zoom in text|Zoom In| |
| 116 | +|Zoom out text|Zoom Out| |
| 117 | +|Selection text|Selection| |
| 118 | +|Pan text|Pan| |
| 119 | +|Print text|Print| |
| 120 | +|Search text|Search| |
| 121 | +|Annotation Edit text|Edit Annotation| |
| 122 | +|Line Thickness|Line Thickness| |
| 123 | +|Line Properties|Line Properties| |
| 124 | +|Start Arrow|Start Arrow | |
| 125 | +|End Arrow|End Arrow| |
| 126 | +|Line Style|Line Style| |
| 127 | +|Fill Color|Fill Color| |
| 128 | +|Line Color|Line Color| |
| 129 | +|None|None| |
| 130 | +|Open Arrow|Open Arrow| |
| 131 | +|Closed Arrow|Closed Arrow| |
| 132 | +|Round Arrow|Round Arrow| |
| 133 | +|Square Arrow|Square Arrow| |
| 134 | +|Diamond Arrow|Diamond Arrow| |
| 135 | +|Cut|Cut| |
| 136 | +|Paste|Paste| |
| 137 | +|Delete Context|Delete Context| |
| 138 | +|Properties|Properties| |
| 139 | +|Add Stamp|Add Stamp| |
| 140 | +|Add Shapes|Add Shapes| |
| 141 | +|Stroke edit|Stroke Edit| |
| 142 | +|Change thickness|Change Thickness| |
| 143 | +|Add line|Add Line| |
| 144 | +|Add arrow|Add Arrow| |
| 145 | +|Add rectangle|Add Rectangle| |
| 146 | +|Add circle|Add Circle| |
| 147 | +|Add polygon|Add Polygon| |
| 148 | +|Add Comments|Add Comments| |
| 149 | +|Comments| Comments| |
| 150 | +|No Comments Yet|No Comments Yet| |
| 151 | +|Accepted| Accepted| |
| 152 | +|Completed| Completed| |
| 153 | +|Cancelled| Cancelled| |
| 154 | +|Rejected| Rejected| |
| 155 | +|Leader Length|Leader Length| |
| 156 | +|Scale Ratio|Scale Ratio| |
| 157 | +|Calibrate| Calibrate| |
| 158 | +|Calibrate Distance|Calibrate Distance| |
| 159 | +|Calibrate Perimeter|Calibrate Perimeter| |
| 160 | +|Calibrate Area|Calibrate Area| |
| 161 | +|Calibrate Radius|Calibrate Radius| |
| 162 | +|Calibrate Volume|Calibrate Volume| |
| 163 | +|Depth|Depth| |
| 164 | +|Closed|Closed| |
| 165 | +|Round|Round| |
| 166 | +|Square|Square| |
| 167 | +|Diamond|Diamond| |
| 168 | +|Edit|Edit| |
| 169 | +|Comment|Comment| |
| 170 | +|Comment Panel|Comment Panel| |
| 171 | +|Set Status|Set Status| |
| 172 | +|Post|Post| |
| 173 | +|Page|Page| |
| 174 | +|Add a comment|Add a comment| |
| 175 | +|Add a reply|Add a reply| |
| 176 | +|Import Annotations|Import Annotations| |
| 177 | +|Export Annotations|Export Annotations| |
| 178 | +|Add|Add| |
| 179 | +|Clear|Clear| |
| 180 | +|Bold|Bold| |
| 181 | +|Italic|Italic| |
| 182 | +|Strikethroughs|Strikethroughs| |
| 183 | +|Underlines|Underlines| |
| 184 | +|Superscript|Superscript| |
| 185 | +|Subscript|Subscript| |
| 186 | +|Align left|Align Left| |
| 187 | +|Align right|Align Right| |
| 188 | +|Center|Center| |
| 189 | +|Justify|Justify| |
| 190 | +|Font color|Font Color| |
| 191 | +|Text Align|Text Align| |
| 192 | +|Text Properties|Text Properties| |
| 193 | +|Draw Signature|Draw Signature| |
| 194 | +|Create| Create| |
| 195 | +|Font family|Font Family| |
| 196 | +|Font size|Font Size| |
| 197 | +|Free Text|Free Text| |
| 198 | +|Import Failed|Import Failed| |
| 199 | +|File not found|File Not Found| |
| 200 | +|Export Failed|Export Failed| |
| 201 | +|Dynamic|Dynamic| |
| 202 | +|Standard Business|Standard Business| |
| 203 | +|Sign Here|Sign Here| |
| 204 | +|Custom Stamp|Custom Stamp| |
| 205 | +|InitialFieldDialogHeaderText|Initial Field Dialog Header Text| |
| 206 | +|HandwrittenInitialDialogHeaderText|Handwritten Initial Dialog Header Text| |
| 207 | +|SignatureFieldDialogHeaderText|Signature Field Dialog Header Text| |
| 208 | +|HandwrittenSignatureDialogHeaderText|Handwritten Signature Dialog Header Text| |
| 209 | +|Draw-hand Signature|Draw-hand Signature| |
| 210 | +|Type Signature|Type Signature| |
| 211 | +|Upload Signature|Upload Signature| |
| 212 | +|Browse Signature Image|Browse Signature Image| |
| 213 | +|Save Signature|Save Signature| |
| 214 | +|Save Initial|Save Initial| |
| 215 | +|highlight|highlight| |
| 216 | +|underline|underline| |
| 217 | +|strikethrough|strikethrough| |
| 218 | +|FormDesigner|Form Designer| |
| 219 | +|SubmitForm|Submit Form| |
| 220 | +|Search text|Search Text| |
| 221 | +|Draw Ink|Draw Ink| |
| 222 | +|Revised|Revised| |
| 223 | +|Reviewed|Reviewed| |
| 224 | +|Received|Received| |
| 225 | +|Confidential|Confidential| |
| 226 | +|Approved|Approved| |
| 227 | +|Not Approved|Not Approved| |
| 228 | +|Witness|Witness| |
| 229 | +|Initial Here|Initial Here| |
| 230 | +|Draft|Draft| |
| 231 | +|Final|Final| |
| 232 | +|For Public Release|For Public Release| |
| 233 | +|Not For Public Release|Not For Public Release| |
| 234 | +|For Comment|For Comment| |
| 235 | +|Void|Void| |
| 236 | +|Preliminary Results|Preliminary Results| |
| 237 | +|Information Only|Information Only| |
| 238 | +|Enter Signature as Name|Enter Signature as Name| |
| 239 | +|Textbox|Textbox| |
| 240 | +|Password|Password| |
| 241 | +|Check Box|Check Box| |
| 242 | +|Radio Button|Radio Button| |
| 243 | +|Dropdown|Dropdown| |
| 244 | +|List Box|List Box| |
| 245 | +|Signature|Signature| |
| 246 | +|Delete FormField|Delete FormField| |
| 247 | +|FormDesigner Edit text|Form Designer Edit Text| |
| 248 | +|in|in| |
| 249 | +|m|m| |
| 250 | +|ft_in|ft_in| |
| 251 | +|ft|ft| |
| 252 | +|p|p| |
| 253 | +|cm|cm| |
| 254 | +|mm|mm| |
| 255 | +|pt|pt| |
| 256 | +|cu|cu| |
| 257 | +|sq|sq| |
| 258 | +|General|General| |
| 259 | +|Appearance|Appearance| |
| 260 | +|Options|Options| |
| 261 | +|Textbox Properties|Textbox Properties| |
| 262 | +|Name|Name| |
| 263 | +|Tooltip|Tooltip| |
| 264 | +|Value|Value| |
| 265 | +|Form Field Visibility|Form Field Visibility| |
| 266 | +|Read Only|Read Only| |
| 267 | +|Required|Required| |
| 268 | +|Checked|Checked| |
| 269 | +|Show Printing|Show Printing| |
| 270 | +|Formatting|Formatting| |
| 271 | +|Fill|Fill| |
| 272 | +|Border|Border| |
| 273 | +|Border Color|Border Color| |
| 274 | +|Thickness|Thickness| |
| 275 | +|Max Length|Max Length| |
| 276 | +|List Item|List Item| |
| 277 | +|Export Value|Export Value| |
| 278 | +|Dropdown Item List|Dropdown Item List| |
| 279 | +|List Box Item List|List Box Item List| |
| 280 | +|Delete Item|Delete Item| |
| 281 | +|Up|Up| |
| 282 | +|Down|Down| |
| 283 | +|Multiline|Multiline| |
| 284 | +|Initial|Initial| |
| 285 | +|Export XFDF|Export XFDF| |
| 286 | +|Import XFDF|Import XFDF| |
| 287 | +|Organize Pages|Organize Pages| |
| 288 | +|Insert Right|Insert Right| |
| 289 | +|Insert Left|Insert Left| |
| 290 | +|Total|Total| |
| 291 | +|Pages|Pages| |
| 292 | +|Rotate Right|Rotate Right| |
| 293 | +|Rotate Left|Rotate Left| |
| 294 | +|Delete Page|Delete Page| |
| 295 | +|Delete Pages|Delete Pages| |
| 296 | +|Copy Page|Copy Page| |
| 297 | +|Copy Pages|Copy Pages| |
| 298 | +|Save|Save| |
| 299 | +|Save As|Save As| |
| 300 | +|Select All|Select All| |
| 301 | +|Import Document|Import Document| |
| 302 | +|Match any word|Match any word| |
| 303 | +|Client error|Client-side error is found. Please check the custom headers provided in the AjaxRequestSettings property and web action methods in the ServerActionSettings property| |
| 304 | +|Cors policy error|Unable to retrieve the document due to an invalid URL or access restrictions. Please check the document URL and try again| |
| 305 | +|No More Matches|Viewer has finished searching the document. No more matches were found| |
| 306 | +|No Search Matches|No matches found| |
| 307 | +|No More Search Matches|No more matches found| |
| 308 | +|Exact Matches|EXACT MATCHES| |
| 309 | +|Total Matches|TOTAL MATCHES| |
| 310 | + |
| 311 | +## See Also |
| 312 | + |
| 313 | +- [New Language](./new-language) |
| 314 | +- [RTL Language Support](./rtl-language-support) |
0 commit comments