Localizations (resource files) when provisioning PnP site template

I need to provision a PnP site template with localizations (translations into different languages that are stored in RESX files).

My template is as follows:

<?xml version="1.0" encoding="utf-8"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2021/03/ProvisioningSchema">
<pnp:Localizations DefaultLCID="1033">
<pnp:Localization LCID="1033" Name="Test" **ResourceFile="localizations-en-US.resx"** />
<pnp:Localization LCID="3082" Name="Test" **ResourceFile="localizations-es-ES.resx"** />
</pnp:Localizations>
<pnp:Templates>
<pnp:ProvisioningTemplate ID="MyTemplate">
<pnp:SupportedUILanguages>
<pnp:SupportedUILanguage LCID="1033" />
<pnp:SupportedUILanguage LCID="3082" />
</pnp:SupportedUILanguages>
<pnp:Lists>
<pnp:ListInstance EnableAttachments="false" EnableFolderCreation="false" EnableVersioning="true" TemplateType="100" Title="**{localization:ListTitle}**" Url="Lists/MyList">
...

Please where should I put the "localizations-en-US.resx" and "localizations-es-ES.resx" files so that the PnP provisioning engine can locate them?

Thank you,

Javier

Hi @javier.munoz.garcia,

The action itself doesn't have an option to locate the files, but it uses the same approach as the PowerShell.

Try to locate the files in the same location as the template and then deploy it using PowerShell and check the result.

This is how the commands look:

Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/targetcommunicationsite"
Invoke-PnPSiteTemplate -Path "PnP-Provisioning-File.xml"

Best regards,
Petr
Plumsail team

Hi @Petr,

I need a fully automated site provisioning process, without manual intervention.

Therefore, I can't use PowerShell, unless I replace Plumsail Actions with Azure Functions, which is what I'm trying to avoid.

So I understand that I cannot use Plumsail Actions to provision multi-language sites. It is correct?

Thank you,

Javier

Hi @javier.munoz.garcia,

Let me discuss it with the developers team and I'll be in touch shortly.

Best regards,
Petr
Plumsail team

Hi @Petr,

I tried to apply resource files with the "Invoke-PnPSiteTemplate" PowerShell cmdlet and it worked sucessfully.

I suggest to add a new file collection property to the "Provision PnP template to SharePoint" action where we can add resource files and they are uploaded to the same path where the template file is created:

1 Like

Hi @javier.munoz.garcia

Yes, I'll suggest adding the parameters. Thanks for checking!

Best regards,
Petr
Plumsail team

1 Like

Hi @javier.munoz.garcia,

We discussed the issue and a possible workaround is to place the XML file and the RESX files in one folder then build a PnP template using a PowerShell command Convert-PnPFolderToSiteTemplate. Check out the example here and then apply the PnP template in the Plumsail action.

So, you won't need to locate the resx file specifically since they will be included into the PnP template.

The case is also described here, please take a look.

Best regards,
Petr
Plumsail team

Hi @Petr,

Thank you for the workaround, but, unfortunately, it doesn't work for me, since I'm building the template content on the fly with Power Automate.

I'm using different Power Automate actions to get the content from different data sources and compose the XML code that will feed the "Provision PnP template to SharePoint" Plumsail action.

Please note that the template content will be different on each run, because the data sources are constantly changing.

It would be great to have those additional parameters so that resource files —and localizations— can be used in one of your most useful actions.

Hello Javier! Could you describe your use case in details so that the developers could decide about the implementation of the requested feature?