Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
select2 placeholder do not show diacritics for French from Localization.resx file

I will appreciate any ideas of how to fix the following problem. In milti-language application I have a page, where I declare a drop-down list to show the list of customers from DB table:

@Html.DropDownListFor(m => m.CustomerId, new SelectList(Model.Customers, "Id", "Name", Model.CustomerId), new { @class = "form-control select2-customer", id = "select2-customer", multiple = "multiple" })

For the DropDownListFor I use select2. select2 is defined in the shared page:

 $(".select2-customer").select2({
        placeholder: '@Localization.SelectCustomer',
        allowClear: true
    });

The value for placeholder comes from the Localization file, where I have a definition for French: https://i.stack.imgur.com/tp9Q3.png

Name: SelectCustomer

Value: Sélectionner un client

Problem: When I run the application and then change language from English to French, text in French in all places (UI, items of drop-down lists, navigation menu, etc.) is ok, but the placeholder is broken: it shows S&#233lectionner un client instead of expected Sélectionner un client

I tried off to wrap the placeholder value with @Html.Raw, HttpUtility.HtmlDecode - it didn't help.

Thanks!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda