Translation in nuBuilder 2.7.4.3
Posted: Tue Aug 14, 2012 4:31 am
Hi all, I upgrade to nuBuilder 2.7.4.3 and works fine with translations!
I have only one consideration (a proposal) to do.
Now, the language choice is made according to a value in zzsys_setup table.
In this way, all users have the messages set to that language; but if users have different languages?
Why don't set language in zzsys_user table instead of zzsys_setup? In this way nuBuilder could respond with messages in the user language (obviously, zzsys_translation should contain all languages).
To reduce database queries and improve performance, all the translated strings could be load and store on application start-up.
It would probably be a very special case, but in small countries (like Europe) might even happen!
Don't misunderstand me: I really appreciate your work!!
Only, I changed a few lines of code to allow the translation of the strings below:
- "You do not have access"
- "No Such Report"
- "Report has Expired"
- "You have been logged out"
With the help of my IDE I simple find and replace the original:
and so on for all text strings.
Also, to display the correct translation in subform, I made this change in form.php, line 2351:
Hope this helps.

I have only one consideration (a proposal) to do.
Now, the language choice is made according to a value in zzsys_setup table.
In this way, all users have the messages set to that language; but if users have different languages?
Why don't set language in zzsys_user table instead of zzsys_setup? In this way nuBuilder could respond with messages in the user language (obviously, zzsys_translation should contain all languages).
To reduce database queries and improve performance, all the translated strings could be load and store on application start-up.
It would probably be a very special case, but in small countries (like Europe) might even happen!
Don't misunderstand me: I really appreciate your work!!
Only, I changed a few lines of code to allow the translation of the strings below:
- "You do not have access"
- "No Such Report"
- "Report has Expired"
- "You have been logged out"
With the help of my IDE I simple find and replace the original:
Code: Select all
print 'you have been logged out ..';
with:
print nuTranslate('you have been logged out ..');
Also, to display the correct translation in subform, I made this change in form.php, line 2351:
Code: Select all
from:
$s .= "$TAB <span style='vertical-align:top;font-size:10pt;font-family:tahoma;font-weight:bold;'> Delete </span>$CRLF";
to:
$s .= "$TAB <span style='vertical-align:top;font-size:10pt;font-family:tahoma;font-weight:bold;'>" .nuTranslate('Delete'). "</span>$CRLF";