Reputation: 12140
I have a problem with translating default context menu items on TextField
. There's no documentation about this menu in JavaFX
javadocs (at least I couldn't find the one).
I can manually create new context menu on each TextField
, rewrite the exising code and just change displayed text, but is there a sense in that? I can't believe that no one thought about this when designing JavaFX
components.
So, my question is - is there a way to overwrite these values?
Upvotes: 1
Views: 1301
Reputation: 209674
The text displayed in the context menu is stored in properties files that are read into a resource bundle. There is a collection of properties files with somewhat limited support for different languages. You can see these files in the source code repository.
It seems to be quite hard to add support for unsupported languages on the fly: there is a related question here - though I am still hoping someone who understands better than I how to do this may add a better answer to that.
In the meantime you might want to file a request at JIRA for support for additional languages - better still provide a properties file for your language of interest by translating the values in those linked above and submit it.
Upvotes: 1