Opc.Ua.Server.ResourceManager.GetTable C# (CSharp) Method

GetTable() private method

Finds the translation table for the locale. Creates a new table if it does not exist.
private GetTable ( string locale ) : TranslationTable
locale string
return TranslationTable
        private TranslationTable GetTable(string locale)
        {
            lock (m_lock)
            {
                // search for table.
                for (int ii = 0; ii < m_translationTables.Count; ii++)
                {
                    TranslationTable translationTable = m_translationTables[ii];
                    
                    if (translationTable.Locale.Name == locale)
                    {
                        return translationTable;
                    }
                }

                // add table.
                TranslationTable table = new TranslationTable();
                table.Locale = CultureInfo.GetCultureInfo(locale);
                m_translationTables.Add(table);

                return table;
            }
        }