Added getResourceBundle func

This commit is contained in:
cyian-1756 2018-05-10 12:42:15 -04:00
parent 19e4a95c96
commit bba39a5337

View File

@ -1,9 +1,6 @@
package com.rarchives.ripme.utils; package com.rarchives.ripme.utils;
import java.io.File; import java.io.*;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
@ -579,4 +576,14 @@ public class Utils {
} }
return domainCookies; return domainCookies;
} }
public static ResourceBundle getResourceBundle() {
try {
ResourceBundle rb = ResourceBundle.getBundle("LabelsBundle", Locale.getDefault());
return rb;
} catch (MissingResourceException e) {
ResourceBundle rb = ResourceBundle.getBundle("LabelsBundle", Locale.ROOT);
return rb;
}
}
} }