A localizable message is one from the resource bundles, so the method you are using is expecting a resourceName
, and the error indicates that it cannot find your resource name in the Tridion bundles (which makes sense).
If you wish to use your own resource bundle, then you have to make sure that Tridion knows about this, and you can do that with one of the overrides of the LocalizableMessage
method:
public LocalizableMessage(
ResourceManager specifiedResourceManager,
string resourceName
)
or
public LocalizableMessage(
ResourceManager specifiedResourceManager,
string resourceName,
params Object[] parameters
)
Where the parameters have the following details:
specifiedResourceManager
- Type:
System.Resources.ResourceManager
- Specifies a
ResourceManager
that will be used to lookup the string resource.
resourceName
- Type:
System.String
- The string resource name.
parameters
- Type:
System.Object[]
- The parameter values can be any object (the object's
ToString()
implementation will be used to format the message). A parameter value may also be a LocalizableMessage
instance, in which case it will be localized in the appropriate culture.
update
I was looking for an example of the methods, take a look at https://github.com/bkoopman/sdl-tridion-world/blob/master/Example%20Event%20System/Example%20Event%20System/EventHandler.cs#L169
Properties.Resources.ResourceManager
in there points to the Resource bundle added to the solution which you can find in the Properties
folder: https://github.com/bkoopman/sdl-tridion-world/blob/master/Example%20Event%20System/Example%20Event%20System/Properties/Resources.resx
And you can then add localized resx files in the same location and make them Embedded Resources too.
Initiated
phase, the message is exposed to the user, so you would want it localized in the users UI language.