NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on May 29, 2017, 10:02:56 AM
-
How to translate "Alert" and "Required" from the alert message?
See image
-
All the validation text passes through the WebServer Translate method.
(WebServer, not WebHandler here).
s_web._SitesQueue.defaults.InsertPromptText = s_web.Translate('Insert')
s_web._SitesQueue.defaults.CopyPromptText = s_web.Translate('Copy')
s_web._SitesQueue.defaults.ChangePromptText = s_web.Translate('Change')
s_web._SitesQueue.defaults.ViewPromptText = s_web.Translate('View')
s_web._SitesQueue.defaults.DeletePromptText = s_web.Translate('Delete')
s_web._SitesQueue.defaults.RequiredText = s_web.Translate('Required')
s_web._SitesQueue.defaults.NumericText = s_web.Translate('A Number')
s_web._SitesQueue.defaults.MoreThanText = s_web.Translate('More than or equal to')
s_web._SitesQueue.defaults.LessThanText = s_web.Translate('Less than or equal to')
s_web._SitesQueue.defaults.NotZeroText = s_web.Translate('Must not be Zero or Blank')
s_web._SitesQueue.defaults.OneOfText = s_web.Translate('Must be one of')
s_web._SitesQueue.defaults.InListText = s_web.Translate('Must be one of')
s_web._SitesQueue.defaults.InFileText = s_web.Translate('Must be in table')
s_web._SitesQueue.defaults.DuplicateText = s_web.Translate('Creates Duplicate Record on')
s_web._SitesQueue.defaults.RestrictText = s_web.Translate('Unable to Delete, Child records exist in table')
'Alert' flows through the WebHandler, Translate method.
cheers
Bruce
-
This is a big problem I think...
1)
From the s_web translate I have no access to the p_web.gsv(...)
I know the user language when the user logs in and I save it in p_web.SSV()
Then How can I Translate to the user language?
2)
I try to use a similar translate code then in WinHandler fixng the lenguage and then the links does not use spanish caracters, see attached image.
Thanks
-
All the "eventual" text flows through the WebHandler Translate method. So simple text like the buttons etc can just be translated as normal.
Some of the text constructs "complex" messages. For example;
'More than or equal to'
'Less than or equal to'
These can be manually assigned in ProcessLink, and therefore will flow through the .Translate method as well.
For example;
In ProcessLink
self.site.MoreThanText = self.Translate(self.site.MoreThanText)
Cheers
Bruce