You need to sign in to do that
Don't have an account?
stibbett
Hide Lightning Component based on Language
Hi - I'm relatively new to Lightning so I'm not sure where to look for this.
I have a community page that I've built with Builder, and it has a component on it, and a language switcher. Guests can view the page, and switch between English and French.
There's one particular component that I need to hide when the user's language is French.
How can I do that?
I looked at Audiences but I don't see how I can create an audience based on a guest user's selected language.
There's <aura:renderif> but I don't see how I can apply that to the page I built with Builder.
The component I'm trying to hide is a Contact Support form, so it's fairly complicated inside otherwise I could do in HTML/JavaScript.
Is there an easy way to do this?
Thanks!
-- Steve
I have a community page that I've built with Builder, and it has a component on it, and a language switcher. Guests can view the page, and switch between English and French.
There's one particular component that I need to hide when the user's language is French.
How can I do that?
I looked at Audiences but I don't see how I can create an audience based on a guest user's selected language.
There's <aura:renderif> but I don't see how I can apply that to the page I built with Builder.
The component I'm trying to hide is a Contact Support form, so it's fairly complicated inside otherwise I could do in HTML/JavaScript.
Is there an easy way to do this?
Thanks!
-- Steve
You can use an application event
The main component handles the app event in reception and changes he value of the <aura:if>
The other component (anywhere on the page) fires the app event with the language in the message (parameter of the app event) when the value changes (here a radio group)
All Answers
You can use an application event
The main component handles the app event in reception and changes he value of the <aura:if>
The other component (anywhere on the page) fires the app event with the language in the message (parameter of the app event) when the value changes (here a radio group)