diff --git a/source/net/filebot/format/ExpressionFormatMethods.java b/source/net/filebot/format/ExpressionFormatMethods.java index 8f5d3dd4..5062e2a6 100644 --- a/source/net/filebot/format/ExpressionFormatMethods.java +++ b/source/net/filebot/format/ExpressionFormatMethods.java @@ -9,6 +9,7 @@ import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.BasicFileAttributes; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import java.util.regex.Matcher; import net.filebot.util.FileUtilities; @@ -330,4 +331,8 @@ public class ExpressionFormatMethods { return new File(parent, self); } + public static Locale toLocale(String self) { + return Locale.forLanguageTag(self); + } + }