You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fr.solution.plugin.design.formula.compat;
|
|
|
|
|
|
|
|
import com.fanruan.api.i18n.I18nKit;
|
|
|
|
import com.fanruan.api.macro.ProductConstants;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author richie
|
|
|
|
* @version 10.0
|
|
|
|
* Created by richie on 2019-03-19
|
|
|
|
*/
|
|
|
|
public class DesignToolkit {
|
|
|
|
|
|
|
|
private final static int version = Integer.parseInt(ProductConstants.MAIN_VERSION);
|
|
|
|
|
|
|
|
public static String getLocText(String key) {
|
|
|
|
if (version < 10) {
|
|
|
|
return I18nKit.getLocText(key);
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
return (String) Class.forName("com.fr.design.i18n.Toolkit").getMethod("i18nText", new Class[]{String.class}).invoke(null, key);
|
|
|
|
} catch (Exception ignore) {
|
|
|
|
|
|
|
|
}
|
|
|
|
return key;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|