Localization standard Java Swing components
-
include library in your project
- as maven dependency
- or other way
-
add
swing_<lang>_<country>.properties
file with your localization inresources
folder in your project.- or create your custom
BundleStore
with use SPI - P.S. Russian localization added by default
- or create your custom
-
call static method
localize
from classSwingLocalizer
.Examples:
import SwingLocalizer; public class Main { static { SwingLocalizer.localize(); } public static void main(String[] args) { // ... } }
or
import SwingLocalizer; public class Main { public static void main(String... args) { SwingLocalizer.localize(); // ... } }
Using Maven
in project root directory execute mvn clean package
.