Skip to content

Commit 1395124

Browse files
Merge pull request #2032 from syncfusion-content/1000665-localizationUG
1000665: Updated Localization Revamp and Restructuring
2 parents 57803a5 + fe313d5 commit 1395124

5 files changed

Lines changed: 962 additions & 10 deletions

File tree

Document-Processing-toc.html

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

0 commit comments

Comments
 (0)