public void OnGUI()
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginVertical("Box", GUILayout.MaxWidth(150), GUILayout.ExpandHeight(true), GUILayout.MinWidth(150));
            foreach (var language in (Language[])Enum.GetValues(typeof(Language)))
            {
                if (Localization.IsLanguageLoaded(language))
                {
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.Space(0.5f);
                    EditorGUILayout.BeginHorizontal();

                    if (GUILayout.Button(language.ToString(), GUILayout.ExpandWidth(true)))
                    {
                        Localization.CurrentLanguage = language;
                        _localizedLanguage           = Localization.CurrentLocalizedLanguage;
                    }

                    EditorGUILayout.EndHorizontal();
                    EditorGUILayout.Space(0.5f);
                    EditorGUILayout.EndHorizontal();
                    EditorGUILayout.Space(1);
                }
            }
            EditorGUILayout.EndVertical();

            EditorGUILayout.BeginVertical(GUILayout.ExpandHeight(true));
            EditorGUILayout.Space();
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("Search:", EditorStyles.boldLabel, GUILayout.MaxWidth(47));
            value = EditorGUILayout.TextField(value);

            var createContent = new GUIContent("Create new");

            if (GUILayout.Button(createContent, GUILayout.Height(20), GUILayout.ExpandWidth(false)))
            {
                LocalizationEditWindow.Open("");
            }

            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space();
            scroll = EditorGUILayout.BeginScrollView(scroll);
            _localizedLanguage ??= Localization.CurrentLocalizedLanguage;

            foreach (var kvp in _localizedLanguage.Localization.Where(kvp => kvp.Key.ToLower().Contains(value.ToLower()) || kvp.Value.ToLower().Contains(value.ToLower())))
            {
                EditorGUILayout.BeginVertical("Box");
                EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));

                EditorGUILayout.TextField(kvp.Key);

                var editIcon    = Resources.Load <Texture>("LocalizationEditorTextures/Edit");
                var editContent = new GUIContent(editIcon, "Edit");

                if (GUILayout.Button(editContent, GUILayout.MaxWidth(20), GUILayout.MaxHeight(20)))
                {
                    LocalizationEditWindow.Open(kvp.Key);
                }

                var deleteIcon = Resources.Load <Texture>("LocalizationEditorTextures/Delete");
                var content    = new GUIContent(deleteIcon);
                if (GUILayout.Button(content, GUILayout.MaxWidth(20), GUILayout.MaxHeight(20)))
                {
                    if (EditorUtility.DisplayDialog($"Remove key '{kvp.Key}'", $"This will remove '{kvp.Key}' from the localization", "Sure", "Cancel"))
                    {
                        Localization.Remove(kvp.Key);
                        Localization.UpdateLocalization();
                        _localizedLanguage = Localization.CurrentLocalizedLanguage;
                    }
                }

                EditorGUILayout.EndHorizontal();

                EditorGUILayout.LabelField(kvp.Value, EditorStyles.wordWrappedLabel);
                EditorGUILayout.EndVertical();
            }

            EditorGUILayout.EndScrollView();
            EditorGUILayout.EndVertical();
            EditorGUILayout.Space();
            EditorGUILayout.EndHorizontal();
        }
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            if (Event.current.type == EventType.Layout)
            {
                return;
            }

            EditorGUI.BeginProperty(position, label, property);
            position        = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
            position.width -= 34;
            position.height = 18;

            var valueRect = new Rect(position);

            valueRect.x     += 15;
            valueRect.width -= 15;

            var foldButtonRect = new Rect(position)
            {
                width = 15
            };

            _dropdown = EditorGUI.Foldout(foldButtonRect, _dropdown, "");

            position.x     += 15;
            position.width -= 15;

            var key = property.FindPropertyRelative("key");

            key.stringValue = EditorGUI.TextArea(position, key.stringValue);

            position.x     += position.width + 2;
            position.width  = 17;
            position.height = 17;

            var searchIcon    = Resources.Load <Texture>("LocalizationEditorTextures/Search");
            var searchContent = new GUIContent(searchIcon, "Search");

            if (GUI.Button(position, searchContent))
            {
                LocalizationSearchWindow.Open();
            }

            position.x += position.width + 2;

            var editIcon    = Resources.Load <Texture>("LocalizationEditorTextures/Edit");
            var editContent = new GUIContent(editIcon, "Edit");

            if (GUI.Button(position, editContent))
            {
                LocalizationEditWindow.Open(key.stringValue);
            }

            if (_dropdown)
            {
                var value = Localization.GetLocalizedValue(key.stringValue);
                var style = GUI.skin.box;
                _height = style.CalcHeight(new GUIContent(value), valueRect.width);

                valueRect.height = _height;
                valueRect.y     += 21;
                EditorGUI.LabelField(valueRect, value, EditorStyles.wordWrappedLabel);
            }

            EditorGUI.EndProperty();
        }