Im presently engaged on a platform that has multi-language choices and likewise the language is outlined by IP. So Im attempting to construct an structure for testing each eventualities dynamically… The area is at all times the identical: Instance: www.web page.com (In case you are logged in from Britain the net utility is loaded in English, if you’re visiting the web page from France the web page is loaded in French.)
I’ve an concept to make totally different summary courses with error messages for instance:
public class ErrorMessagesEN {
public static last String MANDATORY_FIELD = "This area is obligatory...";
public static last String SOME_OTHER_ERROR_MSG = "Some error message on english"
// and many others.....
}
public class ErrorMessagesFR {
public static last String MANDATORY_FIELD = "Error message in French"
public static last String SOME_OTHER_ERROR_MSG = "Some error message on
French"
// and many others.....
}
Within the take a look at technique i present parameter “EN” or “FR” for instance:
homepage.signIn(String location)
So is there any choice to make for instance:
if (location=="EN") {
// load the ErrorMessageEN
// and many others......
}
The keys for the Strings are the identical however the courses are totally different, so how can I present totally different imports of the courses by the placement parameter for instance? Or are there any higher approaches for this case? Any hyperlinks or concepts?
Thanks!
PS. In case you want extra data to assist me please ask! š