web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Getting a translated string as field value

(1) ShareShare
ReportReport
Posted on by 25

I'm creating an extension where I display some static text as a field on a page. The reason for this is that the actual content of the field in the record should not be directly visible to or editable by the user. Instead, I'm showing a custom page where the user selects values and these are stored in the actual field of the record. The definition for this field looks like this:

field(MyExtCategories; CategoriesLinkText())
{
    ApplicationArea = All;
    Caption = 'Categories';
    ToolTip = 'Edit the item''s categories';

    trigger OnDrillDown()
    begin
// Let the user pick some categories
    end;
}

As you can see, the "value" for the field is the result of a call to the CategoriesLinkText() procedure, which is defined like this:

var
    NoneSelectedTxt: Label 'None (click to edit)';
    SomeSelectedTxt: Label 'Selected (click to edit)';

local procedure CategoriesLinkText(): Text
begin
    if StrLen("Categories".Trim()) > 0 then
        exit(SomeSelectedTxt)
    else
        exit(NoneSelectedTxt);
end;

Obvously this code simply checks whether the user already selected some categories and returns the respective text. So far, so good, this works as required.

However, now I've added a German translation and of course I've also translated the two Labels above, but in the Web Client, the texts are still in English, while everything else is in German. Of course I could modify these labels so be language independent, but I wonder: how would I return the translated text from the procedure instead of the original untranslated text?

UPDATE

I just noticed that the same problem occurs when showing an Error message. The text, while translated, is shown in English.

UPDATE II

Aaaaand again I feel like an idiot: Instead of specifying de-DE for my translated file, I had only specified de as the target language. Setting it to de-DE shows my translated strings...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 728 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 545 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 328 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans