mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-22 12:59:49 +00:00
24 lines
558 B
Java
24 lines
558 B
Java
package slimeknights.mantle.util;
|
|
|
|
import net.minecraft.util.text.translation.I18n;
|
|
|
|
import java.util.Locale;
|
|
|
|
// localization utils
|
|
public abstract class LocUtils {
|
|
|
|
private LocUtils() {
|
|
}
|
|
|
|
/**
|
|
* Removes all whitespaces from the string and makes it lowercase.
|
|
*/
|
|
public static String makeLocString(String unclean) {
|
|
return unclean.toLowerCase(Locale.US).replaceAll(" ", "");
|
|
}
|
|
|
|
public static String translateRecursive(String key, Object... params) {
|
|
return I18n.translateToLocal(I18n.translateToLocalFormatted(key, params));
|
|
}
|
|
}
|