Oleg,
Thank you very much for very detail, helpful answer.
The best wishes and good luck.
Maya
Oleg V Alexeev wrote:
> Hello Maya,
>
> Wednesday, February 14, 2001, 2:56:18 AM, you wrote:
>
> MM> 1/ Is it possible to change a language on-line. For example one user uses English
> MM> language with his browser, then he switchs to French. Can Struts handle this? I
> MM> think, in your document the properties file is loaded in the beginning
> MM> ActionServlet startup.
>
> JVM load all files in properties bundle at once and all this
> resources can be used in run time. Example of switching to another
> locale -
>
> public class ChangeLanguageAction extends Action {
>
> public ActionForward perform(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
> String country = ((ChangeLanguageForm) form).getCountry();
> String language = ((ChangeLanguageForm) form).getLanguage();
> String source = ((ChangeLanguageForm) form).getSource();
> HttpSession session = request.getSession();
> ActionForward forward = null;
>
> setLocale( request, new Locale( language, country ) );
>
> if( source==null )
> forward = (mapping.findForward("success"));
> else {
> forward = new RedirectingActionForward();
> forward.setPath( source );
> }
>
> return forward;
> }
>
> }
>
> MM> 2/ How replace images with a text through properties file? (I think this question
> MM> was posted already).
>
> You can store image file names in properties in use it in <img> tags
> - <img src='<bean:message key="picture.cat.english"/>'>
> <img src='<bean:message key="picture.cat.french"/>'>
>
> May be I not understand your 2/ question... Explane please, if so.
>
> --
> Best regards,
> Oleg mailto:[EMAIL PROTECTED]