Add Lang.localizeAll

This commit is contained in:
tterrag1098 committed 2015-07-27 14:44:51 -04:00
1 parent de95b1799b
commit 7d22cc92ef
1 file changed
+19
@@ -1,5 +1,9 @@
package com.enderio.core.common;
import java.util.List;
import com.google.common.collect.Lists;
import lombok.Getter;
import net.minecraft.util.StatCollector;
@@ -108,6 +112,21 @@ public class Lang {
return splitList(localize(unloc));
}
/**
* Localizes all strings in a list, using the prefix.
*
* @param unloc
* The list of unlocalized strings.
* @return A list of localized versions of the passed strings.
*/
public List<String> localizeAll(List<String> unloc) {
List<String> ret = Lists.newArrayList();
for (String s : unloc) {
ret.add(localize(s));
}
return ret;
}
/**
* Splits a list of strings based on {@value #CHAR}
*