Re: Proposal for implementation of lookup of localized web-resources
To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Proposal for implementation of lookup of localized web-resources From: [EMAIL PROTECTED] (Kazuhiro Kazama) X-Dispatcher: imput version 2228(IM140) Arieh, Basically lookup of localized resources is welcomed. As I have evaluated your localization codes to 3.2, I write comments: 1, Your file-based naming scheme isn't compatible with apache MultiView function that David Rees and Takashi Okamoto says. Now apache naming scheme becomes popular in Japan. But almost nobody uses your naming scheme. It is unhappy that we must change all filename that is written by apache naming scheme. At the least, compatible option is needed. I don't think that my intent was to be compatible with Apache. My first goal was to be compatible with Java localization. The context in which I am using Jakarta is as an 'embedded' servlet container inside of a Java application. 2, In your file-based approach docbase-approach, we can't specify charset of HTML files. It is desiable that charset will be supported in consideration of Content-Type header. That is certainly an improvement that can be done. 3, I think your file-based lookup don't work for JSP files by my experience (true?). But I hope you will support same localization for JSP files. I believe it does. Since you appear to be very experienced in areas of localization, it would be very welcome if you proceeded to enhance the work that I started. Thanks for your comments. Arieh Kazuhiro Kazama ([EMAIL PROTECTED]) NTT Network Innovation Laboratories -- Arieh Markel Sun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Pray for snow Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
Re: Proposal for implementation of lookup of localized web-resources
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] From: "Takashi Okamoto" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Proposal for implementation of lookup of localized web-resources X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi!! From: "Arieh Markel" [EMAIL PROTECTED] Assume locale in request is: fr_CA Assume locale of where tomcat is set: en_US requested path docbase/dir/.../index.html file-based: (path/filebasename[locale].filetype) 1. docbase/dir/.../index_fr_CA.html 2. docbase/dir/.../index_fr.html 3. docbase/dir/.../index_en_US.html 4. docbase/dir/.../index_en.html 5. docbase/dir/.../index.html docbase-based: ([locale]/path/filename) 1. docbase/fr_CA/dir/.../index.html 2. docbase/fr/.../index.html 3. docbase/en_US/.../index.html 4. docbase/en/.../index.html 5. docbase/dir/.../index.html Did you read following apache URL? http://httpd.apache.org/docs-2.0/content-negotiation.html I think your proopsal is good. But unfortunately, your proposal will lose compatibility with Apache. I am not aware that we have compatibility with Apache now. From my own perspective implementing exclusively apache localization compatibility is actually 'bad'. Our deliverables are usually not apache dependent/nor based. Out localization experts seek compatibility with Java localization. Please rewrite your proposal. No, I am not going to rewrite my proposal. I explain below how developers interested on the apache scheme can implement it. I 'scratched my own itch' with the proposal that I brought up. My own itch does not include compatibility with Apache, it includes compatibility with localization schemes in the Java world (the ones I looked up are ResourceBundle and JavaHelp). Given that the alternative is to choose from the below: . use the current proposal as the basis, and extend to support all kinds of localization . not have localization at all until someone implements exclusive apache localization tell me which one you prefer. --- As an aside, here is how apache compatibility can be achieved (I will leave the implementation of apache-compatible localization as an exercise to those who have that itch to scratch). . the StaticInterceptor has the 'localization' attribute available. currently, 'file', 'docbase' are the options. Add a 'apache' option to the permissible values. On FileUtil, implement a: getApacheLocalizedResource () method On Context, add to the logic of 'getRealFile()' to handle 'apache' type localization, invoking the method in FileUtil. Such a scheme will allow to add more different localization mechanisms in the future. --- So, what I proposed is the mechanism for introduction for various localization lookup schemes, and to start from the set that I proposed. Thanks for your comments. Arieh -- Arieh Markel Sun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Pray for snow Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
Re: Proposal for implementation of lookup of localized web-resources
- Original Message - From: "Arieh Markel" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, March 16, 2001 3:00 PM Subject: Re: Proposal for implementation of lookup of localized web-resources To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Proposal for implementation of lookup of localized web-resources From: [EMAIL PROTECTED] (Kazuhiro Kazama) X-Dispatcher: imput version 2228(IM140) Arieh, Basically lookup of localized resources is welcomed. As I have evaluated your localization codes to 3.2, I write comments: 1, Your file-based naming scheme isn't compatible with apache MultiView function that David Rees and Takashi Okamoto says. Now apache naming scheme becomes popular in Japan. But almost nobody uses your naming scheme. It is unhappy that we must change all filename that is written by apache naming scheme. At the least, compatible option is needed. I don't think that my intent was to be compatible with Apache. My first goal was to be compatible with Java localization. The context in which I am using Jakarta is as an 'embedded' servlet container inside of a Java application. This is something which I am currently in need of for a project. The only reason I can see support for the Apache model is that the new mod_webapp connector I believe is structured so that static html is served by Apache and the dynamic side by tomcat, under these circumstances it would be better if they were both the same. Having said that, my own preference for my current project is for a DocBase approach. -- Arieh Markel Sun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Pray for snow Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key) Regards, Arshad
Re: Proposal for implementation of lookup of localized web-resources
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] From: "Arshad Mahmood" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Proposal for implementation of lookup of localized web-resources X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N - Original Message - From: "Arieh Markel" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, March 16, 2001 3:00 PM Subject: Re: Proposal for implementation of lookup of localized web-resources To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Proposal for implementation of lookup of localized web-resources From: [EMAIL PROTECTED] (Kazuhiro Kazama) X-Dispatcher: imput version 2228(IM140) Arieh, Basically lookup of localized resources is welcomed. As I have evaluated your localization codes to 3.2, I write comments: 1, Your file-based naming scheme isn't compatible with apache MultiView function that David Rees and Takashi Okamoto says. Now apache naming scheme becomes popular in Japan. But almost nobody uses your naming scheme. It is unhappy that we must change all filename that is written by apache naming scheme. At the least, compatible option is needed. I don't think that my intent was to be compatible with Apache. My first goal was to be compatible with Java localization. The context in which I am using Jakarta is as an 'embedded' servlet container inside of a Java application. This is something which I am currently in need of for a project. The only reason I can see support for the Apache model is that the new mod_webapp connector I believe is structured so that static html is served by Apache and the dynamic side by tomcat, under these circumstances it would be better if they were both the same. Having said that, my own preference for my current project is for a DocBase approach. Arshad, thanks for your comments. The implementation does not enforce any default. Initially, there are three optional lookup schemes: a. no localization (do not set the localization attribute on StaticInterceptor) - this is the default b. docbase localization (set to "docbase") c. file localization (set to "file") As mentioned in a previous post, the mechanisms are in place to add other localization schemes. Arieh PS: as an aside, I believe Apache would benefit with a docbase-like localization scheme. The advantage is to preserve separation of localized content (which makes it easier to manage, especially when developing the content). -- Arieh Markel Sun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Pray for snow Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
Re: Proposal for implementation of lookup of localized web-resources
On Wed, Mar 14, 2001 at 08:19:16AM -0700, Arieh Markel wrote: file-based:(path/filebasename[locale].filetype) 1. docbase/dir/.../index_fr_CA.html 2. docbase/dir/.../index_fr.html 3. docbase/dir/.../index_en_US.html 4. docbase/dir/.../index_en.html 5. docbase/dir/.../index.html Why not use the same setup that Apache uses? If you ever plan on integrating Tomcat/Apache, this will make the transition painless. Apache uses this by default I believe: 1. docbase/dir/.../index.html.fr 2. docbase/dir/.../index.html.en 3. docbase/dir/.../index.html You can read more about it here: http://httpd.apache.org/docs/content-negotiation.html -Dave
RE: Proposal for implementation of lookup of localized web-resources
+1 On Wed, 14 Mar 2001, Arieh Markel wrote: We are about to release a product on which we include Tomcat 3.2. Our testing and localization people have been banging at our product and come up with several remarks about how lookup for a localized resource (file: html, gif, javascript, etc) are being done. I have in the past contributed localization code to the 3.2 code base. I have received a couple of remarks from the localization people. The current way that localization is done on the code I contributed to 3.2 was what I called 'file-based' lookup. An alternative method that I implemented in our application (but have not contributed to Jakarta yet) is 'docbase-based' lookup. Here is a brief overview of both mechanisms: Assume locale in request is: fr_CA Assume locale of where tomcat is set:en_US requested path docbase/dir/.../index.html file-based: (path/filebasename[locale].filetype) 1. docbase/dir/.../index_fr_CA.html 2. docbase/dir/.../index_fr.html 3. docbase/dir/.../index_en_US.html 4. docbase/dir/.../index_en.html 5. docbase/dir/.../index.html docbase-based:([locale]/path/filename) 1. docbase/fr_CA/dir/.../index.html 2. docbase/fr/.../index.html 3. docbase/en_US/.../index.html 4. docbase/en/.../index.html 5. docbase/dir/.../index.html File-based lookup works in a manner similar to how ResourceBundle does. Docbase-based lookup is similar to how JavaHelp organizes the files. Implementation proposal: a. create a class 'org.apache.tomcat.util.Localization' (for 3.x). 'org.apache.catalina.util.Localization' (for 4.x). b. implement two static methods: public static String getLocalizedPathFileBased ( String dir, String path, Locale loc, Locale fbLoc) public static String getLocalizedPathDocBaseBased ( String dir, String path, Locale loc, Locale fbLoc) c. For 3.x: in StaticInterceptor, add "localization" as a property with valid values of: "file" "docbase" d. For 4.x: (I have just begun looking at the code yesterday - would appreciate some pointers from the 4.x experts of where the serving of resource is done) Any opinions ? Much of the code has already been written and has been tested. Arieh -- Arieh MarkelSun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Pray for snow Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
RE: Proposal for implementation of lookup of localized web-resources
It seems like this would be much more logical to manage multi-lingual sites, since each lang would be in it's own dir structure. Of course, it also means that you would have to duplicate anything that is not lang dependent, such as images. (I assume that the doc-based locale would re-direct all requests???) Mike. -- Mike Braden [EMAIL PROTECTED] -Original Message- From: Arieh Markel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 10:19 AM To: [EMAIL PROTECTED] Subject: Proposal for implementation of lookup of localized web-resources We are about to release a product on which we include Tomcat 3.2. Our testing and localization people have been banging at our product and come up with several remarks about how lookup for a localized resource (file: html, gif, javascript, etc) are being done. I have in the past contributed localization code to the 3.2 code base. I have received a couple of remarks from the localization people. The current way that localization is done on the code I contributed to 3.2 was what I called 'file-based' lookup. An alternative method that I implemented in our application (but have not contributed to Jakarta yet) is 'docbase-based' lookup. Here is a brief overview of both mechanisms: Assume locale in request is:fr_CA Assume locale of where tomcat is set: en_US requested path docbase/dir/.../index.html file-based: (path/filebasename[locale].filetype) 1. docbase/dir/.../index_fr_CA.html 2. docbase/dir/.../index_fr.html 3. docbase/dir/.../index_en_US.html 4. docbase/dir/.../index_en.html 5. docbase/dir/.../index.html docbase-based: ([locale]/path/filename) 1. docbase/fr_CA/dir/.../index.html 2. docbase/fr/.../index.html 3. docbase/en_US/.../index.html 4. docbase/en/.../index.html 5. docbase/dir/.../index.html File-based lookup works in a manner similar to how ResourceBundle does. Docbase-based lookup is similar to how JavaHelp organizes the files. Implementation proposal: a. create a class 'org.apache.tomcat.util.Localization' (for 3.x). 'org.apache.catalina.util.Localization' (for 4.x). b. implement two static methods: public static String getLocalizedPathFileBased ( String dir, String path, Locale loc, Locale fbLoc) public static String getLocalizedPathDocBaseBased ( String dir, String path, Locale loc, Locale fbLoc) c. For 3.x: in StaticInterceptor, add "localization" as a property with valid values of: "file" "docbase" d. For 4.x: (I have just begun looking at the code yesterday - would appreciate some pointers from the 4.x experts of where the serving of resource is done) Any opinions ? Much of the code has already been written and has been tested. Arieh -- Arieh Markel Sun Microsystems Inc. Network Storage500 Eldorado Blvd. MS UBRM11-194 e-mail: [EMAIL PROTECTED] Broomfield, CO 80021 Pray for snow Phone: (303) 272-8547 x78547 (e-mail me with subject SEND PUBLIC KEY to get public key)
Re: Proposal for implementation of lookup of localized web-resources
Mike Braden wrote: Of course, it also means that you would have to duplicate anything that is not lang dependent, such as images. I typically use symbolic links to work around duplication. -- Best regards, Ansgar W. Konermann eMail: [EMAIL PROTECTED] --- Hello, I am a message footer. ---
Re: Proposal for implementation of lookup of localized web-resources
Hi!! From: "Arieh Markel" [EMAIL PROTECTED] Assume locale in request is: fr_CA Assume locale of where tomcat is set: en_US requested path docbase/dir/.../index.html file-based: (path/filebasename[locale].filetype) 1. docbase/dir/.../index_fr_CA.html 2. docbase/dir/.../index_fr.html 3. docbase/dir/.../index_en_US.html 4. docbase/dir/.../index_en.html 5. docbase/dir/.../index.html docbase-based: ([locale]/path/filename) 1. docbase/fr_CA/dir/.../index.html 2. docbase/fr/.../index.html 3. docbase/en_US/.../index.html 4. docbase/en/.../index.html 5. docbase/dir/.../index.html Did you read following apache URL? http://httpd.apache.org/docs-2.0/content-negotiation.html I think your proopsal is good. But unfortunately, your proposal will lose compatibility with Apache. Please rewrite your proposal. regards. -- Takashi Okamto