public string Translate(K key, params object[] args) { TranslatedItem <K> translatedItem = Items[key.ToInt32(null)]; if (translatedItem != null) { return(string.Format(translatedItem.Value, args)); } return(null); }
public string Translate(K key, params object[] args) { TranslatedItem <K> translatedItem = this.Items[key.ToInt32((IFormatProvider)null)]; if (translatedItem != null) { return(string.Format(translatedItem.Value, args)); } return((string)null); }
private void SortItems() { TranslatedItem <K>[] translatedItemArray = new TranslatedItem <K> [Localizer.MaxKeyValue + 1]; if (Items != null) { foreach (TranslatedItem <K> translatedItem in Items) { translatedItemArray[translatedItem.Key.ToInt32(null)] = translatedItem; } } Items = translatedItemArray; }
private void SortItems() { TranslatedItem <K>[] translatedItemArray = new TranslatedItem <K> [this.Localizer.MaxKeyValue + 1]; if (this.Items != null) { foreach (TranslatedItem <K> translatedItem in this.Items) { translatedItemArray[translatedItem.Key.ToInt32((IFormatProvider)null)] = translatedItem; } } this.Items = translatedItemArray; }
private void SortItems() { // sort items var sortedItems = new TranslatedItem <K> [Localizer.MaxKeyValue + 1]; if (Items != null) { foreach (var item in Items) { sortedItems[item.Key.ToInt32(null)] = item; } } Items = sortedItems; }