mirror of
https://github.com/GTNewHorizons/Advanced-Botany.git
synced 2026-11-24 22:04:43 +00:00
errores del primer commit
This commit is contained in:
1 parent
d9538e9d44
commit
91fa3fcbd0
15 files changed
+422
-18
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package ab.common.utils;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class LocalizationManager {
|
||||
|
||||
public static String getLocalizedString(String key) {
|
||||
if (StatCollector.canTranslate(key)) {
|
||||
return StatCollector.translateToLocal(key);
|
||||
} else {
|
||||
return StatCollector.translateToFallback(key);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getLocalizedString(String key, Object... objects) {
|
||||
if (StatCollector.canTranslate(key)) {
|
||||
return String.format(StatCollector.translateToLocal(key), objects);
|
||||
} else {
|
||||
return String.format(StatCollector.translateToFallback(key), objects);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user