function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MarkHBMarkHB 

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:
<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.)