Hades
4 years ago
8 changed files with 159 additions and 15 deletions
@ -0,0 +1,38 @@
|
||||
package com.fr.design.locale.impl; |
||||
|
||||
import com.fr.general.CloudCenter; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.general.locale.LocaleMark; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Locale; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/1/29 |
||||
*/ |
||||
public class BbsRegisterMark implements LocaleMark<String> { |
||||
|
||||
private final Map<Locale, String> map = new HashMap<>(); |
||||
private static final String BBS_REGISTER_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.register"); |
||||
private static final String BBS_REGISTER_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.register"); |
||||
private static final String BBS_REGISTER_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US"); |
||||
private static final String BBS_REGISTER_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US"); |
||||
private static final String BBS_REGISTER_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US"); |
||||
|
||||
public BbsRegisterMark() { |
||||
map.put(Locale.CHINA, BBS_REGISTER_CN); |
||||
map.put(Locale.KOREA, BBS_REGISTER_KR); |
||||
map.put(Locale.JAPAN, BBS_REGISTER_JP); |
||||
map.put(Locale.US, BBS_REGISTER_EN); |
||||
map.put(Locale.TAIWAN, BBS_REGISTER_TW); |
||||
} |
||||
|
||||
@Override |
||||
public String getValue() { |
||||
String result = map.get(GeneralContext.getLocale()); |
||||
return result == null ? BBS_REGISTER_EN : result; |
||||
} |
||||
} |
@ -0,0 +1,38 @@
|
||||
package com.fr.design.locale.impl; |
||||
|
||||
import com.fr.general.CloudCenter; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.general.locale.LocaleMark; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Locale; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/1/29 |
||||
*/ |
||||
public class BbsResetMark implements LocaleMark<String> { |
||||
|
||||
private final Map<Locale, String> map = new HashMap<>(); |
||||
private static final String BBS_RESET_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.reset"); |
||||
private static final String BBS_RESET_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.reset"); |
||||
private static final String BBS_RESET_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US"); |
||||
private static final String BBS_RESET_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US"); |
||||
private static final String BBS_RESET_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US"); |
||||
|
||||
public BbsResetMark() { |
||||
map.put(Locale.CHINA, BBS_RESET_CN); |
||||
map.put(Locale.KOREA, BBS_RESET_KR); |
||||
map.put(Locale.JAPAN, BBS_RESET_JP); |
||||
map.put(Locale.US, BBS_RESET_EN); |
||||
map.put(Locale.TAIWAN, BBS_RESET_TW); |
||||
} |
||||
|
||||
@Override |
||||
public String getValue() { |
||||
String result = map.get(GeneralContext.getLocale()); |
||||
return result == null ? BBS_RESET_EN : result; |
||||
} |
||||
} |
@ -0,0 +1,39 @@
|
||||
package com.fr.design.locale.impl; |
||||
|
||||
import com.fr.general.CloudCenter; |
||||
import com.fr.general.GeneralContext; |
||||
import com.fr.general.locale.LocaleMark; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Locale; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2021/1/29 |
||||
*/ |
||||
public class BbsSpaceMark implements LocaleMark<String> { |
||||
|
||||
private final Map<Locale, String> map = new HashMap<>(); |
||||
private static final String BBS_SPACE_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.default"); |
||||
private static final String BBS_SPACE_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.default"); |
||||
private static final String BBS_SPACE_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.default.en_US"); |
||||
private static final String BBS_SPACE_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.default.en_US"); |
||||
private static final String BBS_SPACE_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.default.en_US"); |
||||
|
||||
public BbsSpaceMark() { |
||||
map.put(Locale.CHINA, BBS_SPACE_CN); |
||||
map.put(Locale.KOREA, BBS_SPACE_KR); |
||||
map.put(Locale.JAPAN, BBS_SPACE_JP); |
||||
map.put(Locale.US, BBS_SPACE_EN); |
||||
map.put(Locale.TAIWAN, BBS_SPACE_TW); |
||||
} |
||||
|
||||
@Override |
||||
public String getValue() { |
||||
String result = map.get(GeneralContext.getLocale()); |
||||
return result == null ? BBS_SPACE_EN : result; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue