mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 15:57:42 +00:00
Add lang proxy
This commit is contained in:
1 parent
0ba1132ff6
commit
76a6c9e7d5
1 file changed
+20
@@ -0,0 +1,20 @@
|
||||
package codechicken.lib.util;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class LangProxy
|
||||
{
|
||||
public final String namespace;
|
||||
|
||||
public LangProxy(String namespace) {
|
||||
this.namespace = namespace+".";
|
||||
}
|
||||
|
||||
public String translate(String key) {
|
||||
return StatCollector.translateToLocal(namespace+key);
|
||||
}
|
||||
|
||||
public String format(String key, Object... params) {
|
||||
return StatCollector.translateToLocalFormatted(namespace+key, params);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user