-
Notifications
You must be signed in to change notification settings - Fork 20
Fixed Issue #37 #42
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
base: master
Are you sure you want to change the base?
Fixed Issue #37 #42
Conversation
added language en, de, fr and public possibilty to switch
| matchesLabel.setText(matchCount + " matches"); | ||
| } | ||
| pageLabel.setText(getTranslation("Page", (item.getPageNumber() + 1))); | ||
| matchesLabel.setText(getTranslation("Matches", item.getItems().size())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not handle the same situations as the original code. I explicitly want to write "1 match" and "2 matches" (singular, plural).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw the resource bundle. I didn't know that this is possible. So you can specify this to use either singular or plural translation? If so then I learned something new today :-)
| } | ||
| } | ||
|
|
||
| public void loadLanguageProperties(String language) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know any JavaFX controls that explicitly add methods for translating the control. This should happen automatically. The control should pickup the required language bundle based on the language currently used by the JVM. If you need to be able to switch languages at runtime then you need to subclass the control and add the feature there.
…class to enable translations in PDFView and PDFViewSkin
added language en, de, fr and public possibilty to switch