Skip to content
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Localization in React PDF Viewer | Syncfusion
description: Learn here all about the default language culture and localization in Syncfusion React PDF Viewer component.
description: Learn about the default language culture and localization in the Syncfusion React PDF Viewer component.
platform: document-processing
control: PDF Viewer
documentation: ug
Expand All @@ -10,16 +10,18 @@ domainurl: ##DomainURL##

# Localization in the React PDF Viewer

The PDF Viewer supports localization of UI text, tooltips, and messages using culture-specific string collections so the interface matches users' language and regional settings.

![Default Locale](../../javascript-es6/images/locale-us.gif)

N> Change the viewer locale by setting the `locale` property on the React component or by loading translations with `L10n.load` from `@syncfusion/ej2-base`.
The PDF Viewer supports localization of UI text, tooltips, and messages using culture-specific string collections so that the interface matches users' language and regional settings.

## Default language (en-US)

By default, the PDF Viewer uses the `en-US` culture and requires no additional configuration.

![Default en-US locale](../../javascript-es6/images/locale-us.gif)

*Default PDF Viewer UI rendered in the en-US culture.*

N> You can change the viewer locale by setting the [`locale`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/index-default#locale) property on the React component. To load custom translations, use `L10n.load` from `@syncfusion/ej2-base`.

{% tabs %}
{% highlight js tabtitle="Standalone" %}
{% raw %}
Expand All @@ -28,7 +30,7 @@ import * as React from 'react';
import './index.css';
import {
PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView,
ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormDesigner, FormFields, Inject
ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormDesigner, FormFields
} from '@syncfusion/ej2-react-pdfviewer';

// Inject required modules
Expand Down Expand Up @@ -99,7 +101,7 @@ The following table lists the default text values used by the PDF Viewer in the
|Apply|Apply|
|GoToPage|Go to page|
|No Matches|Viewer has finished searching the document. No more matches were found|
|No Text Found|No Text Found|
|No Text Found|No text found|
|Undo|Undo|
|Redo|Redo|
|Annotation|Add or Edit annotations|
Expand All @@ -113,7 +115,7 @@ The following table lists the default text values used by the PDF Viewer in the
|Highlight context|Highlight|
|Underline context|Underline|
|Strikethrough context|Strike through|
|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.|
|Server error|Web-service is not listening. PDF Viewer depends on web-service for all its features. Please start the web service to continue.|
|Open text|Open|
|First text|First Page|
|Previous text|Previous Page|
Expand All @@ -128,7 +130,7 @@ The following table lists the default text values used by the PDF Viewer in the
|Annotation Edit text|Edit Annotation|
|Line Thickness|Line Thickness|
|Line Properties|Line Properties|
|Start Arrow|Start Arrow |
|Start Arrow|Start Arrow|
|End Arrow|End Arrow|
|Line Style|Line Style|
|Fill Color|Fill Color|
Expand All @@ -153,15 +155,15 @@ The following table lists the default text values used by the PDF Viewer in the
|Add circle|Add Circle|
|Add polygon|Add Polygon|
|Add Comments|Add Comments|
|Comments| Comments|
|Comments|Comments|
|No Comments Yet|No Comments Yet|
|Accepted| Accepted|
|Completed| Completed|
|Cancelled| Cancelled|
|Rejected| Rejected|
|Accepted|Accepted|
|Completed|Completed|
|Cancelled|Cancelled|
|Rejected|Rejected|
|Leader Length|Leader Length|
|Scale Ratio|Scale Ratio|
|Calibrate| Calibrate|
|Calibrate|Calibrate|
|Calibrate Distance|Calibrate Distance|
|Calibrate Perimeter|Calibrate Perimeter|
|Calibrate Area|Calibrate Area|
Expand Down Expand Up @@ -198,12 +200,12 @@ The following table lists the default text values used by the PDF Viewer in the
|Text Align|Text Align|
|Text Properties|Text Properties|
|Draw Signature|Draw Signature|
|Create| Create|
|Create|Create|
|Font family|Font Family|
|Font size|Font Size|
|Free Text|Free Text|
|Import Failed|Import Failed|
|File not found|File Not Found|
|File not found|File not found|
|Export Failed|Export Failed|
|Dynamic|Dynamic|
|Standard Business|Standard Business|
Expand Down Expand Up @@ -251,7 +253,7 @@ The following table lists the default text values used by the PDF Viewer in the
|List Box|List Box|
|Signature|Signature|
|Delete FormField|Delete FormField|
|FormDesigner Edit text|Form Designer Edit Text|
|FormDesigner Edit text|Form Designer Edit text|
|in|in|
|m|m|
|ft_in|ft_in|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Use the React PDF Viewer’s [locale](https://ej2.syncfusion.com/react/documenta
- (Optional) A list of keys you want to override.

## Quick start (set German)
1. **Load translations** with `L10n.load` at app start (only include the keys you want to change).
2. **Set the culture** by passing `locale` value to `<PdfViewerComponent/>`.
3. **Render the viewer** as usual. Missing keys will automatically fall back to `en-US`.
1. **Load translations** with `L10n.load` at app start (only include the keys you want to change). The example below loads the full set; you can load only the keys you need.
2. **Set the culture** by passing a `locale` value to `<PdfViewerComponent/>`. The code below uses `de`; replace it with any other supported culture code (for example, `'fr'`, `'es'`, `'ja'`, or a region-specific tag like `'de-DE'`).
3. **Render the viewer** as usual. Missing keys automatically fall back to `en-US`.

{% tabs %}
{% highlight js tabtitle="Standalone" %}
Expand Down Expand Up @@ -68,7 +68,7 @@ L10n.load({
'Zoom Out': 'Herauszoomen',
'Page Thumbnails': 'Miniaturansichten der Seiten',
'Bookmarks': 'Lesezeichen',
'Print': 'Druckdatei',
'Print': 'Drucken',
'Organize Pages': 'Seiten organisieren',
'Insert Right': 'Rechts einfügen',
'Insert Left': 'Links einfügen',
Expand All @@ -84,17 +84,17 @@ L10n.load({
'Save': 'Speichern',
'Save As': 'Speichern als',
'Select All': 'Wählen Sie Alle',
'Change Page Zoom': 'Change Page Zoom',
'Increase Page Zoom': 'Increase Page Zoom',
'Decrease Page Zoom': 'Decrease Page Zoom',
'Change Page Zoom': 'Seitenzoom ändern',
'Increase Page Zoom': 'Seitenzoom vergrößern',
'Decrease Page Zoom': 'Seitenzoom verringern',
'Password Protected': 'Passwort erforderlich',
'Copy': 'Kopieren',
'Text Selection': 'Textauswahltool',
'Panning': 'Schwenkmodus',
'Text Search': 'Text finden',
'Find in document': 'Im Dokument suchen',
'Match case': 'Gross- / Kleinschreibung',
'Match any word': 'Passen Sie ein beliebiges Wort an',
'Match any word': 'Treffe irgendein Wort',
'Apply': 'Anwenden',
'GoToPage': 'Gehen Sie zur Seite',
'No Matches': 'PDF Viewer hat die Suche im Dokument abgeschlossen. Es wurden keine Übereinstimmungen gefunden.',
Expand All @@ -110,15 +110,15 @@ L10n.load({
'Highlight': 'Text hervorheben',
'Underline': 'Text unterstreichen',
'Strikethrough': 'Durchgestrichener Text',
'Squiggly': 'Squiggly Text',
'Delete': 'Anmerkung löschen',
'Squiggly': 'Zickzack',
'Delete': 'löschen',
'Opacity': 'Opazität',
'Color edit': 'Farbe ändern',
'Opacity edit': 'Deckkraft ändern',
'Highlight context': 'Markieren',
'Underline context': 'Unterstreichen',
'Strikethrough context': 'Durchschlagen',
'Squiggly context': 'Squiggly',
'Strikethrough context': 'Durchgestrichener Kontext',
'Squiggly context': 'Geschwungener Kontext',
'Server error': 'Der Webdienst hört nicht zu. ',
'Client error': 'Der Client-Seiten-Fehler wird gefunden. Bitte überprüfen Sie die benutzerdefinierten Header in der Eigenschaft von AjaxRequestSets und Web -Aktion in der Eigenschaftsassettierungseigenschaft.',
'Cors policy error': 'Das Dokument kann aufgrund einer ungültigen URL- oder Zugriffsbeschränkungen nicht abgerufen werden. Bitte überprüfen Sie die Dokument -URL und versuchen Sie es erneut.',
Expand All @@ -130,14 +130,14 @@ L10n.load({
'Zoom in text': 'Hineinzoomen',
'Zoom out text': 'Rauszoomen',
'Selection text': 'Auswahl',
'Pan text': 'Pfanne',
'Pan text': 'Pan-Text',
'Print text': 'Drucken',
'Search text': 'Suchen',
'Annotation Edit text': 'Anmerkung bearbeiten',
'FormDesigner Edit text': 'Fügen Sie Formularfelder hinzu und bearbeiten Sie sie',
'Line Thickness': 'Dicke der Linie',
'Line Properties': 'Linieneigenschaften',
'Start Arrow': 'Pfeil starten',
'Start Arrow': 'Startpfeil',
'End Arrow': 'Endpfeil',
'Line Style': 'Linienstil',
'Fill Color': 'Füllfarbe',
Expand All @@ -150,7 +150,7 @@ L10n.load({
'Diamond Arrow': 'Diamant',
'Butt': 'Hintern',
'Cut': 'Schneiden',
'Paste': 'Paste',
'Paste': 'Einfügen',
'Delete Context': 'Löschen',
'Properties': 'Eigenschaften',
'Add Stamp': 'Stempel hinzufügen',
Expand Down Expand Up @@ -191,21 +191,21 @@ L10n.load({
'Page': 'Seite',
'Add a comment': 'Einen Kommentar hinzufügen',
'Add a reply': 'Fügen Sie eine Antwort hinzu',
'Import Annotations': 'Importieren Sie Annotationen aus der JSON -Datei',
'Export Annotations': 'Annotation an die JSON -Datei exportieren',
'Export XFDF': 'Annotation in XFDF -Datei exportieren',
'Import XFDF': 'Importieren Sie Annotationen aus der XFDF -Datei',
'Import Annotations': 'Importieren Sie Annotationen aus der JSON-Datei',
'Export Annotations': 'Annotation an die JSON-Datei exportieren',
'Export XFDF': 'Annotation in XFDF-Datei exportieren',
'Import XFDF': 'Importieren Sie Annotationen aus der XFDF-Datei',
'Add': 'Hinzufügen',
'Clear': 'Klar',
'Bold': 'Deutlich',
'Bold': 'Fett',
'Italic': 'Kursiv',
'Strikethroughs': 'Durchgestrichen',
'Underlines': 'Unterstreichen',
'Superscript': 'Hochgestellt',
'Subscript': 'Index',
'Align left': 'Linksbündig',
'Align right': 'Rechts ausrichten',
'Center': 'Center',
'Center': 'Zentrum',
'Justify': 'Rechtfertigen',
'Font color': 'Schriftfarbe',
'Text Align': 'Textausrichtung',
Expand All @@ -219,11 +219,11 @@ L10n.load({
'Font family': 'Schriftfamilie',
'Font size': 'Schriftgröße',
'Free Text': 'Freier Text',
'Import Failed': 'Ungültiger JSON -Dateityp oder Dateiname; Bitte wählen Sie eine gültige JSON -Datei aus',
'Import PDF Failed': 'Ungültige PDF -Dateityp oder PDF -Datei nicht gefunden. Bitte wählen Sie eine gültige PDF -Datei aus',
'File not found': 'Die importierte JSON -Datei wird nicht am gewünschten Ort gefunden',
'Import Failed': 'Ungültiger JSON-Dateityp oder Dateiname; Bitte wählen Sie eine gültige JSON-Datei aus',
'Import PDF Failed': 'Ungültiger PDF-Dateityp oder PDF-Datei nicht gefunden. Bitte wählen Sie eine gültige PDF-Datei aus',
'File not found': 'Die importierte JSON-Datei wird nicht am gewünschten Ort gefunden',
'Export Failed': 'Exportanmerkungen sind gescheitert. Bitte stellen Sie sicher, dass Anmerkungen ordnungsgemäß hinzugefügt werden',
'of': 'von ',
'of': 'von',
'Dynamic': 'Dynamisch',
'Standard Business': 'Standardgeschäft',
'Sign Here': 'Hier unterschreiben',
Expand All @@ -238,37 +238,37 @@ L10n.load({
'Textbox': 'Textfeld',
'Password': 'Passwort',
'Check Box': 'Kontrollkästchen',
'Radio Button': 'Radio knopf',
'Dropdown': 'Runterfallen',
'Radio Button': 'Optionsfeld',
'Dropdown': 'Dropdown',
'List Box': 'Listenfeld',
'Signature': 'Unterschrift',
'Delete FormField': 'Formular löschen',
'Textbox Properties': 'Textbox -Eigenschaften',
'Textbox Properties': 'Textbox-Eigenschaften',
'Name': 'Name',
'Tooltip': 'Tooltip',
'Value': 'Wert',
'Form Field Visibility': 'Sichtbarkeit von Feldwäschen',
'Form Field Visibility': 'Sichtbarkeit des Formularfelds',
'Read Only': 'Schreibgeschützt',
'Required': 'Erforderlich',
'Checked': 'Geprüft',
'Show Printing': 'Drucken zeigen',
'Show Printing': 'Druck anzeigen',
'Formatting': 'Format',
'Fill': 'Füllen',
'Border': 'Grenze',
'Border Color': 'Randfarbe',
'Thickness': 'Dicke',
'Max Length': 'Maximale Länge',
'List Item': 'Artikelname',
'Export Value': 'Gegenstandswert',
'Dropdown Item List': 'Dropdown -Elementliste',
'Export Value': 'Exportwert',
'Dropdown Item List': 'Dropdown-Elementliste',
'List Box Item List': 'Listenfeldelementliste',
'General': 'ALLGEMEIN',
'Appearance': 'AUSSEHEN',
'Options': 'OPTIONEN',
'General': 'Allgemein',
'Appearance': 'Aussehen',
'Options': 'Optionen',
'Delete Item': 'Löschen',
'Up': 'Hoch',
'Down': 'Runter',
'Multiline': 'Multiline',
'Multiline': 'Mehrzeilig',
'Revised': 'Überarbeitet',
'Reviewed': 'Bewertet',
'Received': 'Erhalten',
Expand Down Expand Up @@ -296,24 +296,25 @@ L10n.load({
'cu': 'cu',
'sq': 'Quadrat',
'Initial': 'Initiale',
'Extract Pages': 'Extract Pages',
'Delete Pages After Extracting': 'Delete Pages After Extracting',
'Extract Pages As Separate Files': 'Extract Pages As Separate Files',
'Extract': 'Extract',
'Example: 1,3,5-12': 'Example: 1,3,5-12',
'No matches': 'Der Viewer hat die Suche im Dokument abgeschlossen. ',
'Extract Pages': 'Seiten extrahieren',
'Delete Pages After Extracting': 'Seiten nach dem Extrahieren löschen',
'Extract Pages As Separate Files': 'Seiten als separate Dateien extrahieren',
'Extract': 'Auszug',
'Example: 1,3,5-12': 'Beispiel: 1,3,5-12',
'No matches': 'Der Viewer hat die Suche im Dokument abgeschlossen.',
'No Text Found': 'Kein Text gefunden'
}
}
});
// Inject required modules

// Inject required services for the toolbar, navigation, annotations, and form designer modules.
PdfViewerComponent.Inject(Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView,
ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormDesigner, FormFields);
/** 2) Set locale="de" on the component */
export function App() {
return (
<div className='control-section'>
{/* Render the PDF Viewer with default en-US locale */}
{/* Render the PDF Viewer with the German locale */}
<PdfViewerComponent
id="pdfViewer"
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
Expand Down
Loading