-
Notifications
You must be signed in to change notification settings - Fork 13
1012852: Localization in React PDF Viewer #2365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
08d5b4d
1012852: Localization in React PDF Viewer
SF4524LogeshKumar 4285dcb
1012852: Resolved CI failures
SF4524LogeshKumar 6e4b4db
1012852: Updated the Proper Title for Localization
SF4524LogeshKumar f09010b
Merge branch 'development' into 1012852-localizationReact
SF4524LogeshKumar 0f5709b
1012852: Renamed into Proper Heading
SF4524LogeshKumar d351d6e
Merge branch 'development' into 1012852-localizationReact
SF4524LogeshKumar 2a2cb6a
Merge branch 'development' into 1012852-localizationReact
SF4524LogeshKumar 8a1f3ab
1012852: Resolved CI failure
SF4524LogeshKumar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
321 changes: 321 additions & 0 deletions
321
Document-Processing/PDF/PDF-Viewer/react/Localization/default-language.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,321 @@ | ||
| --- | ||
| 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. | ||
| platform: document-processing | ||
| control: PDF Viewer | ||
| documentation: ug | ||
| 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. | ||
|
|
||
|  | ||
|
|
||
| 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`. | ||
|
|
||
| ## Default language (en-US) | ||
|
|
||
| By default, the PDF Viewer uses the `en-US` culture and requires no additional configuration. | ||
|
|
||
| {% tabs %} | ||
| {% highlight js tabtitle="Standalone" %} | ||
| {% raw %} | ||
| import * as ReactDOM from 'react-dom'; | ||
| import * as React from 'react'; | ||
| import './index.css'; | ||
| import { | ||
| PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, | ||
| ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormDesigner, FormFields, Inject | ||
| } from '@syncfusion/ej2-react-pdfviewer'; | ||
|
|
||
| // Inject required modules | ||
| PdfViewerComponent.Inject(Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, | ||
| ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormDesigner, FormFields); | ||
|
|
||
| export function App() { | ||
| return ( | ||
| <div className='control-section'> | ||
| {/* Render the PDF Viewer with default en-US locale */} | ||
| <PdfViewerComponent | ||
| id="pdfViewer" | ||
| documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" | ||
| resourceUrl="https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib" | ||
| locale="en-US" | ||
| /> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| const root = ReactDOM.createRoot(document.getElementById('sample')); | ||
| root.render(<App />); | ||
| {% endraw %} | ||
| {% endhighlight %} | ||
| {% endtabs %} | ||
|
|
||
| [View Sample on GitHub](https://github.com/SyncfusionExamples/react-pdf-viewer-examples) | ||
|
|
||
| ## Localization keys reference | ||
|
|
||
| The PDF Viewer supports localization using culture-specific string collections. By default, the component uses the "en-US" culture. | ||
|
|
||
| The following table lists the default text values used by the PDF Viewer in the "en-US" culture: | ||
|
|
||
| |Keywords|Values| | ||
| |---|---| | ||
| |PdfViewer|PDF Viewer| | ||
| |Cancel|Cancel| | ||
| |Download file|Download file| | ||
| |Download|Download| | ||
| |Enter Password|This document is password protected. Please enter a password.| | ||
| |File Corrupted|File corrupted| | ||
| |File Corrupted Content|The file is corrupted and cannot be opened.| | ||
| |Fit Page|Fit page| | ||
| |Fit Width|Fit width| | ||
| |Automatic|Automatic| | ||
| |Go To First Page|Show first page| | ||
| |Invalid Password|Incorrect password. Please try again.| | ||
| |Next Page|Show next page| | ||
| |OK|OK| | ||
| |Open|Open file| | ||
| |Page Number|Current page number| | ||
| |Previous Page|Show previous page| | ||
| |Go To Last Page|Show last page| | ||
| |Zoom|Zoom| | ||
| |Zoom In|Zoom in| | ||
| |Zoom Out|Zoom out| | ||
| |Page Thumbnails|Page thumbnails| | ||
| |Bookmarks|Bookmarks| | ||
| |Print|Print file| | ||
| |Password Protected|Password required| | ||
| |Copy|Copy| | ||
| |Text Selection|Text selection tool| | ||
| |Panning|Pan mode| | ||
| |Text Search|Find text| | ||
| |Find in document|Find in document| | ||
| |Match case|Match case| | ||
| |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| | ||
| |Undo|Undo| | ||
| |Redo|Redo| | ||
| |Annotation|Add or Edit annotations| | ||
| |Highlight|Highlight Text| | ||
| |Underline|Underline Text| | ||
| |Strikethrough|Strikethrough Text| | ||
| |Delete|Delete annotation| | ||
| |Opacity|Opacity| | ||
| |Color edit|Change Color| | ||
| |Opacity edit|Change Opacity| | ||
| |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.| | ||
| |Open text|Open| | ||
| |First text|First Page| | ||
| |Previous text|Previous Page| | ||
| |Next text|Next Page| | ||
| |Last text|Last Page| | ||
| |Zoom in text|Zoom In| | ||
| |Zoom out text|Zoom Out| | ||
| |Selection text|Selection| | ||
| |Pan text|Pan| | ||
| |Print text|Print| | ||
| |Search text|Search| | ||
| |Annotation Edit text|Edit Annotation| | ||
| |Line Thickness|Line Thickness| | ||
| |Line Properties|Line Properties| | ||
| |Start Arrow|Start Arrow | | ||
| |End Arrow|End Arrow| | ||
| |Line Style|Line Style| | ||
| |Fill Color|Fill Color| | ||
| |Line Color|Line Color| | ||
| |None|None| | ||
| |Open Arrow|Open Arrow| | ||
| |Closed Arrow|Closed Arrow| | ||
| |Round Arrow|Round Arrow| | ||
| |Square Arrow|Square Arrow| | ||
| |Diamond Arrow|Diamond Arrow| | ||
| |Cut|Cut| | ||
| |Paste|Paste| | ||
| |Delete Context|Delete Context| | ||
| |Properties|Properties| | ||
| |Add Stamp|Add Stamp| | ||
| |Add Shapes|Add Shapes| | ||
| |Stroke edit|Stroke Edit| | ||
| |Change thickness|Change Thickness| | ||
| |Add line|Add Line| | ||
| |Add arrow|Add Arrow| | ||
| |Add rectangle|Add Rectangle| | ||
| |Add circle|Add Circle| | ||
| |Add polygon|Add Polygon| | ||
| |Add Comments|Add Comments| | ||
| |Comments| Comments| | ||
| |No Comments Yet|No Comments Yet| | ||
| |Accepted| Accepted| | ||
| |Completed| Completed| | ||
| |Cancelled| Cancelled| | ||
| |Rejected| Rejected| | ||
| |Leader Length|Leader Length| | ||
| |Scale Ratio|Scale Ratio| | ||
| |Calibrate| Calibrate| | ||
| |Calibrate Distance|Calibrate Distance| | ||
| |Calibrate Perimeter|Calibrate Perimeter| | ||
| |Calibrate Area|Calibrate Area| | ||
| |Calibrate Radius|Calibrate Radius| | ||
| |Calibrate Volume|Calibrate Volume| | ||
| |Depth|Depth| | ||
| |Closed|Closed| | ||
| |Round|Round| | ||
| |Square|Square| | ||
| |Diamond|Diamond| | ||
| |Edit|Edit| | ||
| |Comment|Comment| | ||
| |Comment Panel|Comment Panel| | ||
| |Set Status|Set Status| | ||
| |Post|Post| | ||
| |Page|Page| | ||
| |Add a comment|Add a comment| | ||
| |Add a reply|Add a reply| | ||
| |Import Annotations|Import Annotations| | ||
| |Export Annotations|Export Annotations| | ||
| |Add|Add| | ||
| |Clear|Clear| | ||
| |Bold|Bold| | ||
| |Italic|Italic| | ||
| |Strikethroughs|Strikethroughs| | ||
| |Underlines|Underlines| | ||
| |Superscript|Superscript| | ||
| |Subscript|Subscript| | ||
| |Align left|Align Left| | ||
| |Align right|Align Right| | ||
| |Center|Center| | ||
| |Justify|Justify| | ||
| |Font color|Font Color| | ||
| |Text Align|Text Align| | ||
| |Text Properties|Text Properties| | ||
| |Draw Signature|Draw Signature| | ||
| |Create| Create| | ||
| |Font family|Font Family| | ||
| |Font size|Font Size| | ||
| |Free Text|Free Text| | ||
| |Import Failed|Import Failed| | ||
| |File not found|File Not Found| | ||
| |Export Failed|Export Failed| | ||
| |Dynamic|Dynamic| | ||
| |Standard Business|Standard Business| | ||
| |Sign Here|Sign Here| | ||
| |Custom Stamp|Custom Stamp| | ||
| |InitialFieldDialogHeaderText|Initial Field Dialog Header Text| | ||
| |HandwrittenInitialDialogHeaderText|Handwritten Initial Dialog Header Text| | ||
| |SignatureFieldDialogHeaderText|Signature Field Dialog Header Text| | ||
| |HandwrittenSignatureDialogHeaderText|Handwritten Signature Dialog Header Text| | ||
| |Draw-hand Signature|Draw-hand Signature| | ||
| |Type Signature|Type Signature| | ||
| |Upload Signature|Upload Signature| | ||
| |Browse Signature Image|Browse Signature Image| | ||
| |Save Signature|Save Signature| | ||
| |Save Initial|Save Initial| | ||
| |highlight|highlight| | ||
| |underline|underline| | ||
| |strikethrough|strikethrough| | ||
| |FormDesigner|Form Designer| | ||
| |SubmitForm|Submit Form| | ||
| |Search text|Search Text| | ||
| |Draw Ink|Draw Ink| | ||
| |Revised|Revised| | ||
| |Reviewed|Reviewed| | ||
| |Received|Received| | ||
| |Confidential|Confidential| | ||
| |Approved|Approved| | ||
| |Not Approved|Not Approved| | ||
| |Witness|Witness| | ||
| |Initial Here|Initial Here| | ||
| |Draft|Draft| | ||
| |Final|Final| | ||
| |For Public Release|For Public Release| | ||
| |Not For Public Release|Not For Public Release| | ||
| |For Comment|For Comment| | ||
| |Void|Void| | ||
| |Preliminary Results|Preliminary Results| | ||
| |Information Only|Information Only| | ||
| |Enter Signature as Name|Enter Signature as Name| | ||
| |Textbox|Textbox| | ||
| |Password|Password| | ||
| |Check Box|Check Box| | ||
| |Radio Button|Radio Button| | ||
| |Dropdown|Dropdown| | ||
| |List Box|List Box| | ||
| |Signature|Signature| | ||
| |Delete FormField|Delete FormField| | ||
| |FormDesigner Edit text|Form Designer Edit Text| | ||
| |in|in| | ||
| |m|m| | ||
| |ft_in|ft_in| | ||
| |ft|ft| | ||
| |p|p| | ||
| |cm|cm| | ||
| |mm|mm| | ||
| |pt|pt| | ||
| |cu|cu| | ||
| |sq|sq| | ||
| |General|General| | ||
| |Appearance|Appearance| | ||
| |Options|Options| | ||
| |Textbox Properties|Textbox Properties| | ||
| |Name|Name| | ||
| |Tooltip|Tooltip| | ||
| |Value|Value| | ||
| |Form Field Visibility|Form Field Visibility| | ||
| |Read Only|Read Only| | ||
| |Required|Required| | ||
| |Checked|Checked| | ||
| |Show Printing|Show Printing| | ||
| |Formatting|Formatting| | ||
| |Fill|Fill| | ||
| |Border|Border| | ||
| |Border Color|Border Color| | ||
| |Thickness|Thickness| | ||
| |Max Length|Max Length| | ||
| |List Item|List Item| | ||
| |Export Value|Export Value| | ||
| |Dropdown Item List|Dropdown Item List| | ||
| |List Box Item List|List Box Item List| | ||
| |Delete Item|Delete Item| | ||
| |Up|Up| | ||
| |Down|Down| | ||
| |Multiline|Multiline| | ||
| |Initial|Initial| | ||
| |Export XFDF|Export XFDF| | ||
| |Import XFDF|Import XFDF| | ||
| |Organize Pages|Organize Pages| | ||
| |Insert Right|Insert Right| | ||
| |Insert Left|Insert Left| | ||
| |Total|Total| | ||
| |Pages|Pages| | ||
| |Rotate Right|Rotate Right| | ||
| |Rotate Left|Rotate Left| | ||
| |Delete Page|Delete Page| | ||
| |Delete Pages|Delete Pages| | ||
| |Copy Page|Copy Page| | ||
| |Copy Pages|Copy Pages| | ||
| |Save|Save| | ||
| |Save As|Save As| | ||
| |Select All|Select All| | ||
| |Import Document|Import Document| | ||
| |Match any word|Match any word| | ||
| |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| | ||
| |Cors policy error|Unable to retrieve the document due to an invalid URL or access restrictions. Please check the document URL and try again| | ||
| |No More Matches|Viewer has finished searching the document. No more matches were found| | ||
| |No Search Matches|No matches found| | ||
| |No More Search Matches|No more matches found| | ||
| |Exact Matches|EXACT MATCHES| | ||
| |Total Matches|TOTAL MATCHES| | ||
|
|
||
| ## See Also | ||
|
|
||
| - [New Language](./new-language) | ||
| - [RTL Language Support](./rtl-language-support) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.