Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
My filter list remains empty when i try to loop my dictionary items.
Has anyone an idea why (or a more simple solution)?
// get default search text XPathNodeIterator iterator = umbraco.library.GetDictionaryItems("Filter.DefaultSearchText"); iterator.MoveNext(); //move to first XPathNodeIterator dictionaryItems = iterator.Current.SelectChildren("DictionaryItems", ""); List<string> defaultSearchText = new List<string>(); while (dictionaryItems.MoveNext()) { // preValueIterator.Current.GetAttribute("id", "") defaultSearchText.Add(dictionaryItems.Current.Value); }
Ok, i found another solution.
List<string> defaultSearchText = new List<string>(); var DictionaryItem = new umbraco.cms.businesslogic.Dictionary.DictionaryItem("Faculty.Filter.DefaultSearchText"); foreach (var item in umbraco.cms.businesslogic.language.Language.GetAllAsList()) { defaultSearchText.Add(DictionaryItem.Value(item.id)); }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
dictionary translations c#
Ok, i found another solution.
is working on a reply...