问题描述
我在启动站点CS2007 BasketSummary Component中添加语言时出现问题。
我正在修改CommerceComponents.dll,添加了ComponentResources.es-US。 resx在同一个文件夹中,其中ComponentResources.resx 找到了,但该网站没有为BasketSummary和其他语言更改添加语言。
当然我构建了Component并将其放在bin文件夹中。
任何建议!
Diegolo
Hi,
I'm having a problem adding a language to the starter site CS2007 BasketSummary Component.
I'm modifying the CommerceComponents.dll adding a ComponentResources.es-US.resx in the same folder where ComponentResources.resx is located, but the site is not taking the added language for the BasketSummary and other language changes.
Of course I builded the Component and place it on the bin folder.
Any Suggestions!
thanks,
Diegolo
推荐答案
1。需要以新语言添加新的resx文件(查找ComponentResources。* .resx文件),方法是复制现有文件并使用适当的语言扩展将其删除。 对我来说,我只是按语言添加它看起来像ComponentResources.fr.resx 2。新文件中的内容需要在某个时候更新。 1. Need to add a new resx file (look for ComponentResources.*.resx files) in the new language by copying an existing one and dropping it in place with proper language extension. For me, I'm just adding by language to it looks like ComponentResources.fr.resx 2. Content in the new file will need to be updated at some point. 3。将新文件添加到Resources.resx文件中,以便将其编译。 在CommerceComponents\Properties文件夹下查找。 如果不存在,请在CommerceComponents项目上单击鼠标右键,然后在左侧导航栏中选择"资源";点击链接生成它。 完成后,使用Add Resource添加新资源文件(对于此示例,您现在将拥有ComponentResources和componentResources_fr) 3. Add the new file to the Resources.resx file so that it will be compiled. Look for this under the CommerceComponents\Properties folder. If not there, add one by right mouse click on CommerceComponents project, then select Resources on left nav; click the link to generate it. Once done, use Add Resource to add in the new resource file (for this example, you would now have ComponentResources and componentResources_fr) 4。构建CommerceComponents dll 4. Build the CommerceComponents dll 5。构建完成后,您需要部署。 这是我被抛弃的地方 - 我将commerceComponents dll移动到网站\bin文件夹。 这一直有效,但只是移动这个dll从来没有拿过新的语言。 原因是您需要在\bin文件夹中创建一个与ComponentResources构建(调试或发布文件夹)中的结构相匹配的语言环境子文件夹,以便可以将新的语言环境特定的CommerceComponents.resources.dll放置到位并拾取;通过申请。 在我的示例中,网站\bin文件夹有一个名为"fr"的新文件夹。 (以及de-DE,en-us,fr-fr和ja-JP的默认文件夹) 5. Once it is built, you'll need to deploy. This is where I was getting thrown off - I move the commerceComponents dll over to the website \bin folder. This has always worked, but moving just this dll never picked up the new language stuff. The reason is that you need to create a locale subfolder in the \bin folder that matches the structure in your ComponentResources build (debug or release folders) so that the new locale specific CommerceComponents.resources.dll can be put in place and picked up by the application. In my example the website \bin folder has a new folder called "fr" (along with the default folders of de-DE, en-us,fr-fr and ja-JP) 6。编译网站,事情应该开始。 6. Compile site, things should kick in. 让我困惑一段时间的是其他帖子暗示你需要改变你的主题设置与文化匹配,在调试commercecomponents代码时,线程设置都是正确的 - 问题实际上只是获取资源来构建和适当部署。 What confused me for a while was that other posts were suggesting that you need to change your thread settings to match the culture and when debugging the commercecomponents code the thread settings were all correct - the issue was really just a matter of getting the resources to build and deploy appropriately. Rob 这篇关于向startersite CS2007 CommerceComponents添加文化语言es-US的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!