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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Shared component libra...
Power Apps
Answered

Shared component library and Power Automate

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey all, I'm trynna create a shared component that is gonna serve as I translator text. Basically, I created a list on SharePoint that I search for id and text and get a translated text to replace the content on app. For example, if the user set the language up to English, the login button's text will appear"Login", the same for portughese "Acessar" and so on. I created a flow that filters the appropriated text bassed on id and language passed and returns the result (the translated content).

felipepazts_0-1669153144383.png

That's the flow and the idea was to create a shared Text Component which could execute this flow and get the result (the translated text). So, every time I call it, I would pass the parameter TextId only, and the component, in its Text property, would return the translated text. 

 

I already have a function that does this 

 

 

First(
 Filter(Translations, LanguageTag = LanguageId && TextId = "LoginId")
).LocalizedText

 

 

but I need to pass it for every element in all screens, e.g: button, text, input. Therefore, I'd love if it was possible to create a component Text to be used wherever on the app.

 

This is to create a Text component only, it's not applicable to buttons, inputs or other elements. If you don't get what I meant, plase follow this video that I used as an example.

Categories:
  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @Anonymous 

     

    Your progress is really good but I would recommend trying to lessen your flow call as this will result in a laggy experience. Your planned design route will make multiple flow calls.

     

    I would highly recommend that you build up a flow that will fill a local collection in your app to store all the translations so that you call the info within the App. For example

     

    On Apps OnStart, you just use English. Like you can have a collection of English words

    cha_cha_0-1669165832311.png

     

    Then when the user changes language it will trigger to translate all your English words and add the translated words to your collection. Can use AddColumns here.

    cha_cha_1-1669165907660.png

     

    then on your control's Text property to be like 

    If(Translate,LookUp(col,ControlID=ButtonA).TranslateResult,LookUp(col,ControlID=ButtonA).English)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for replying to me, @cha_cha . I tried something similar to this, however, I couldn't read the collection inside the component. The idea is to pass the textid to the component and inside it, to run the Lookup, Filter, whatever function.

    The image below is related to the component I've created and as you can see, it can't find the translations collection.

    felipepazts_0-1669215120793.png

     

  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    Hello @Anonymous 

     

    In your component, enable the Access App Scope so it can access your app's data. By design components are isolated so you need to enable that option.

    cha_cha_0-1669215331075.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey @cha_cha 

    Is there any extra config to enable this property?

    felipepazts_0-1669216539638.png

     

    Just a reminder, this is how my shared componet library looks like

    felipepazts_1-1669216659524.png

    I'm working on the LabelMultipleLanguage and inside it I have a Text label component.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @cha_cha , I was looking for this flag here and I discovered that this is enabled in component tab, however, I'm using the shared component library. So, my question now is: what is the difference between the components created on the app (components tab) and the components created such as a shared component 

     

    felipepazts_0-1669217386118.png

    The components I was trying to implement have been created on the Component libraries, nonetheless, this feature you mentioned above it's only possible to be accessed from the components tab inside the app.

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @Anonymous 

     

    For your requirement, please create the component within the App.

     

    Shared Components are designed to be shared across different apps in an environment. They are by default isolated to ensure that they have no dependency on certain data sources. Most common function Shared Component are like App Banner, Footer. But I think it can do more but I don't have experience in that part yet.

     

    Components can be created in a Shared Component way (isolated) or you can allow it to access the app's current data. This action actually builds dependence on app so it can't be easily shared with other apps who don't have database. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks a lot, @cha_cha . you were very helpful!!!!. Thank you!!

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!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard