Home > Forum > Plugins > SDK Configuration: ConfigEditableTranslation

SDK Configuration: ConfigEditableTranslation
0

MVP

Hi everyone,

did someone use this attribute and has an sample how to set this up?

I've probably used a wrong type for the property. Like it happens when one copy & pastes and changes the attribute name to Bool but the property is still string. :)

Meanwhile I will search for the log table in which this GUID exists. :)



Type: WebCon.WorkFlow.Studio.Logic.Exceptions.PortalWebserviceException
-------------------------------------------------------
A WEBCON BPS Portal error has occured.
-------------------------------------------------------
Message: WebCon.WorkFlow.SDK.ConfigAttributes.ConfigEditableTranslation
-------------------------------------------------------
Error details in logs, Guid: 18c4c6c0-194b-4000-a544-2254a55ec11e
..
at WebCon.WorkFlow.Studio.Logic.PortalService.PortalService.GetPluginConfigurationMetadata(Int32 pluginId)

Best regards,
Daniel

MVP
In reply to: Daniel Krüger (Cosmo Consult)

The log entry is in table: [BPS_Config].[dbo].[AdminWFEventLogs]

It seems that this attribute can note be used with version 2022.1.2.31. I've created a support ticket.

I will update this thread, ones I have an answer to my question.

Best regards,
Daniel

I did it wrong. :)

Config class

public class Config: PluginConfiguration
{
[ConfigEditableTranslationsList(DisplayName ="Translatable texts")]
public TranslatableTexts Translations { get; set; }

}
public class TranslatableTexts
{
[ConfigEditableTranslation(DefaultTranslation = "Authenticate", DisplayName = "Authenticate button label")]
public string AuthenticationButtonLabel
{
get; set;
}
}

Usage in C#
Configuration.Translations.AuthenticationButtonLabel

Usage in FormFieldExtensionJS, if you are using a function component:
props.sdkConfiguration.Translations.AuthenticationButtonLabel


The property will contain the value for the current language, or if non is set, the default one. So there's no need to get the translation for the current user.

I attached a screenshot how this looks in the configuration dialog.

Best regards,
Daniel

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.