You need to sign in to do that
Don't have an account?
MarkHB
How to make a Flow embedded in a VF page recognize the language param?
Hi,
I have a public VF page (no login controller) with an embedded screen flow as follows:
I would like the Flow to pick up the language parameter and display the correct text from Translation Workbench accordingly. Is this possible, and if so what do I need to do to make it happen?
(The language actually works properly if I build this in Experience Cloud, but if I do that then I have other questions about initializing the E. Cloud site off the recordId the way I can with the VF Controller.)
I have a public VF page (no login controller) with an embedded screen flow as follows:
<apex:page showHeader="false" sidebar="false" controller="ImportantWorkController" language="{!languageCode}" action="{!init}"> <html> <head> ... </head> <body> <div id="content"> <div class="container"> ... <div class="row"> <div class="twelve columns" id="LightningContainer"> <apex:outputPanel rendered="{!isBroken == false}"> <script type="text/javascript"> var theId = "{!$CurrentPage.parameters.recordId}"; //Create Lightning Component $Lightning.use("c:ImportantWorkScreens", function() { $Lightning.createComponent("c:ImportantWork", { "recordId" : theId, "param2" : "{!param2}", "param3" :"{!param3}", "language" : "{!languageCode}" }, //Pass Parameters "LightningContainer", function(component) { console.log('Component created'); }); }); </script> </apex:outputPanel> </div> </div> </div> </div> </body> </html> </apex:page>The Application in the ImportantWorkScreens app is simply:
<aura:application description="ImportantWorkScreens" access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess"> <aura:attribute name="recordId" type="String" /> <aura:attribute name="param2" type="String" /> <aura:attribute name="param3" type="String" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:dependency resource="c:ImportantWork" /> </aura:application>And the inner ImportantWork.cmp is:
<aura:component implements="lightning:isUrlAddressable,force:hasRecordId" description="ImportantWork"> <aura:attribute name="recordId" type="String" /> <aura:attribute name="param2" type="String" /> <aura:attribute name="param3" type="String" /> <aura:handler name="init" value="{!this}" action="{!c.init}" /> <lightning:flow aura:id="flowData" /> {!v.pageReference.state.c__action} </aura:component>(I'm omitting the Controllers and Helpers but can add them if needed).
I would like the Flow to pick up the language parameter and display the correct text from Translation Workbench accordingly. Is this possible, and if so what do I need to do to make it happen?
(The language actually works properly if I build this in Experience Cloud, but if I do that then I have other questions about initializing the E. Cloud site off the recordId the way I can with the VF Controller.)