简体   繁体   中英

Where does the translation came from? Java servlet, tomcat and Ext-Js Sencha application

I got a Freelancer work and now I am with some problems with the application. I was going to translate it to portuguese using jQuery and the unique ids of the elements. However I have some doubts about it. I had no idea about the ExtJs and I read about it, then some questions came up:

  • Is the translation saved on a database?
  • Each field of the menu is saved on a database?
  • I realized that due the dinamic content loading the ids can be different everytime that day are loaded, is that true?

I know that the best way to translate it is not the one I've proposed. I thought about it before I see the code because I was thinking that it was a normal website. I already added the option of the Portuguese language on the login screen. However it sends the "pt" parameter and doesn't loads anything. It goes back to the default "en". The language parameter is send to a file Home.java where the doGet function is called. I couldn't find any file with the translation of it. Anyone can help me? I don't know how to do it (Load the menu in Portuguese). Thank you.

the website is: http://brazil.chatlibs.com:81/bulkmessaging/

I don't think there's an easy way out for this. I did some translations for an ExtJS app and all I had was a JS class file with all the strings for both languages.

Then at application startup I'd call something like customStringsClass.setLocale('en') . This method would set customStringsClass.Labels , for example, to an object containing all the strings for the english language.

Then in controllers and views, I'd use customStringsClass.Labels.FirstNameField_Label

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM