cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User II
Super User II

Re: How to add Multi Language in Portal

okay I think I see now where you are getting mixed up

 

so basically setting up multiple languages in CDS or the Portals doesn't mean it will have a translation engine behind that will translate your content.. it basically allows you to write content in multiple languages, but you have to define that content yourself

 

CDS/metadata translation --> if your attribute is an OptionSet then yes it will be translated via metadata

otherwise, if you have a lookup/text field, your data won't be translated here, just the attribute name

For example:

Route Name

Route 01

Route 02

 

in the metadata translation you will define the translation for "route name", but not the records

Nombre de ruta

Route 01

Route 02

 

To solve the above problem, you will need to have another attribute in your CDS entity with the spanish value

Nombre de ruta (ES)

Ruta 01

Ruta 02

 

now to display that in the portal you have another challenge, if that's an Entity List, you might want to have two entity list, one for English, another for Spanish, each one showing the proper fields.. now in your two localized web pages, each one can reference a specific view/entity list

another option is hiding/showing the columns via JS based on the current language

does that make sense?

 

now in regards the HTML content: <p id="OnGoingJourney">On Going Journey</p>

your text is hard-coded in english, so it will show always in english, it won't translate automatically.. and that's the main reason the Portals split the Web Page into a "root" and a "localized" web page, so you can have multiple localized web page, with different content in each page.. in other words, write in english in the english web page.. and write in spanish in the spanish web page

#Pro Tip

avoid hard-coding any content/text/labels in your Portal.. try as much as possible using Content Snippets

you can reference that in your HTML by the snippet name.. you don't need to worry about language, the Portals handle that itself, all you need is to make sure you have a snippet for each language (with the same name):

<p>{{snippets['your snippet name'] }}</p>

 

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

Highlighted
Helper V
Helper V

Re: How to add Multi Language in Portal

Hi @OliverRodrigues 

 

I think this makes all the things clear to me. Thanks for explaining this in brief.

And also thanks for giving a solution for HTML static text. 😊

 

But do you think that JS code will behave differently on different Localized page? because as I mentioned My JS code is running fine in English but in Spanish.

 

Any Help will be appreciable.

Thanks,

Amit

View solution in original post

Highlighted
Super User II
Super User II

Re: How to add Multi Language in Portal

hi @AmitSah 

very weird the JS not working

it should work as normal.. maybe add a few alerts/console.log to see whats missing

perhaps is something on the Web Template

 

if the previous messages helped with your issue, can you mark as solution? this will help other users in case they are experience similar issues

 

play a bit more with your web template/JS, perhaps start a new thread if you are still facing issues

 

thanks 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (5,230)