AlphaControls的汉化

来源:互联网 发布:大学生网络信贷案例 编辑:程序博客网 时间:2024/06/05 04:23

今天使用AlphaControls自带的组件sDirectoryEdit,发现选择目录的对话框里面的按钮都是英文的“Create”、“OK”、“Cancle”,根据DevExpress的经验尝试找到一个汉化文件,解决此问题。


方法一:

1、在的安装包找到Res文件夹

例如:E:\Embarcadero\RAD Studio\12.0\Components\AlphaControls\acnt_regdelphixe5\Res


2、找到对应的简体中文语言包文件夹:SimplifiedChinese

打开简体中文包,找到sStrings.res


3、把资源文件(复制到)加入工程Project1所在的文件夹根目录下,然后编辑Project1.dpr,可以记事本打开也可以在DELPHI打开,加入一行代码即可,下面红色粗体部分


program Project1;

uses
  Vcl.Forms,
  UnitLogin in 'UnitLogin.pas' {FormLogin},

{$R *.res}

{$R sStrings.res}


begin
  Application.Initialize;
//  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TFormLogin, FormLogin);
  Application.Run;
end.

方法二:

1、在的安装包找到Res文件夹

例如:E:\Embarcadero\RAD Studio\12.0\Components\AlphaControls\acnt_regdelphixe5\Res


2、找到对应的简体中文语言包文件夹:SimplifiedChinese

打开简体中文包,找到sStrings.res


3、覆盖E:\Embarcadero\RAD Studio\12.0\Components\AlphaControls\acnt_regdelphixe5\DelphiXE5\sStrings.res


附翻译内容:

#include "..\sstrings.pas"LANGUAGE LANG_ENGLISH,0STRINGTABLE{  s_MsgDlgOK, "确定"  s_MsgDlgCancel, "取消"  s_MsgDlgHelp, "帮助(&H)"  s_RestoreStr, "恢复"  s_MoveStr, "移动"  s_SizeStr, "大小"  s_MinimizeStr, "最小化"  s_MaximizeStr, "最大化"  s_CloseStr, "关闭"  s_FileOpen, "打开文件"  s_Calculator, "计算器"  s_AvailSkins, "皮肤"  s_InternalSkin, "(内建皮肤)"  s_ErrorSettingCount, "错误设置 %s.Count"  s_ListBoxMustBeVirtual, "列表(%s)的风格必须为虚拟才可以设置Count"  // Color dialog  s_ColorDlgAdd, "增加到定制颜色集"  s_ColorDlgDefine, "定义颜色"  s_ColorDlgMainPal, "主调色板:"  s_ColorDlgAddPal, "其它颜色:"  s_ColorDlgTitle, "颜色"  s_ColorDlgRed, "红 :"  s_ColorDlgGreen, "绿 :"  s_ColorDlgBlue, "蓝 :"  s_ColorDlgDecimal, "十进制 - "  s_ColorDlgHex, "十六进制 - "      // Frame adapter  s_FrameAdapterError1, "TsFrameAdapter 适配器必须放置在目标框架(frame)中";  // Hint designer  s_HintDsgnTitle, "提示设计表"  s_HintDsgnPreserved, "保留设置 :"  s_HintDsgnStyle, "风格 :"  s_HintDsgnBevelWidth, "斜边宽度"  s_Blur, "模糊"  s_HintDsgnArrowLength, "箭头长度"  s_HintDsgnHorizMargin, "水平边缘空白"  s_HintDsgnVertMargin, "垂直边缘空白"  s_HintDsgnRadius, "对角半径"  s_HintDsgnMaxWidth, "最大宽度"  s_HintDsgnPauseHide, "暂停隐藏(ms)"  s_Percent, "百分比"  s_HintDsgnOffset, "位移"  s_HintDsgnTransparency, "透明度"  s_HintDsgnNoPicture, "没有可用图片"  s_Font, "字体"  s_Texture, "纹理"  s_HintDsgnLoad, "加载文件"  s_HintDsgnSave, "保存文件为..."  s_HintDsgnColor, "颜色"  s_HintDsgnBorderTop, "顶边"  s_HintDsgnBorderBottom, "底边"  s_Shadow, "阴影"  s_Background, "背景"  s_Gradient, "渐变"  s_PreviewHint, "提示窗预览"  // File dialogs  s_SelectDir, "选择目录"  s_Create, "新建"}



0 0
原创粉丝点击