Created attachment 36045 [details] Russian Localisation Hello, I would like to suggest a patch with Russian localization (see attachment). It contains changes for the build system and translation of a few pages. If it's checked in, I am going to provide more translations. I've noted that start page (index.jsp) is not localized - is it expected behavior? What is the correct way to have it localized in my project? To change the language you need to update /tomcat9/bin/catalina.sh file in the following way: add this if [ -z "$LOGGING_MANAGER" ]; then JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Duser.language=ru -Duser.region=RU" else JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER -Duser.language=ru -Duser.region=RU" fi
I have not yet reviewed the patch, but theoretically, Tomcat should really be detecting the user's UI language preference from the browser's Accept-Language header. Is that not currently the case? If so, perhaps that would be a good thing to add to Tomcat's "manager" application.
(In reply to Christopher Schultz from comment #1) > I have not yet reviewed the patch I forgot to say that I like the idea, generally, or more localized versions of applications being available. The only problem is that they are often not kept up-to-date because someone maybe adds a new feature and isn't sure how to translate into X number of languages they don't speak.
Hello Christopher! >I have not yet reviewed the patch, but theoretically, Tomcat should really be detecting the user's UI language preference from the browser's Accept-Language header. Is that not currently the case? Well, in my case tomcat didnt detect my user UI language. Moreover, by surfing the internet, I found that many people had such a problem. And the solution is to write in catalina.bat or catalina.sh(depends on OS) the lines that choose the language. >I forgot to say that I like the idea, generally, or more localized versions of applications being available.The only problem is that they are often not kept up-to-date because someone maybe adds a new feature and isn't sure how to translate into X number of languages they don't speak. My prodject is Tomсat's translation into Russian. I'm going to completely translate it . So I thought, maybe you'll be interested in officially adding Russian localization to the source of the tomcat, along with the already existing German, French. I would like to know whether it's interesting for you to add the support of the Russian language. Adding a Russian localisation will help many Russian users, so i look forward to hearing from you!
The Manager app does localize based on the request. Look for lines like this: StringManager smClient = StringManager.getManager(Constants.Package, request.getLocales()); The index page is not currently localized. Using the JSTL tags (see https://docs.oracle.com/javaee/5/tutorial/doc/bnakw.html for an example) is probably the way to go. If there is a translation missing then the fallback is to use the English version. Additional language support is always interesting. Applying this patch is on my TODO list for the next release. I hope to get to this next week.
Many thanks for the patch. I have applied it to 9.0.x. I'll look at back-ports next. I ran the translations through Google Translate and fixed what looked like a couple of typos. I also fixed a couple of minor whitespace issues CheckStyle was complaining about.
Fixed in: - 9.0.x for 9.0.11 - 8.5.x for 8.5.33 - 7.0.x for 7.0.91 Thanks again for the patch and I look forward to receiving patches for additional translations.
Hello Mark! First of all, thank you very much for adding Russian localisation. For me as a student it's a big honor seeing that my project is not useless. I am going to continue my translation Tomcat in to Russian language. I can open new bugs with additional translation files or I can just add comments here. Which way do you prefer? I would like to say a few words about index page. Are you planning localize it? Can I help you? I am intrested in localizing it so if you have any wishes I will be happy to fulfill them. And one more question. I found that a lot of stuff haven't got localization system(like index page, part of server status info page). I was thinking about making them localized like another part of tomcat( adding LocalString.Properties files, adding setLocale and etc).
(In reply to Ivan Krasnov from comment #7) > For me as a student it's a big honor seeing that my project is not useless. This is how open-source communities work; we are happy to have you participate at ANY level. > I am going to continue my translation Tomcat in to Russian language. I can > open new bugs with additional translation files or I can just add comments > here. Which way do you prefer? If it is a continuation of this same translation effort, I would say you should REOPEN this bug and attach new/additional translations, here. > I would like to say a few words about index page. Are you planning localize > it? Can I help you? I am interested in localizing it so if you have any > wishes I will be happy to fulfill them. Please go ahead and try it yourself. File a new enhancement request with a patch (or PR) for that, as it's separate from localization (technically, it's internationalization, while providing the translated words is the "localization" part). > And one more question. I found that a lot of stuff haven't got localization > system(like index page, part of server status info page). I was thinking > about making them localized like another part of tomcat( adding > LocalString.Properties files, adding setLocale and etc). That would be fine. For i18n, please file new enhancements so they can be addressed separately.