mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 09:25:35 +00:00
More documentation.
This commit is contained in:
@@ -19,17 +19,31 @@ package com.jpexs.decompiler.flash;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
* Application resources
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class AppResources {
|
||||
|
||||
/**
|
||||
* Resource bundle
|
||||
*/
|
||||
private static final ResourceBundle resourceBundle = ResourceBundle.getBundle("com.jpexs.decompiler.flash.locales.AppResources");
|
||||
|
||||
/**
|
||||
* Translates a key
|
||||
* @param key The key
|
||||
* @return The translated key
|
||||
*/
|
||||
public static String translate(String key) {
|
||||
return resourceBundle.getString(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates a key from a bundle
|
||||
* @param bundle The bundle
|
||||
* @param key The key
|
||||
* @return The translated key
|
||||
*/
|
||||
public static String translate(String bundle, String key) {
|
||||
ResourceBundle b = ResourceBundle.getBundle(bundle);
|
||||
return b.getString(key);
|
||||
|
||||
Reference in New Issue
Block a user