I have a Customized Password Form on a Protected Site in spanish. I need to have a translation added for englisch.
My customisation for spanish looks like this:
add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form() {
global $post;
$label = and so on , ....
How can I translate it with WPML? Should I try something like this:
if ( ICL_LANGUAGE_CODE == 'en' ) {
Hi royaltask!
Yes exactly – use this code like:
add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form() {
global $post;
$label = "spanish label...";
if(defined(ICL_LANGUAGE_CODE) && ICL_LANGUAGE_CODE == 'en') $label = "english label..";
...
Cheers!
Peter
thanks for the hint.