logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
vins  
#1 Posted : Wednesday, May 25, 2016 4:05:54 PM(UTC)
vins

Rank: Newbie

Groups: Registered
Joined: 5/25/2016(UTC)
Posts: 2
Italy
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

epf  
#2 Posted : Wednesday, May 25, 2016 5:13:39 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

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);
        }
Users browsing this topic
Guest (2)
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.