void UpdateDB()
    {
        if (db == null)
        {
            return;
        }

        foreach (var key in keys)
        {
            db.AddTextEntry(key.Key);
            string[] array = new string[key.Value.Count];
            key.Value.CopyTo(array);
            db.SetTextEntry(SystemLanguage.English, key.Key, key.Key, array);
        }
    }
        private void DoM10NStringReferenceGUI()
        {
            MultiLangStringDatabase db = m_M10NDB.objectReferenceValue as MultiLangStringDatabase;

            //select the language you want to display
            EditorGUILayout.LabelField("Key", EditorStyles.boldLabel);

            EditorGUILayout.BeginHorizontal();

            float vspace = EditorGUIUtility.standardVerticalSpacing;
            float lineH  = EditorGUIUtility.singleLineHeight;

            GUILayoutUtility.GetRect(vspace, vspace, lineH, lineH);

            m_keyGUI.OnKeyGUI(db, m_M10NSelectedKey.stringValue);

            EditorGUILayout.EndHorizontal();

            if (keyMissing)
            {
                EditorGUILayout.LabelField("Key was:" + m_M10NSelectedKey.stringValue);
                if (GUILayout.Button("Add key to current database"))
                {
                    db.AddTextEntry(m_M10NSelectedKey.stringValue);
                    m_M10NIndex.intValue = db.IndexOfKey(m_M10NSelectedKey.stringValue);
                    EditorUtility.SetDirty(db);
                }
            }

            GUILayoutUtility.GetRect(vspace, vspace, lineH, lineH);

            EditorGUILayout.LabelField("Text", EditorStyles.boldLabel);
            if (db != null && !keyMissing)
            {
                EditorGUILayout.BeginHorizontal();
                GUILayoutUtility.GetRect(vspace, vspace, lineH, lineH);
                GUILayout.TextArea(db.current.values[m_M10NIndex.intValue].text, GUILayout.Height(60));
                //EditorGUILayout.LabelField(db.current.values[m_M10NIndex.intValue].text);
                EditorGUILayout.EndHorizontal();
            }
        }