Seal Report Forum
»
Report Edition
»
Reports
»
Report field value translation
Rank: Newbie
Groups: Registered
Joined: 5/25/2016(UTC) Posts: 2 Location: Roma Thanks: 1 times
|
Hi, is there a way to translate the content of a field value (from the result set) based on a language parameter ?
Thank you
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
The only native way to do this is to define an enumerated list for your column, then you can use repository translations to have your texts. Otherwise you can also dive into scripting: modify the view template (probably for the Model View) and change the code to translate the columns you want. OR use the cell script to translate your cells. Here are the helpers available in the Report object (use one of the translation context located in the repository translations): Code: //Helpers for translations
public string TranslateDisplayName(string displayName)
{
return Repository.RepositoryTranslate(ExecutionView.CultureInfo.TwoLetterISOLanguageName, "ReportDisplayName", TranslationFilePath, displayName);
}
public string TranslateViewName(string viewName)
{
return Repository.RepositoryTranslate(ExecutionView.CultureInfo.TwoLetterISOLanguageName, "ReportViewName", TranslationFilePath, viewName);
}
public string TranslateOutputName(string outputName)
{
return Repository.RepositoryTranslate(ExecutionView.CultureInfo.TwoLetterISOLanguageName, "ReportOutputName", TranslationFilePath, outputName);
}
public string TranslateGeneral(string reference)
{
return Repository.RepositoryTranslate(ExecutionView.CultureInfo.TwoLetterISOLanguageName, "ReportGeneral", TranslationFilePath, reference);
}
public string TranslateElement(ReportElement element, string reference)
{
return Repository.RepositoryTranslate(ExecutionView.CultureInfo.TwoLetterISOLanguageName, "Element", element.MetaColumn.Category + '.' + element.DisplayNameEl, reference);
}
|
|
|
|
Seal Report Forum
»
Report Edition
»
Reports
»
Report field value translation
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.