Created
December 19, 2014 01:28
-
-
Save dulichan/ef99784e5a6e5332e5c1 to your computer and use it in GitHub Desktop.
Proposal idea for a localization manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The objective of this class is to manage localization options in CDM. | |
2 types Use cases:- | |
1) Localize the product based on a configuration | |
2) Localize components based on user preference. | |
Use case 2:- Localize the license file | |
*/ | |
public class LocalizationManagerUtil { | |
private static final Log log = LogFactory.getLog(LocalizationManagerUtil.class); | |
private static Locale globalLocale = new Locale.Builder().setLanguage("en").setRegion("US").build(); | |
/* | |
Get the localized file from the registry based on the fileName and locale. If locale is not passed | |
global locale will be used | |
*/ | |
public static void getLocalizedFile(String fileName, Locale locale){ | |
} | |
/* | |
Get the localized string based on a namespace (a product name?) , key and locale. If locale is not passed | |
global locale will be used | |
*/ | |
public static void getLocalizedString(String namespace, String key, Locale locale){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment