static void LoadLanguagesDisplay()
        {
            languageCodes = LEStringTableEditor.AllLangsVisual.Keys.ToArray();
            langIndex     = Array.IndexOf(languageCodes, LEStringTableEditor.CurrentLanguage);

            if (languageCodes.Length > 0)
            {
                languages = new string[languageCodes.Length];
            }
            else
            {
                languages     = null;
                languageWidth = 20;
                return;
            }

            languageWidth = 0;
            for (int i = 0; i < languages.Length; i++)
            {
                LECulture info = LECultureFactory.Get(languageCodes[i]);

                if (info != null)
                {
                    languages[i] = FormatCultureDisplay(info);
                }
                else
                {
                    languages[i] = languageCodes[i];
                }
            }
        }
        static void SelectLanguage(int index)
        {
            if (languageCodes == null || !languageCodes.IsValidIndex(index))
            {
                return;
            }

            langIndex = index;
            LEStringTableEditor.CurrentLanguage = languageCodes[langIndex];
            SetCurrentLanguageInManager();
            groupHeightCollection.Clear();

            try
            {
                currentCulture = LECultureFactory.Get(languageCodes[langIndex]);
            }
            catch
            {
                currentCulture = null;
            }
        }
        static void LoadNewLanguagesDisplay()
        {
            newCultures.Clear();

            var cultureDisplays = new List <string>();

            List <LECulture> specific = LECultureFactory.GetAllSpecific();

            foreach (LECulture cul in specific)
            {
                if (!LEStringTableEditor.AllLangsVisual.ContainsKey(cul.Name) &&
                    !string.IsNullOrEmpty(cul.TwoLetterISOLanguageName) &&
                    !cul.TwoLetterISOLanguageName.Equals(LEConstants.InvariantCultureCode))
                {
                    newCultures.Add(cul);
                    cultureDisplays.Add(LEConstants.SpecificCultureCategory + FormatCultureDisplay(cul));
                }
            }

            // Set the new language index to en-US if it's available
            newLangIndex = Math.Max(0, newCultures.FindIndex(x => x.Name.Equals("en-US")));

            List <LECulture> neutral = LECultureFactory.GetAllNeutral();

            foreach (LECulture cul in neutral)
            {
                if (!LEStringTableEditor.AllLangsVisual.ContainsKey(cul.Name) &&
                    !string.IsNullOrEmpty(cul.TwoLetterISOLanguageName) &&
                    !cul.TwoLetterISOLanguageName.Equals(LEConstants.InvariantCultureCode))
                {
                    newCultures.Add(cul);
                    cultureDisplays.Add(LEConstants.NeutralCultureCategory + FormatCultureDisplay(cul));
                }
            }
            cultureDisplays.Add(LEConstants.CustomLbl);

            newCulturesDisplay = cultureDisplays.ToArray();
        }
        void LoadLocSetInfo()
        {
            if (locSetNames == null)
            {
                locSetNames = new string[]
                {
                    "en-US-SampleScene",
                    "es-PR-SampleScene",
                    "fr-FR-SampleScene",
                    "it-IT-SampleScene",
                    "de-DE-SampleScene",
                    "ja-JP-SampleScene",
                    "ko-KR-SampleScene",
                    "ru-RU-SampleScene",
                    "ar-SA-SampleScene",
                    "he-IL-SampleScene",
                    "ur-SampleScene"
                };
            }
            LEManager.CurrentLocSet = locSetNames[0];

            GUIStyle listStyle = GUI.skin.button;

            if (languageDisplay == null)
            {
                // Set the display name based on the CultureInfo
                languageDisplay = new GUIContent[locSetNames.Length];
                for (int i = 0; i < languageDisplay.Length; i++)
                {
                    string culture = locSetNames[i].Replace("-SampleScene", string.Empty);

                    try
                    {
                        if (culture.Equals("ar-SA"))
                        {
                            languageDisplay[i] = new GUIContent(LEManager.Get(LESampleKeys.ar));
                        }
                        else if (culture.Equals("he-IL"))
                        {
                            languageDisplay[i] = new GUIContent(LEManager.Get(LESampleKeys.he));
                        }
                        else if (culture.Equals("ur"))
                        {
                            languageDisplay[i] = new GUIContent(LEManager.Get(LESampleKeys.ur));
                        }
                        else
                        {
                            LECulture cultureInfo = LECultureFactory.Get(culture);
                            languageDisplay[i] = new GUIContent(cultureInfo.NativeName);
                        }
                    }
                    catch
                    {
                        languageDisplay[i] = new GUIContent(culture);
                    }

                    Vector2 size = listStyle.CalcSize(languageDisplay[i]);
                    listWidth = Mathf.Max(listWidth, size.x);
                }
            }

            labelStyle                  = new GUIStyle(GUI.skin.label);
            labelStyle.fontSize         = 22;
            labelStyle.alignment        = TextAnchor.MiddleCenter;
            labelStyle.normal.textColor = new Color(.196f, .196f, .196f);
        }