以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 为什么狐表的菜单可以翻译成功我自已做的翻译不成功呢? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=25442) |
||||
-- 作者:dm168 -- 发布时间:2012/11/9 13:43:00 -- 为什么狐表的菜单可以翻译成功我自已做的翻译不成功呢? 英文 Dim dr As DataRow If e.Form.Controls("English_2").Checked = True For Each tb As Table In Tables \'表 For Each cl As col In tb.cols dr = DataTables("Language").find("[Chinese] = \'" & cl.Caption & "\'") If dr IsNot Nothing cl.Caption = dr("English") End If Next tb.BuildHeader() Next For Each frm As Winform.Form In Forms \'窗口 dr = DataTables("Language").find("[Chinese] = \'" & frm.text & "\'") If dr IsNot Nothing frm.text = dr("English") End If Next For Each rt As RibbonMenu.Tab In RibbonTabs \'菜单工能区 dr = DataTables("Language").find("[Chinese] = \'" & rt.text & "\'") If dr IsNot Nothing rt.text = dr("English") End If For Each gp As RibbonMenu.Group In RibbonTabs(rt.name).Groups \'菜单功能组 dr = DataTables("Language").find("[Chinese] = \'" & gp.text & "\'") If dr IsNot Nothing gp.text = dr("English") End If For Each itm As RibbonMenu.RibbonItem In RibbonTabs(rt.name).Groups(gp.name).Items \'菜单项目 Dim itms As String = RibbonTabs(rt.name).Groups(gp.name).Items(itm.name).text dr = DataTables("Language").find("[Chinese] = \'" & itms & "\'") If dr IsNot Nothing RibbonTabs(rt.name).Groups(gp.name).Items(itm.name).text = dr("English") End If Next Next Next SaveConfigValue("LangC", "English") End If Functions.Execute("Form_Translation") |
||||
-- 作者:lin_hailun -- 发布时间:2012/11/9 14:27:00 -- 楼主,有木有例子? |
||||
-- 作者:dm168 -- 发布时间:2012/11/9 15:05:00 -- 我发现是快速访问栏,快捷菜单,程式菜单和配置栏不能译,这几个要怎么做呢?
[此贴子已经被作者于2012-11-9 15:12:59编辑过]
|
||||
-- 作者:lin_hailun -- 发布时间:2012/11/9 15:41:00 -- For Each q As object In QAT.Items q.text = "111" Next For Each c As object In ConfigBar.Items c.text = 222 Next 看一下帮助的 菜单设计->组件参考 |
||||
-- 作者:dm168 -- 发布时间:2012/11/9 16:43:00 -- ApplicationMenu 程式菜单无法实现吗? |
||||
-- 作者:dm168 -- 发布时间:2012/11/9 17:14:00 -- 我这样写总是出错好像是语法有问题又不知是什么地方出错 Dim dr As DataRow If e.Form.Controls("English_1").Checked = True For Each tb As Table In Tables For Each cl As col In tb.cols dr = DataTables("表B").find("[cn] = \'" & cl.caption & "\'") If dr IsNot Nothing cl.Caption = dr("en") End If Next tb.BuildHeader() Next For Each rt As RibbonMenu.Tab In RibbonTabs \'菜单工能区 dr = DataTables("表B").find("[cn] = \'" & rt.text & "\'") If dr IsNot Nothing rt.text = dr("en") End If For Each gp As RibbonMenu.Group In RibbonTabs(rt.name).Groups \'菜单功能组 dr = DataTables("表B").find("[cn] = \'" & gp.text & "\'") If dr IsNot Nothing gp.text = dr("en") End If For Each itm As RibbonMenu.RibbonItem In RibbonTabs(rt.name).Groups(gp.name).Items \'菜单项目 Dim itms As String = RibbonTabs(rt.name).Groups(gp.name).Items(itm.name).text dr = DataTables("表B").find("[cn] = \'" & itms & "\'") If dr IsNot Nothing RibbonTabs(rt.name).Groups(gp.name).Items(itm.name).text = dr("en") End If Next Next Next For Each q As object In QAT.Items dr = DataTables("表B").find("[cn] = \'" & q.text & "\'") q.text = dr("en") Next For Each c As object In ConfigBar.Items dr = DataTables("表B").find("[cn] = \'" & c.text & "\'") c.text = dr("en") Next SaveConfigValue("语言类别", "cn") End If Functions.Execute("窗口翻译") [此贴子已经被作者于2012-11-9 17:16:37编辑过]
|
||||
-- 作者:dm168 -- 发布时间:2012/11/9 17:36:00 -- 解决了,少了 if isnot nothing 但是程式菜单还是无法实现不知要怎么做? |
||||
-- 作者:lin_hailun -- 发布时间:2012/11/9 17:41:00 -- 同样可以,楼主你试试便知。 |
||||
-- 作者:dm168 -- 发布时间:2012/11/10 12:23:00 -- 这是导航栏在翻译句语句不成功,请问是什么地方不对啊? Dim dr As DataRow For Each c As Winform.Control In Forms(Vars("Fname")).Controls If Typeof c Is WinForm.NavBar Then Dim bar As WinForm.NavBar = Forms(Vars("Fname")).Controls(c.name) For Each pg As WinForm.NavPage In bar.NavPages dr = DataTables("Language").find("[English] = \'" & pg.ButtonText & "\'") If dr IsNot Nothing pg.ButtonText = dr(getConfigValue("LangC", "Chinese")) End If Next End Ifnext [此贴子已经被作者于2012-11-10 12:24:21编辑过]
|
||||
-- 作者:lin_hailun -- 发布时间:2012/11/10 13:21:00 -- 代码看着没错,你msgbox()看一下循环是否进去,还有就是一些变量的值,是否是你预期的值。 |