http://www.cnblogs.com/ManchesterUnitedFootballClub/p/4212078.html 设计器不会汉化,只有运行时会汉化 刚才特意试了下,因为我的汉化版本是14.2的,所以其他版本是无法汉化的 fu1577 发表于 2015-7-4 12:11
沒成功 , 但謝謝你的好意 , 再次多謝 .
因为只有14.1的环境,所以刚刚做了个14.1的案例,是可以汉化的。案例源码:
http://download.csdn.net/detail/kehaigang29/8867937
有时间我再试试15.1.3的版本,希望能帮到你。 不错............... 本帖最后由 矿工码农g 于 2015-7-5 21:58 编辑
fu1577 发表于 2015-7-4 11:37
首先謝謝你的幫助
1 : 程序入口加代碼 , 已照足做 .
2 : 漢化包放入運行目錄下, 已照足做 . (我甚至試過, ...用资源包里面的批处理注册dll,以繁体中文为例,
在资源包根目录开一个管理员权限命令行窗口,运行 gacinstall zh-Hant
请注册繁体中文zh-Hant资源dll必须在子目录zh-Hant里面
如果注册成功,不需要自己拷贝资源dll到程序目录,vs会自动拷贝
在主程序的Program.cs的主入口点加入本地化代码:
namespace WindowsFormsApplication1
{
static class Program
{
static void Main()
{
// The following line provides localization for the application's user interface.
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-Hant");
// The following line provides localization for data formats.
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-Hant");
......
Application.Run(new Form1());
如果不行,请参考
https://documentation.devexpress ... Document5755/Obtain
https://documentation.devexpress ... /CustomDocument2405 本帖最后由 矿工码农g 于 2015-7-6 00:22 编辑
我发现较新版本从资源翻译网页下载的资源包里面已经没有gacinstall.cmd批处理文件了,
贴一下我用的gacinstall.cmd内容:
@echo off
if "%1"=="/?" goto help:
if "%1"=="" goto help:
goto start:
:help
@echo on
@echo Installs/unistalls localized satellite assemblies into/from the GAC
@echo.
@echo GACINSTALL
@echo.
@echo /u Unistall localized assemblies
@echo culture Culture name of a satellite asembly to install/unistall
@echo.
@echo Usage:
@echo.
@echo GACINSTALL he-IL
@echo Installs the hebrew satellite assemblies from the current folder's 'he-IL' subfolder
@echo.
@echo GACINSTALL /u he-IL
@echo Uninstalls the hebrew satellite assemblies
@echo.
@echo GACINSTALL /u
@echo Uninstalls all the installed satellite assemblies
@echo.
@echo off
goto quit
:start
REM .net 2/3.5: set GACUtil="%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe"
REM .net 4.0: set GACUtil="%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe"
set GACUtil="%ProgramFiles(x86)%\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe"
if not exist %GACUtil% (
echo could not find gacutil.exe
goto quit
)
if "%1"=="/u" goto unistall:
set CultureDir=
set DirKey=
if not "%1"=="" set CultureDir=%1"\\"
if not "%CultureDir%"=="" set DirKey=/S
@echo on
FOR /F "usebackq delims==" %%i IN (`dir /B %DirKey% %CultureDir%*.dll`) DO %GACUtil% /i "%%i"
@echo off
goto quit
:unistall
set CultureDir=
set CultureOptions=
if not "%2"=="" set CultureDir=%2"\\"
if not "%2"=="" set CultureOptions=,Culture=%2
echo CultureOptions=%CultureOptions%
FOR /F "usebackq delims==" %%i IN (`dir /B /S %CultureDir%*.dll`) DO %GACUtil% /u %%~ni%CultureOptions%
:quit
页:
[1]