设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 565|回复: 2
打印 上一主题 下一主题

[其它] 翻译成英文

[复制链接]
跳转到指定楼层
1#
发表于 2005-3-1 01:31:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我做了个软件,现在我想把它翻译成英文版,请问各位有什么好的方法

我现在做的思路是:把所有的标签等全部放在一个文本文档里面然后写一个函数,在每个页面都调用该函数,很笨的方法,且速度慢,下面是该函数:

Public Sub queryword(frm)

On Error GoTo query_err:

Dim filename As String

Dim str As String

Dim position As Integer

Dim positionx As Integer

Dim positiony As Integer

Dim ctr As Control

Dim stry As String

Dim s As String

Dim myobject As Object

Dim tex As Object

Dim serachline As String

Dim replaced As String

Dim positions As Integer

Dim stry1 As String

Dim strx1 As String

filename = "word1.txt"

'Set myobject = GetObject("d:\报价系统\word.txt")

'myobject.Close

'Close CurrentProject.Path & "\" & filename

'If s <> "" Then

'Close

'MsgBox (0)

'End If

Open CurrentProject.Path & "\" & filename For Input As #1

Line Input #1, s

str = s

For Each ctr In frm.Controls

str = s

Select Case ctr.ControlType

Case acLabel, acCommandButton, acPage



'serachline = Left(ctr.Caption, Len(ctr.Caption) - 1)

serachline = Trim(ctr.Caption)

While Len(str) > 0

'If InStr(str, vbLf) > 0 Then

'If InStr(str, vbLf) > InStr(str, Space(1)) Then

'position = InStr(str, Space(1))

'Else

'position = InStr(str, vbLf)

'End If

'Else

position = InStr(str, Space(1))

'End If

If position > 0 Then

stry = Trim(Left(str, position - 1))

str = Trim(Mid(str, position + 1))

'MsgBox (0)

Else

stry = str

str = ""

End If

positionx = InStr(stry, "(")

If positionx > 0 Then

If InStr(stry, serachline) > 0 And (serachline = Left(stry, positionx - 1)) Then

'If Left(stry, positionx - 1) = serachline Then

positionx = InStr(stry, "(")

positiony = InStr(stry, ")")

replaced = Mid(stry, positionx + 1, positiony - 1)

replaced = Left(replaced, Len(replaced) - 1)

replaced = replace(replaced, "!", " ", 1, , vbTextCompare)

Select Case ctr.ControlType

Case acLabel, acCommandButton, acPage

ctr.Caption = replaced

End Select

End If

End If

Wend

End Select

Next

Close

err_exit:

Exit Sub

query_err:

MsgBox err.Description

Close

Resume err_exit

End Sub



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
 楼主| 发表于 2005-3-1 01:31:00 | 只看该作者
请各位尽快答复我好吗,好急啊,拜托了
3#
发表于 2005-3-1 02:03:00 | 只看该作者
去买access200问吧,里面有很好的解答,,人民邮电出版社的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-9-21 02:47 , Processed in 0.089130 second(s), 26 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表