How to localize no-script (iframe) reCAPTCHA? - localization

I know that to localize the regular (JavaScript) reCAPTCHA I can provide lang attribute to Recaptcha.create method as specified in documentation I've tried to do the same for noscript version by passing lang in query string like this http://www.google.com/recaptcha/api/noscript?k=<key>&lang=ru, but I still got an English version.
Does anyone know how to localize the iframe version?

try using &hl=ru parameter. hope this help.

Related

Where can I see the specification for thymeleaf th:method?

I've seen a lot of answers about how to send PUT/DELETE/PATCH HTTP requests with thymeleaf, and it's by using th:method = "the_specific_method", but i haven't found the thymeleaf specification about that. Can anyone help showing me where is it?
Thanks in advance.
I've tried to google for the answer, but no luck.
th:method isn't special to Thymeleaf -- it's just like any other plain old attribute which will output the result of an expression to the method attribute. It doesn't do (or care about) anything else. You can put any string and/or string expression into it, and Thymeleaf will happily output it.
th:method="${'the_specific_method'}"
will output
method="the_specific_method"
without regards to whether or not it's valid. If you want to learn about the method attribute, you just need to learn about how method works in plain old regular html and how browsers (and/or Spring) work with it.

VirtualUriMapping doesn´t function- Magnolia CMS

I´m trying to transform my Url according to Magnolia documentation:
https://documentation.magnolia-cms.com/display/DOCS/URI+mapping#URImapping-URItorepositorymapping
I need to change my language page:
I receive this:
http://localhost:8080/module/en/TEST_/newsdetails/201602151
With this sentence:
<a href="${cpathx}/${cmsfn.language()}/${rootPage}/newsdetails/${encodeTitle!""}">
And I´m transforming by UriMapping to this:
http://localhost:8080/module/en/TEST_/newsdetails?newsRef=201602151
I don´t know when i do the URIMapping it doesn´t show in my language 'EN', only shows the language by default and doesn´t get the 'EN'
This´s my URIMapping:
and this is my site definition config:
The problem is when i do:
${cmsfn.language()}
It returns my language by default..
Also I,ve tried putting this URiMapping:
You need locale aware VirtualURIMapping - see Matteo Pelucco's blog post: http://maips21.altervista.org/wordpress/2015/05/05/how-to-build-a-locale-aware-virtualurimapping-in-magnolia-with-regexp/

Displaying text in differnt locales on one page

I need to display sentences in my GSP in differnt locales.
The following documentation states that g:message takes a locale param.
I can't find an example of this anywhere. Has anyone done this?
<p><g:message code="welcome.into.text1" locale="sv_SE"/></p>
<p><g:message code="welcome.into.text1" locale="en_US"/></p>
Obviosuly, I have messages_sv.properties & messages_en_US.properties.
Thanks
To specify locale explicitely use Locale object instead of String, e.g.:
<g:message code="welcome.into.text1" locale="${Locale.US}"/>
http://grails.org/doc/latest/guide/i18n.html
Grails how to change the current locale

Problems od special characters with sfWidgetFormDoctrineChoice in Symfony

I'm using sfWidgetFormDoctrineChoice to get a list of languages from a MySql database. The list is in spanish language. All languages with special characters like for ex. Árabe looks OK (it got the tilde), but I'm getting the wrong representation (A!rabe) using the widget.
How can I resolve this?
Thanks in advance.
This is probably an encoding problem: verify that the list of languages registered in your database has the same encoding than the page where you display the widget.
But why don't you use the sfWidgetFormI18nChoiceLanguage widget ?

Grails set language (internationalization) via URL mappin

I'm interested in supporting English and French in my Grails app with user-friendly URL.
format: /appname/language/controller/action
example: /store/en/product/list
What is the best way without passing as a parameter (?lang=fr) then rewriting the URL.
Thanks
Adding the following mapping in your appname\grails-app\conf\UrlMappings.groovy should do it.
"/$lang/$controller/$action?/$id?"{
}
See the URL mapping article on the grails website for details.

Resources