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
I am working in Umbraco v8. I'm using the localization service.
I can get a dictionary item by id, and I can get the value of the item by the language id.
var dictionaryItem = _localizationService.GetDictionaryItemById(apiInstruction.NodeId); var defaultTranslationValue = dictionaryItem.Translations.FirstOrDefault(x => x.Id == defaultLanguage.Value);
When there is no translation for the default language, I want to fall back to using the name of the dictionary item.
So my question to you is, how do I access the name or alias of the dictionary item?
Thanks
Paul
Hi Paul,
that should be the dictionaryItem.ItemKey value
dictionaryItem.ItemKey
Kevin
Thanks Kevin, much appreciated.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to get the name or alias of a dictionary item using the localization service
I am working in Umbraco v8. I'm using the localization service.
I can get a dictionary item by id, and I can get the value of the item by the language id.
When there is no translation for the default language, I want to fall back to using the name of the dictionary item.
So my question to you is, how do I access the name or alias of the dictionary item?
Thanks
Paul
Hi Paul,
that should be the
dictionaryItem.ItemKey
valueKevin
Thanks Kevin, much appreciated.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.