среда, 20 сентября 2017 г.

Running Solidworks in English and Russian (or other) languages using bat / cmd-file

To run Solidworks in English and Russian (or any other localized in Solidworks) languages using the bat-file, we need two additional reg-files that change the language parameters of Solidworks. For example, we will run Solidworks 2016 and launch will do for the Russian and English interface.


This can be done for any of the languages that is the localization of Solidworks: (Czech, French, German, Italian, Japanese, Korean, Polish, Portuguese (Brazil), Spanish, Turkish, Russian, English, Chinese Simplified)


Listing reg-file (sw_2016_eng.reg) for changing parameters in English

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2016\General]


"Use English language feature names"=dword:00000001

"Use English language"=dword:00000001

The first parameter indicates that you need to use file names and element names in English. The second is to use the menu in English.
To automate this process, create a bat-file or cmd-file.
Listing the bat-file (sw_eng.bat) of the launching Solidworks in English

echo off
regedit -s "C:\Users\LeninSW.com\Desktop\sw_2016_eng.reg"
"C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe"

As you can see, the bat-file starts importing values into the registry, followed by the launch of a solidworks. Of course, the paths will need to be edited according to your file locations.
Similarly, we create files for launching Solidworks in Russian.

Listing reg-file (sw_2016_eng.reg) to change the settings in Russian

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2016\General]


"Use English language feature names"=dword:00000000

"Use English language"=dword:00000000


Listing the bat-file (sw_rus.bat) of the launching Solidworks in Russian

echo off
regedit -s "C:\Users\LeninSW.com\Desktop\SW_2016_rus.reg"
"C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe"

Thus, when you start sw_eng.bat, Solidworks will start in English, and when you start sw_rus.bat in Russian.
It can be done only through a bat-file, without a reg-file, a little more complicated.
Listing the bat-file (sw_rus1.bat) of the launching Solidworks in Russian

echo off
reg ADD "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2016\General" /v "Use English language" /t REG_DWORD /d "00000000" /f
reg ADD "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2016\General" /v "Use English language feature names" /t REG_DWORD /d "00000000" /f
start "Solidworks_rus" "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe"

Listing the bat-file (sw_eng1.bat) of the launching Solidworks in English
echo off
reg ADD "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2016\General" /v "Use English language" /t REG_DWORD /d "00000001" /f
reg ADD "HKEY_CURRENT_USER\Software\SolidWorks\SOLIDWORKS 2016\General" /v "Use English language feature names" /t REG_DWORD /d "00000001" /f
start "Solidworks_eng" "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe"

When installing Solidworks, you can select several localization languages: French, German, Polish, etc. To run Solidworks in these languages, you must change the locale in Windows. You can manually, but it's more convenient through a bat-file.
An example of a bat file for launching in German. Naturally German or some other language should be installed in Solidworks. This is done when you install / modify Solidworks. The bat-file changes the locale to German, starts Solidworks and after closing the solid it changes the locale back to Russian. You can correct the bat-file to run in any other language. Change the value of "de-DE" to the appropriate locale.

Listing the bat file

echo off
reg ADD "HKEY_CURRENT_USER\Control Panel\International" /v "LocaleName" /t REG_SZ /d "de-DE" /f
start /wait "Solidworks_rus" "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe"
reg ADD "HKEY_CURRENT_USER\Control Panel\International" /v "LocaleName" /t REG_SZ /d "ru-RU" /f



List of values for different locales:

Czech - "cs-CZ" 
French - "fr-FR"
German - "de-DE"
Italian - "it-IT"
Japanese - "ja-JP"
Korean - "ko-KR" 
Polish - "pl-PL"  
Portuguese (Brazil) - "pt-BR"
Spanish - "es-ES"
Turkish - "tr-TR"
Russian - "ru-RU"
English - "en-GB"
Chinese simplified - "zh-CN"

There is also a way to change languages without changing the locale, just rename the directories with resources. You can even make a bat-file.
Listing the bat file renaming the language resources
and running Solidworks. After the closure of the solidworks, the language resources are renamed again.

rename "C:\Program Files\SolidWorks Corp\SolidWorks\lang\english" "Lang_temp"
rename "C:\Program Files\SolidWorks Corp\SolidWorks\lang\russian" "english"
rename "C:\Program Files\SolidWorks Corp\SolidWorks\lang\Lang_temp" "russian"
start /wait "Solidworks_rus" "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\SLDWORKS.exe"
rename "C:\Program Files\SolidWorks Corp\SolidWorks\lang\russian" "Lang_temp"
rename "C:\Program Files\SolidWorks Corp\SolidWorks\lang\english" "russian"
rename "C:\Program Files\SolidWorks Corp\SolidWorks\lang\Lang_temp" "english"

An example with bat and reg-files can be downloaded from the link

Комментариев нет:

Отправить комментарий

test

data-matched-content-ui-type="text" data-matched-content-rows-num="2" data-matched-content-columns-num="4"

test3

data-matched-content-rows-num="2" data-matched-content-columns-num="2" data-matched-content-ui-type="image_stacked" data-ad-format="autorelaxed" data-matched-content-rows-num="4" data-matched-content-columns-num="2" data-matched-content-ui-type="image_stacked" data-ad-format="autorelaxed"