Exemplo n.º 1
0
        void EnableLocalization()
        {
            var language = ProjectSettings.Get.Language.Value.ToString();

            if (!string.IsNullOrEmpty(language) && language != "English" && language != "New")
            {
                EditorLocalization.Init(language, true);
            }

            var strings = kryptonRibbon.RibbonStrings;

            strings.CustomizeQuickAccessToolbar = EditorLocalization.Translate("General", strings.CustomizeQuickAccessToolbar);
            strings.ShowBelowRibbon             = EditorLocalization.Translate("General", strings.ShowBelowRibbon);
            strings.ShowAboveRibbon             = EditorLocalization.Translate("General", strings.ShowAboveRibbon);
            strings.Minimize = EditorLocalization.Translate("General", strings.Minimize);

            var menus = kryptonDockableWorkspace.ContextMenus;

            menus.TextClose           = EditorLocalization.Translate("Docking", menus.TextClose);
            menus.TextCloseAllButThis = EditorLocalization.Translate("Docking", menus.TextCloseAllButThis);
            menus.TextMovePrevious    = EditorLocalization.Translate("Docking", menus.TextMovePrevious);
            menus.TextMoveNext        = EditorLocalization.Translate("Docking", menus.TextMoveNext);
            menus.TextSplitHorizontal = EditorLocalization.Translate("Docking", menus.TextSplitHorizontal);
            menus.TextSplitVertical   = EditorLocalization.Translate("Docking", menus.TextSplitVertical);
            menus.TextRebalance       = EditorLocalization.Translate("Docking", menus.TextRebalance);
            menus.TextMaximize        = EditorLocalization.Translate("Docking", menus.TextMaximize);
            menus.TextRestore         = EditorLocalization.Translate("Docking", menus.TextRestore);

            var strings2 = workspaceController.DockingManager.Strings;

            strings2.TextTabbedDocument  = EditorLocalization.Translate("Docking", strings2.TextTabbedDocument);
            strings2.TextAutoHide        = EditorLocalization.Translate("Docking", strings2.TextAutoHide);
            strings2.TextClose           = EditorLocalization.Translate("Docking", strings2.TextClose);
            strings2.TextCloseAllButThis = EditorLocalization.Translate("Docking", strings2.TextCloseAllButThis);
            strings2.TextDock            = EditorLocalization.Translate("Docking", strings2.TextDock);
            strings2.TextFloat           = EditorLocalization.Translate("Docking", strings2.TextFloat);
            strings2.TextHide            = EditorLocalization.Translate("Docking", strings2.TextHide);
            strings2.TextWindowLocation  = EditorLocalization.Translate("Docking", strings2.TextWindowLocation);
        }