KNFoundation.KNBundle.LocalizedStringForKeyValueTable C# (CSharp) Method

LocalizedStringForKeyValueTable() public method

public LocalizedStringForKeyValueTable ( string key, string value, string table ) : string
key string
value string
table string
return string
        public string LocalizedStringForKeyValueTable(string key, string value, string table)
        {
            if (String.IsNullOrEmpty(table)) {
                table = "Localizable";
            }

            Dictionary<string, string> stringsTable;

            if (stringsCache.TryGetValue(table, out stringsTable)) {
                string outValue;
                if (stringsTable.TryGetValue(key, out outValue)) {
                    value = outValue;
                }
            }

            return (value == null ? key : value); ;
        }

Usage Example

Beispiel #1
0
 public static string KNLocalizedStringWithDefaultValue(string key, string tableName, KNBundle bundle, string value, string comment)
 {
     return bundle.LocalizedStringForKeyValueTable(key, value, tableName);
 }
All Usage Examples Of KNFoundation.KNBundle::LocalizedStringForKeyValueTable