As a Java Architect/Developer myself, I am not pleased with the way you implemented your localization feature. I would have preferred that a parameter be set that would indicate the locale desired. Then the applet can then read the param value and load the appropriate resource bundle.
For instance, a user might be using a computer that was setup with the en_US locale but the user might want to work in de. With your current system this use case will fail. But if the user can select a desired locale, then the integrating program could take the selected locale and dynamically set the appropriate param values for the applet to use.
I believe if you implement this feature it would make the internationalization feature of your products more usable and less cumbersome.
By the way, how many locales have you created resources for?
Thanks.
Jonathan
Suggestions: InternationalizationRe: Suggestions: InternationalizationJonathan,
What you're asking for is already possible. Just use: <PARAM NAME="resources" VALUE="i18n"> Then, make sure that i18n.properties includes your translated properties. The applet will try to detect i18n_locale.properties but it will fail because of HTTP 404. Then it will load the i18n.properties. You can have have one i18n.properties per language and load the correct one depending on custom locale. If you need a dynamic i18n.properties such as i18n.properties.php then use: <PARAM NAME="resources" VALUE="i18n"> <PARAM NAME="localeresources" VALUE="false"> <PARAM NAME="localeresourcesextension" VALUE=".properties.php"> Does it make sense ? Re: Suggestions: Internationalization>>Does it make sense ?
Not quite. What is this: i18n.properties.php? Please elaborate with a concrete example. You did not answer my previous question. Let me ask the question again: How many locales have you created resources for? In other words, which languages have you created i18n_de.properties etc for? Thanks Re: Suggestions: InternationalizationWe just have the english resources. If you need another language then you have to translate i18n.properties file. If you want a dynamic generated .properties file then you can use PHP on server side, that's why extension could be updated to .properties.php.
Re: Suggestions: InternationalizationI write Java code not PHP.
Do you have a sample PHP code, I can take a look at? I will handle the translation to Java myself. Since you do not have any other language bundles it is then obvious that you have not even tested what you are proposing. To be honest with you I really don't understand what you are proposing as a solution. Why not give a concrete example and eventually any other potential customer that requires such functionality will know what to do. Again, if you think it is not feasible as of the current version of your product, be honest about it and say so. Customer suggestions can always be built into a later version. Thanks. Re: Suggestions: InternationalizationI can provide a full sample. Tell me how you will select your language. Can you build the APPLET tag in a JSP ? Could you pass the wanted language in the JSP session ?
Re: Suggestions: InternationalizationTo make it simple, lets assume that the current language/locale selected by the user is always available in a JavaScript variable:
var selectedLocale = 'de'; You can take it up from there. Thanks so much. I appreciate your efforts. Re: Suggestions: InternationalizationHere is the sample:
The JavaScript includes the following code: Code: Select all
Does it help ? Re: Suggestions: InternationalizationThanks so much. I appreciate your support.
|