private void AutoTranslateAllKeyOfLanguage(LocalizedLanguage model)
        {
            var sourceModel    = script.LocalizedLanguages[0];
            var sourceLangCode = sourceModel.Language.Code();

            var targetLangCode = model.Language.Code();
            var totalSteps     = sourceModel.LocalizedStrings.Count;

            model.isBeingAutoTranslated = true;

            foreach (var keyValue in sourceModel.LocalizedStrings)
            {
                if (!string.IsNullOrEmpty(keyValue.Value))
                {
                    GoogleTranslateEditor.Translate(sourceLangCode, targetLangCode, keyValue.Value, (info) =>
                    {
                        if (info.IsValid)
                        {
                            model.SetString(keyValue.Key, info.Text);
                        }
                        else
                        {
                            Debug.LogError(string.Concat("Failed to translate the key ", keyValue.Key, " for the language ", info.TargetLanguage));
                        }
                        model.UpdateTranslationProgress(totalSteps);
                    });
                }
                else
                {
                    model.UpdateTranslationProgress(totalSteps);
                }
            }
        }
        private void AutoTranslateKeyOfLanguage(string key, LocalizedLanguage model)
        {
            var sourceLang     = script.LocalizedLanguages[0];
            var sourceLangCode = sourceLang.Language.Code();

            var sourceText     = sourceLang.GetString(key);
            var targetLangCode = model.Language.Code();

            if (!string.IsNullOrEmpty(sourceText))
            {
                GoogleTranslateEditor.Translate(sourceLangCode, targetLangCode, sourceText, (info) =>
                {
                    if (info.IsValid)
                    {
                        model.SetString(key, info.Text);
                    }
                    else
                    {
                        Debug.LogError("Failed to translate the key " + key);
                    }
                });
            }
        }