Hello Nigel,
no I'm not a WPML user. Is this a free plugin? There is a free version?
Anyway I would like to translate and customize by my self this kinf of string
You should use some checks such as for the current page to limit where you hook into this filter to avoid hooking into it unnecessarily and affecting performance.
Here is an example of the kind of code you might use:
add_action( 'wp', function(){
if ( is_page( 'custom-login' ) ){ // edit for slug of login page
add_filter( 'gettext', 'ts_filter_texts', 10, 3 );
}
} );
function ts_filter_texts( $translation, $text, $domain ){
if ( ! ( $domain == 'default' || $domain == 'wpv-views') ){
return $translation;
}
// translations
switch ($text) {
case 'Username or Email':
$translation = 'Alternative username text';
break;
case 'Password':
$translation = 'Alternative password text';
}
return $translation;
}
The first action callback is to check which page we are on, while the second filter callback performs the actual translations...
Thank you again,
I tried to follow the steps but it doesn't work...I think the steps are not updated and I cannot obtain the suggested results... so I'm using a shortcode
Hi Shane, thanks for your response.
So I am using the internal code of WP?
Isn't there a way that works to use a custom login form? As I said the solution given in the tutorial doesn't work for me.
Anyway... from what I understand using WP shortcode I can't customize for example adding more fields. Right?
Moreover the notification email is sent by WP. Right?
For the redirection I am using Peter's plugin which seems to work.
Do you have any other solutions to avoid using the code mentioned by Nigel?
Anyway... from what I understand using WP shortcode I can't customize for example adding more fields. Right?
That is correct, this will only display the default login form.
Moreover the notification email is sent by WP. Right?
Yes the emails are sent by wordpress itself.
Do you have any other solutions to avoid using the code mentioned by Nigel?
Unfortunately without a translation plugin the only way to translate the fields is by using code. If you're using a shortcode that is not from our plugins then the textdomain for the text will be different.
The best option you may have for some automatic translation is by using the WPML plugin or another translation plugin for wordpress.
Thank you Shane,
you clearly answered my questions. Thank you!
What I was ultimately asking though is if there is a way to create a custom login agina that works though.
As I tried to tell you earlier as well, following the instructions provided in your tutorial something doesn't work. I have tried several times and thought that maybe the tutorial was made with an old version of toolset. Some information does not match with the software I am using and that is the most updated version.
Ok so you're not able to create a custom login form with our plugins. I'm actually not aware of a plugin that can create a custom login form in terms of adding additional custom fields etc.
I know that you can style the login forms however this is a purely css solution. If it's just change how the form looks then css will need to be used to do this.