Exemplo n.º 1
0
    private void CacheTranslationData(string _serializedData)
    {
        string[][] deserializedData = CSVUtil.DeserializeCSV(_serializedData);

        m_languageKeyToIndex = new Dictionary <string, int>();
        m_localizedValues    = new Dictionary <string, List <string> >();

        if (deserializedData != null && deserializedData.Length > 0)
        {
            for (int i = 0; i < deserializedData.Length; i++)
            {
                if (i == 0)
                {
                    DeserializeLanguages(deserializedData[i]);
                }
                else
                {
                    DeserializeTranslations(deserializedData[i]);
                }
            }
        }
        else
        {
            LogHelper.LogWarning("Failed to initialize "
                                 + this.GetType()
                                 + "; "
                                 + nameof(dataFile)
                                 + " is not set",
                                 this
                                 );
        }
    }