using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CommonLibrary
{
/*******************************************************************************************
*
* 说明:本地化策略机制,优先完成中文版适配
*
*******************************************************************************************/
///
/// 整个软件系统的本地化策略
///
public static class UserLocalization
{
///
/// 设置系统的语言选项
///
/// 语言名称
public static void SettingLocalization(string language)
{
if(language.ToLower() == "chinese")
{
localization = Chinese;
}
else
{
localization = English;
}
}
///
/// 获取当前指定的语言选项信息
///
///
///
public static ILocalization GetSpecifiedLocalization(string language)
{
if (language.ToLower() == "chinese")
{
return Chinese;
}
else
{
return English;
}
}
///
/// 默认的语言选项
///
public static ILocalization Localization
{
get { return localization; }
}
private static ILocalization Chinese = new ChineseLocalization(); // 中文语言
private static ILocalization English = new EnglishLocalization(); // 英文语言
private static ILocalization localization = Chinese; // 当前语言
}
///
/// 所有支持的语言必须从本接口继承
///
public interface ILocalization
{
string FormateDateTime { get; set; }
///
/// 唯一标识
///
string GeneralUniqueID { get; set;}
///
/// 名称
///
string GeneralName { get; set; }
///
/// 描述
///
string GeneralDescription { get; set; }
///
/// 允许登录列表
///
string GeneralAllowLoginList { get; set; }
#region 复选框
string CheckBoxAllowUserMulti { get; set; }
string CheckBoxAllowFrameLogin { get; set; }
string CheckBoxTrustEnable { get; set; }
#endregion
#region 文件相关
string FileName { get; set; }
string FileSize { get; set; }
string FileUploadTime { get; set; }
string FileDownloading { get; set; }
string FileMy { get; set; }
string FileMyListTitle { get; set; }
#endregion
#region 按钮相关
///
/// 确认
///
string ButtonEnsure { get; set; }
///
/// 新增
///
string ButtonAdd { get; set; }
///
/// 编辑
///
string ButtonEdit { get; set; }
///
/// 删除
///
string ButtonDelete { get; set; }
///
/// 保存
///
string ButtonSave { get; set; }
///
/// 取消
///
string ButtonCancel { get; set; }
///
/// 上传
///
string ButtonUpload { get; set; }
///
/// 下载
///
string ButtonDownload { get; set; }
///
/// 删除选中项
///
string ButtonDeleteSelected { get; set; }
///
/// 获取本机标识
///
string ButtonGetComputerID { get; set; }
///
/// 新增客户端标识
///
string ButtonAddComputerID { get; set; }
#endregion
#region 账户相关
string AccountSelect { get; set; }
string AccountName { get; set; }
string AccountAlias { get; set; }
string AccountPassword { get; set; }
string AccountFactory { get; set; }
string AccountGrade { get; set; }
string AccountRegisterTime { get; set; }
string AccountLoginEnable { get; set; }
string AccountForbidMessage { get; set; }
string AccountLoginFrequency { get; set; }
string AccountLastLoginTime { get; set; }
string AccountLastLoginIpAddress { get; set; }
string AccountLoginFailedCount { get; set; }
string AccountLastLoginWay { get; set; }
string AccountPortrait { get; set; }
string AccountDetails { get; set; }
string AccountRegisterTitle { get; set; }
string AccountRoleAdd { get; set; }
string AccountRoleEdit { get; set; }
string AccountRoleNameList { get; set; } // 角色名称列表
string AccountRoleAccountList { get; set; } // 关联账户列表
#endregion
#region 配置相关
string SettingsText { get; set; }
string SettingsSystem { get; set; }
string SettingsGeneral { get; set; }
string SettingsAccountFactory { get; set; }
string SettingsTrustClient { get; set; }
string SettingsRoleAssign { get; set; }
string SettingsRoleAddTitle { get; set; }
string SettingsRoleEditTitle { get; set; }
#endregion
}
}