Jun 24 2022 09:28 AM
The only way to change the language of WinRAR from English to another is to copy the language files *.lng into the program directory.
I have packed the *.lng files in a MSIX Modification Package which works fine with manual installation.
Is it possible to create a MSIX bundle which installs WinRAR and the corresponding language modification package depending on the OS language ?
Jun 24 2022 01:52 PM - edited Jun 25 2022 09:53 AM
I don't think so. Bundles do not cause dependencies to be installed.
Jun 25 2022 05:45 AM - edited Jun 25 2022 05:47 AM
Solution@TIMOTHY_MANGAN
Hello Timothy,
first of all thank you very much for the quick feedback.
It is a pity that it does not work with modification packages in a bundle.
I have now solved it via the PSF FileRedirection for all "*.lng" files and a Powershell start script.
The Powershell script detects the user language on startup and copies the required language files from %MsixPackageRoot% to the fileredirection %MsixWritablePackageRoot% .
For all those who may come across this post and also want to package WinRAR multilingual, i have created it as follows:
PSF "config.json"
{
"applications": [
{
"id": "PSFLAUNCHEROne",
"executable": "VFS\\ProgramFilesX64\\WinRAR\\WinRAR.exe",
"arguments": "",
"workingDirectory": "VFS\\ProgramFilesX64\\WinRAR",
"scriptExecutionMode": "-ExecutionPolicy ByPass",
"startScript": {
"waitForScriptToFinish": true,
"timeout": 30000,
"runOnce": true,
"showWindow": false,
"scriptPath": "%MsixPackageRoot%\\VFS\\ProgramFilesX64\\WinRAR\\UserSettings.ps1",
"scriptArguments": "'%MsixPackageRoot%' '%MsixWritablePackageRoot%'",
"runInVirtualEnvironment": true
}
}
],
"processes": [
{
"executable": "WinRAR",
"fixups": [
{
"dll": "VFS\\ProgramFilesX64\\WinRAR\\FileRedirectionFixup64.dll",
"config": {
"redirectedPaths": {
"packageRelative": [
{
"base": "VFS/ProgramFilesX64/WinRAR/",
"patterns": [
".*\\.lng"
]
}
]
}
}
}
]
}
]
}
"UserSettings.ps1"
Param
(
[Parameter(Mandatory=$false)]
$MsixPackageRoot,
[Parameter(Mandatory=$false)]
$MsixWritablePackageRoot
)
#Create MSIX Fileredirection folder
$Destination = New-Item "$MsixWritablePackageRoot\vfs\programfilesx64\winrar" -ItemType Directory -Force
#Copy Winrar *.lng Files to MSIX Fileredirection folder
Copy-Item -Path "$MsixPackageRoot\VFS\ProgramFilesX64\WinRAR\Languages\$((Get-UICulture).Name)\*" -Destination $Destination -Force -ErrorAction SilentlyContinue
Jun 25 2022 09:51 AM
Awesome. Thanks for sharing.
Feel free to also share here at this community site for sharing application preparation info: http://github.com/TimMangan/App-Info
We already have an entry for WinRar without the language concerns, so you can edit the docs that exist.
Jun 25 2022 05:45 AM - edited Jun 25 2022 05:47 AM
Solution@TIMOTHY_MANGAN
Hello Timothy,
first of all thank you very much for the quick feedback.
It is a pity that it does not work with modification packages in a bundle.
I have now solved it via the PSF FileRedirection for all "*.lng" files and a Powershell start script.
The Powershell script detects the user language on startup and copies the required language files from %MsixPackageRoot% to the fileredirection %MsixWritablePackageRoot% .
For all those who may come across this post and also want to package WinRAR multilingual, i have created it as follows:
PSF "config.json"
{
"applications": [
{
"id": "PSFLAUNCHEROne",
"executable": "VFS\\ProgramFilesX64\\WinRAR\\WinRAR.exe",
"arguments": "",
"workingDirectory": "VFS\\ProgramFilesX64\\WinRAR",
"scriptExecutionMode": "-ExecutionPolicy ByPass",
"startScript": {
"waitForScriptToFinish": true,
"timeout": 30000,
"runOnce": true,
"showWindow": false,
"scriptPath": "%MsixPackageRoot%\\VFS\\ProgramFilesX64\\WinRAR\\UserSettings.ps1",
"scriptArguments": "'%MsixPackageRoot%' '%MsixWritablePackageRoot%'",
"runInVirtualEnvironment": true
}
}
],
"processes": [
{
"executable": "WinRAR",
"fixups": [
{
"dll": "VFS\\ProgramFilesX64\\WinRAR\\FileRedirectionFixup64.dll",
"config": {
"redirectedPaths": {
"packageRelative": [
{
"base": "VFS/ProgramFilesX64/WinRAR/",
"patterns": [
".*\\.lng"
]
}
]
}
}
}
]
}
]
}
"UserSettings.ps1"
Param
(
[Parameter(Mandatory=$false)]
$MsixPackageRoot,
[Parameter(Mandatory=$false)]
$MsixWritablePackageRoot
)
#Create MSIX Fileredirection folder
$Destination = New-Item "$MsixWritablePackageRoot\vfs\programfilesx64\winrar" -ItemType Directory -Force
#Copy Winrar *.lng Files to MSIX Fileredirection folder
Copy-Item -Path "$MsixPackageRoot\VFS\ProgramFilesX64\WinRAR\Languages\$((Get-UICulture).Name)\*" -Destination $Destination -Force -ErrorAction SilentlyContinue