Open Closed

Retrieving localized data for dropdown lists #359

terrybentley created

I have been developing a new project using the ASP.Net Iteration Zero based on the MPA/SLA hybrid sample.

Does anyone have any suggestions as to how best to retrieve and display localized data for drop down lists. I already have service methods that return the values for the entity based on the language code provided although not sure if I should return it as a ListResultOuput or some more specialized DTO like the ComboBoxItemDto

These fields are things like record types, time zones, classifications, etc that need to be repopulated when the language changes. These codes rarely change and really only need to be populated once per session.


2 Answer(s)
  • 0
    hikalkan created
    Support Team


    You are free, we have no best practices on that yet. I created ComboBoxItemDto for such situations. If you like it, return a list of ComboBoxItemDto (with combining ListResultOuput, you can use ListResultOuput<ComboBoxItemDto> ).

    BTW, maybe not related to your situation, but you can get localized string directly from javascript (<a class="postlink" href=""> ... Javascript</a>)

  • 0
    terrybentley created

    Thanks. I was using List<ComboBoxItemDto>, I will switch to the ListResultOuput<ComboBoxItemDto> to see how that looks.

    I am using the localization that you mention for static labels and such but need to access the database for localized text data values.