I'm affraid you have to use the Language file to store the context menu items text in. Because a user can update his/her Umbraco install you can't update the language file(s) when you install the package(an update will override it). So i'm using the following:
When a user starts umbImport, I'm checking for a few keys, If they don't exists I update the language file for the selected language of the user. Otherwise I do nothing and during install I update all language files.
How to localize the text of an IAction in a context menu
In my own UmbracoTree I've added actions that implments the IAction interface.
The text of the action in the context menu in the tree is the value of IAction.Alias property surrounded by "[" and "]"
As far as I can tell it's because Umbraco tries to translate the alias using the language xml file in /config/lang dir.
I'm deploying to multiple sites using a package.
What is the best way to create a localized text on my context menu?
Hi,
I'm affraid you have to use the Language file to store the context menu items text in. Because a user can update his/her Umbraco install you can't update the language file(s) when you install the package(an update will override it). So i'm using the following:
When a user starts umbImport, I'm checking for a few keys, If they don't exists I update the language file for the selected language of the user. Otherwise I do nothing and during install I update all language files.
It's a bit of a hack but it works for me
Cheers,
Richard
Thanks for the swift answer. I had however hoped for a silver bullet.
is working on a reply...