Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Formula translate dropdown

Posted on by

Hello,

 

I found this formula to translate items from a dropdown to another language. Can someone tell me how i need to write down dutch - Belgium?

[
 {
 Label: If(Language() = "en-US", "All", <add Arabic word>)
 ID: "All"
 },

 

Categories:
  • Verified answer
    KeithAtherton Profile Picture
    KeithAtherton 3,649 on at
    Re: Formula translate dropdown

    The Choices function works like this:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-choices

     

    Another option would be to build a collection using the ClearCollect function and use that for the dropdown control Items property:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-clear-collect-clearcollect


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • MDR26 Profile Picture
    MDR26 on at
    Re: Formula translate dropdown

    I get the error unexpected characters, the first [ is underlined. Further its doing nothing.

     

  • KeithAtherton Profile Picture
    KeithAtherton 3,649 on at
    Re: Formula translate dropdown

    Do you have more information? Such as does it show an error / do something unexpected / do nothing, etc?


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • MDR26 Profile Picture
    MDR26 on at
    Re: Formula translate dropdown

    I tried this formula but i doesn't work. 

     

    Choices([@'LIST'].'Document')
    [
    {Label: If(Language() = "nl-BE", "Huurovereenkomst",
    Language() = "fr-FR", "Contrat de location",),
    ID: "Huurovereenkomst"},
    {Label: If(Language() = "nl-BE", "IT-overeenkomst",
    Language() = "fr-FR", "Contrat informatique",),
    ID: "IT-overeenkomst"},
    {Label: If(Language() = "nl-BE", "Dienstverleningsovereenkomst",
    Language() = fr-FR", "Contrat de service",),
    ID: "Dienstverleningsovereenkomst"},
    {Label: If(Language() = "nl-BE", "Andere",
    Language() = "fr-FR", "Autre"),
    ID: "Andere"}
    ]

  • KeithAtherton Profile Picture
    KeithAtherton 3,649 on at
    Re: Formula translate dropdown

    Hi @MDR26,

     

    You can use the translation service, info here:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-language#translation-service

     

    If you provide translations manually as per your code sample, try the following to provide multiple languages:

    {
     Label: Switch(Language(),
     "en-US", "Hello",
     "fr-FR", "Bonjour",
     // etc
     )
     ID: "All"
    }

     

    More info on the Language function and language tags here:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-language


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

  • Hassan_SZ_365 Profile Picture
    Hassan_SZ_365 548 on at
    Re: Formula translate dropdown

    Hi @MDR26 ,

    To add Dutch (Belgium) to your dropdown list, you would check for the language code for Dutch (Belgium), which is "nl-BE". Here is how you can add it to your formula: 

     

    [
     {
     Label: If(Language() = "en-US", "All", 
     Language() = "nl-BE", "Alles", 
     <other conditions here>),
     ID: "All"
     },
     // ... add more items as needed
    ]

     

    In this case, "Alles" is the Dutch word for "All". You would replace <other conditions here> with any other language checks and translations you need.

    Best Regards,
    Hassan Raza

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard