Hello,
Our CRM system langauges are English and Russian.
I need to add MS Report in Russian with custom macros settings. If user changes language to English, report should use Russian Localization.
For example
Id[#SalesUp|FinAppBorrowerAddress#] this is my macros settings.
How can I achieve it ?
Like
Hello,
Thank you for your question. In order to implement your business task, you need to perform the following steps:
1. You need to implement source code of a macros, you can find out how to do it in more detail in the following article:
2. In the source code of this macros, you need to implement the following changes, which will receive a localized value from database:
var sysCulture = new SysCulture(_userConnection);
if (!sysCulture.FetchPrimaryInfoFromDB("Name", "ru-RU"))
{
return "No culture found";
}
Guid russianCultureId = sysCulture.Id;
esq.SetLocalizationCultureId(russianCultureId);
...
if (entities.Count > 0)
{
Entity entity = entities[0];
var type = entity.GetTypedColumnValue<string>(columnType);
return type;
}
return String.Empty;
You can learn more about how to work with localized values in the article:
https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/back-end-development/localizable-resources/operations-with-localizable-resources/examples/retrieve-localizable-resources-from-the-database