ClickOnce 部署多语言程序需要注意的地方
You can download your culture specific resources with ClickOnce. There are a couple of ways to do this using Visual Studio.
1. Set 'Publish Language' property to 'English' or 'English (United States)' on the Publish Options Dialog. The Publish Options dialog is available by clicking the button labeled 'Options...' on the Publish Property Page. This will automatically deploy any resource files for the specified culture. If you choose 'English' (the parent culture), then en and en-US, etc. resources will be deployed. If you choose 'English (United States)' then only the en-Us resources will be deployed.
When setting the Publish Language, the deployment culture is also set, which is a part of the application identity. If you publish the same application to the same location and change the culture of the deployment manifest, some funky things will happen with the auto-update part of ClickOnce. If you would like to deploy several resources (not all under the same parent culture), I suggest using method #2.
2. Manually include the resource dlls to be deployed. To do this, first open the Application Files Dialog. The Applications Files Dialog is available by clicking the button labeled 'Application Files...' on the Publish Property Page. Click the checkbox labeled 'Show all files'. All the resource dlls for the project should now be seen and they will all have the Publish Status of 'Exclude (Auto)'. Simply change the Publish Status of each resource dll you wish to deploy to 'Include'. (You can multi-select rows and use the context menu to make this job easier.
1. Set 'Publish Language' property to 'English' or 'English (United States)' on the Publish Options Dialog. The Publish Options dialog is available by clicking the button labeled 'Options...' on the Publish Property Page. This will automatically deploy any resource files for the specified culture. If you choose 'English' (the parent culture), then en and en-US, etc. resources will be deployed. If you choose 'English (United States)' then only the en-Us resources will be deployed.
When setting the Publish Language, the deployment culture is also set, which is a part of the application identity. If you publish the same application to the same location and change the culture of the deployment manifest, some funky things will happen with the auto-update part of ClickOnce. If you would like to deploy several resources (not all under the same parent culture), I suggest using method #2.
2. Manually include the resource dlls to be deployed. To do this, first open the Application Files Dialog. The Applications Files Dialog is available by clicking the button labeled 'Application Files...' on the Publish Property Page. Click the checkbox labeled 'Show all files'. All the resource dlls for the project should now be seen and they will all have the Publish Status of 'Exclude (Auto)'. Simply change the Publish Status of each resource dll you wish to deploy to 'Include'. (You can multi-select rows and use the context menu to make this job easier.
一蓑烟雨任平生