I am currently working on a 7.2.6 site and it seems the syntax is slightly different to the documentation you pointed to, so I thought I'd add a comment on here in case it is useful for someone else.
In the version I am using, you also have to pass in a culture, I have slightly changed my code so it is trying to get the same key mentioned in the original question above:
var textService = this.ApplicationContext.Services.TextService;
textService.Localize("mail2cms/settings"), CultureInfo.CurrentCulture)
How I can localize name of tree nodes in custom section?
I have created a few nodes with a tree controller like this:
How can I localize the name of tree nodes (here: "Settings", "Mapping", "Blacklist") ?
My language file looks like this:
Can anyone help me, please?
Cheers
Sören
I have solved it with ui.Text(areaAlias,key)
Sören
I think the following is depreciated:
And you should be using the localizationService, however I am not sure of the syntax, maybe someone else can confirm the new syntax?
Cheers,
Chris
Comment author was deleted
Think it's the TextService you need to use, that has a localize method
(LocalizationService is for languages and dictionary items)
Comment author was deleted
Example usage can be found here https://our.umbraco.org/documentation/Extending/Language-Files/Language-Files-For-Packages/
Thanks Tim,
I am currently working on a 7.2.6 site and it seems the syntax is slightly different to the documentation you pointed to, so I thought I'd add a comment on here in case it is useful for someone else.
In the version I am using, you also have to pass in a culture, I have slightly changed my code so it is trying to get the same key mentioned in the original question above:
I hope this thread helps someone else :)
Cheers,
Chris
is working on a reply...