MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / getBundle

Method getBundle

The 5zig Mod/src/eu/the5zig/mod/I18n.java:91–102  ·  view source on GitHub ↗
(Locale locale)

Source from the content-addressed store, hash-verified

89 }
90
91 private static PropertyResourceBundle getBundle(Locale locale) {
92 FileInputStream stream = null;
93 try {
94 stream = new FileInputStream(new File(The5zigMod.getModDirectory(), serialize(locale)));
95 return new PropertyResourceBundle(stream);
96 } catch (IOException e) {
97 The5zigMod.logger.error("Could not Load Property Resource Bundle!", e);
98 } finally {
99 IOUtils.closeQuietly(stream);
100 }
101 return null;
102 }
103
104 public static void setLanguage(Locale locale) {
105 String code = locale.toString();

Callers 3

loadPropertyBundleMethod · 0.95
I18nClass · 0.80
loadResourceBundleMethod · 0.80

Calls 3

getModDirectoryMethod · 0.95
serializeMethod · 0.95
errorMethod · 0.45

Tested by

no test coverage detected