- // 語言範本函數庫
- (function() {
- 'use strict';
-
- window.languageTemplates = function(lang) {
- if (lang.startsWith('zh-CN')) {
- return {
- templates: {
- "模版 1": "这是模版1的内容。",
- "模版 2": "这是模版2的内容。",
- "模版 3": "这是模版3的内容。",
- "模版 4": "这是模版4的内容。",
- "模版 5": "这是模版5的内容。"
- },
- alerts: {
- saveSuccess: "模版已保存!",
- deleteConfirm: "确定要删除选中的模版吗?",
- deleteSuccess: "模版已删除!",
- editorNotFound: "未找到具体的编辑器区域元素",
- iframeNotFound: "未找到 iframe 元素",
- enterTemplateName: "请输入模版名称!"
- },
- buttons: {
- save: "保存模版",
- delete: "删除模版"
- }
- };
- } else if (lang.startsWith('zh')) {
- return {
- templates: {
- "範本 1": "這是範本1的內容。",
- "範本 2": "這是範本2的內容。",
- "範本 3": "這是範本3的內容。",
- "範本 4": "這是範本4的內容。",
- "範本 5": "這是範本5的內容。"
- },
- alerts: {
- saveSuccess: "範本已保存!",
- deleteConfirm: "確定要刪除選中的範本嗎?",
- deleteSuccess: "範本已刪除!",
- editorNotFound: "未找到具體的編輯器區域元素",
- iframeNotFound: "未找到 iframe 元素",
- enterTemplateName: "請輸入範本名稱!"
- },
- buttons: {
- save: "保存範本",
- delete: "刪除範本"
- }
- };
- } else if (lang.startsWith('en')) {
- return {
- templates: {
- "Template 1": "This is the content of Template 1.",
- "Template 2": "This is the content of Template 2.",
- "Template 3": "This is the content of Template 3.",
- "Template 4": "This is the content of Template 4.",
- "Template 5": "This is the content of Template 5."
- },
- alerts: {
- saveSuccess: "Template saved!",
- deleteConfirm: "Are you sure you want to delete the selected template?",
- deleteSuccess: "Template deleted!",
- editorNotFound: "Editor area element not found",
- iframeNotFound: "Iframe element not found",
- enterTemplateName: "Please enter a template name!"
- },
- buttons: {
- save: "Save Template",
- delete: "Delete Template"
- }
- };
- } else if (lang.startsWith('ja')) {
- return {
- templates: {
- "テンプレート 1": "これはテンプレート1の内容です。",
- "テンプレート 2": "これはテンプレート2の内容です。",
- "テンプレート 3": "これはテンプレート3の内容です。",
- "テンプレート 4": "これはテンプレート4の内容です。",
- "テンプレート 5": "これはテンプレート5の内容です。"
- },
- alerts: {
- saveSuccess: "テンプレートが保存されました!",
- deleteConfirm: "選択したテンプレートを削除しますか?",
- deleteSuccess: "テンプレートが削除されました!",
- editorNotFound: "エディターエリアが見つかりません",
- iframeNotFound: "iframeが見つかりません",
- enterTemplateName: "テンプレート名を入力してください!"
- },
- buttons: {
- save: "テンプレートを保存",
- delete: "テンプレートを削除"
- }
- };
- } else {
- return {
- templates: {
- "Template 1": "This is the content of Template 1.",
- "Template 2": "This is the content of Template 2.",
- "Template 3": "This is the content of Template 3.",
- "Template 4": "This is the content of Template 4.",
- "Template 5": "This is the content of Template 5."
- },
- alerts: {
- saveSuccess: "Template saved!",
- deleteConfirm: "Are you sure you want to delete the selected template?",
- deleteSuccess: "Template deleted!",
- editorNotFound: "Editor area element not found",
- iframeNotFound: "Iframe element not found",
- enterTemplateName: "Please enter a template name!"
- },
- buttons: {
- save: "Save Template",
- delete: "Delete Template"
- }
- };
- }
- };
- })();