Localization
The library provides two built-in locales:
- English
- Chinese
You can also apply a custom locale.
Default locale
The English locale is applied by default:
const en = {
//calendar
calendar: {
monthFull: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
monthShort: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
dayFull: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
],
dayShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
hours: "Hours",
minutes: "Minutes",
done: "Done",
clear: "Clear",
today: "Today",
am: ["am", "AM"],
pm: ["pm", "PM"],
weekStart: 7,
clockFormat: 24,
},
//core
core: {
ok:"OK",
cancel:"Cancel",
select: "Select",
"No data": "No data"
},
//formats
formats: {
dateFormat: "%d.%m.%Y",
timeFormat: "%H:%i"
},
lang: "en-US",
// FM
filemanager: {
"My files": "My files",
"Add New": "Add New",
Ok: "Ok",
Cancel: "Cancel",
"Delete files": "Delete Files",
Files: "Files",
Folder: "Folder",
"Back to parent folder": "Back to parent folder",
Information: "Information",
Found: "Found",
"Are you sure you want to delete these items:": "Are you sure you want to delete these items:",
"Enter file name": "Enter file name",
"Enter folder name": "Enter folder name",
Result: "Result",
Search: "Search",
"Search results in": "Search results in",
"Add new file": "Add new file",
"Add new folder": "Add new folder",
"Upload file": "Upload file",
Size: "Size",
Name: "Name",
Type: "Type",
Date: "Date",
Rename: "Rename",
Cut: "Cut",
Delete: "Delete",
Copy: "Copy",
Paste: "Paste",
Download: "Download",
Count: "Count",
folder: "folder",
folders: "folders",
file: "file",
files: "files",
"Multiple files": "Multiple files",
multiple: "multiple",
Preview: "Preview",
of: "of",
used: "used",
"Select file or folder to view details": "Select file or folder to view details",
"Looks like nothing is here": "Looks like nothing is here",
"Unknown file": "Unknown file",
"A miniature file preview": "A miniature file preview",
},
};
cn locale
const cn = {
// calendar
calendar: {
monthFull: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
monthShort: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
dayFull: [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
],
dayShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
hours: "小时",
minutes: "分钟",
done: "完成",
clear: "清除",
today: "今天",
am: ["", ""],
pm: ["", ""],
weekStart: 7,
clockFormat: 24,
},
//core
core: {
ok: "确定",
cancel: "取消",
select: "选择",
"No data": "没有数据"
},
// formats
formats: {
timeFormat: "%H:%i",
dateFormat: "%Y-%m-%d",
},
lang: "zh-CN",
// FM
filemanager: {
"My files": "我的文件",
"Add New": "添新",
Ok: "好的",
Cancel: "取消",
"Delete files": "删除文件",
Files: "文件",
Folder: "文件夹",
"Back to parent folder": "返回父文件夹",
Information: "信息",
Found: "成立",
"Are you sure you want to delete these items:": "您确定要删除此项目吗:",
"Enter file name": "輸入檔名",
"Enter folder name": "輸入資料夾名稱",
Result: "结果",
Search: "搜索",
"Search results in": "搜尋結果位於",
"Add new file": "添加新文件",
"Add new folder": "添加新文件夹",
"Upload file": "上传文件",
Size: "尺寸",
Name: "姓名",
Type: "类型",
Date: "