有没有办法为 ReCaptcha ASP.Net 用户控件设置自定义语言字符串?
我正在使用 ReCaptcha ASP.Net 用户控件,我想知道是否有人知道通过标记为控件设置自定义语言字符串的方法。
如果我不使用用户控件,例如设置 RecaptchaOptions javascript 变量,我知道该怎么做,但是用户控件编写自己的变量并使用它,这样该解决方案将不起作用,或者当我尝试时还没有起作用。
提前致谢。
I'm using the ReCaptcha ASP.Net user control and I was wondering if anyone is aware of a way of setting custom language strings for the control from markup.
I know how to do it if I'm not using the user control, e.g. setting the RecaptchaOptions javascript variable, but the user control writes its own variable and uses that so that solution won't work, or haven't when I tried anyway.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您愿意使用内置的受支持语言,这个问题是询问如何使用用户控件设置语言(在 1.0.5 中添加),我认为它公开了发布
Lang
属性。根据 recaptcha 网站的自定义页面,支持的语言有:英语、荷兰语、法语、德语、葡萄牙语、俄语、西班牙语、土耳其语
否则,您将不得不使用 javascript...如果您在使用 javascript 之前创建了 recaptcha 控件,则可以创建自己的用户控件,或者您可以(为您自己)修改所提供的用户控件的源。
If you are happy to use the supported languages that are built in, this SO question is asking how to set the language using the user control (added in 1.0.5) which I think exposes a publish
Lang
property.According to the customisations page from the recaptcha site, the supported languages are: English, Dutch, French, German, Portuguese, Russian, Spanish, Turkish
Otherwise, you're going to have to use javascript...if you have created the recaptcha control before using javascript, you could create your own user control, or you could perhaps modify the source (for yourself) of the user control that is provided.