mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-21 12:32:15 +00:00
Add Lang.localizeAll
This commit is contained in:
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}
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user