任务计划程序查询以本地化语言返回结果 [英] Task Scheduler query returns result in localized language

查看:60
本文介绍了任务计划程序查询以本地化语言返回结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在Windows任务调度程序中创建了一个任务,并在C#中以编程方式特定日期和时间调度它。操作系统语言是德语。它是本地化的。当我通过从我的应用程序运行以下命令来查询任务时:schtasks.exe / query
/ v / fo LIST / tn"< TaskName>"

I have created a task in windows task scheduler and have schduled it for particular day and time programmatically in C#. The OS language is German. It is localized. When I query the task by running the following command from my application: schtasks.exe /query /v /fo LIST /tn "<TaskName>"


它返回任务的详细信息,但是用德语而不是英语。如何以英语而非本地化语言获取详细信息?

It returns the details of the task but in German language and not in english. How can I get the details in English language and not in localized language?

Himanshu Saxena

Himanshu Saxena

推荐答案

如果你的操作系统是德语,那么这就是任务调度程序将要运行的,因此也就是有问题的应用程序。您不能自动将任意文本从一种语言翻译成另一种语言,这样您就可以回到德国。如果您希望任务以英语运行
(并且安装了相应的语言包),那么您需要将该进程配置为以英语运行。大多数应用程序不支持开箱即用。如果它是您自己的应用程序,那么您可以在代码中强制使用英语。

If your OS is in German then that is what task scheduler is going to run as and therefore the app in question. You cannot automagically translate arbitrary text from one language to another so you're going to get back Germany. If you want the task to run in English (and the appropriate language pack is installed) then you'd need to configure the process to run in English. Most apps don't support that out of the box. If it is your own app then you can force English in your code.

唯一的其他选择是以德语获取结果,然后呼叫翻译服务将消息翻译为尽可能最好。

The only other alternative is to get the results in German and then call out to a translation service to translate the message as best as possible.


这篇关于任务计划程序查询以本地化语言返回结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆