[原创][开源] SunnyUI.Net 国际化
2021-02-17 04:19
标签:git data cond 配置 nbsp grid inpu alt uil SunnyUI控件内部默认使用中文,若希望使用其他语言,则需要进行多语言设置。 常用的按钮、标题、提示等文字已经设置为静态字符串变量,存于ULocalize.cs文件中。 可以重写UILocalize类静态变量值来改变语言。 [原创][开源] SunnyUI.Net 国际化 标签:git data cond 配置 nbsp grid inpu alt uil 原文地址:https://www.cnblogs.com/yhuse/p/12961718.htmlSunnyUI.Net, 基于 C# .Net WinForm 开源控件库、工具类库、扩展类库、多页面开发框架
国际化
public static class UILocalize
{
public static string InfoTitle = "提示";
public static string SuccessTitle = "正确";
public static string WarningTitle = "警告";
public static string ErrorTitle = "错误";
public static string AskTitle = "提示";
public static string InputTitle = "输入";
public static string CloseAll = "全部关闭";
public static string OK = "确定";
public static string Cancel = "取消";
public static string GridNoData = "[ 无数据 ]";
public static string GridDataLoading = "数据加载中 ......";
public static string GridDataSourceException = "数据源必须为DataTable或者List";
}
public static class UILocalizeHelper
{
public static void SetEN()
{
UILocalize.InfoTitle = "Info";
UILocalize.SuccessTitle = "Success";
UILocalize.WarningTitle = "Warning";
UILocalize.ErrorTitle = "Error";
UILocalize.AskTitle = "Query";
UILocalize.InputTitle = "Input";
UILocalize.CloseAll = "Close all";
UILocalize.OK = "OK";
UILocalize.Cancel = "Cancel";
UILocalize.GridNoData = "[ No data ]";
UILocalize.GridDataLoading = "Data loading ......";
UILocalize.GridDataSourceException = "The data source must be DataTable or List";
}
public static void SetCH()
{
UILocalize.InfoTitle = "提示";
UILocalize.SuccessTitle = "正确";
UILocalize.WarningTitle = "警告";
UILocalize.ErrorTitle = "错误";
UILocalize.AskTitle = "提示";
UILocalize.InputTitle = "输入";
UILocalize.CloseAll = "全部关闭";
UILocalize.OK = "确定";
UILocalize.Cancel = "取消";
UILocalize.GridNoData = "[ 无数据 ]";
UILocalize.GridDataLoading = "数据加载中 ......";
UILocalize.GridDataSourceException = "数据源必须为DataTable或者List";
}
}
原创文章,转载请保留链接 Sunny‘s blog
上一篇:002_x号Css实现及弹性布局
文章标题:[原创][开源] SunnyUI.Net 国际化
文章链接:http://soscw.com/index.php/essay/56410.html