Skip Navigation

[Resolved] Where can I translate the login form?

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 8 replies, has 2 voices.

Last updated by matthiasV-2 3 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#1890887

Tell us what you are trying to do? I am trying to translate "Username or Email" from the login page: hidden link.
Where can I do that?

#1891507

Hi,

To change the "Username or Email" text in the Toolset's login form, you can use the "gettext" hook.

For example:


add_filter( 'gettext', 'custom_login_form_label', 20, 3 );
function custom_login_form_label( $translated_text, $text, $domain ) { 
	switch ( $translated_text ) {
		case 'Username or Email' :
			$translated_text = __( 'Gebruikersnaam of email', 'wpv-views' );
		break;
	}
	return $translated_text;
}

Feel free to adjust the label text "Gebruikersnaam of email" as needed.

The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through active theme's "functions.php" file.

regards,
Waqar

#1893889

I tried to translate the text to "Gebruikersnaam of email" over Toolset's custom code feature in settings but unfortunately, this snippet cannot be edited directly. Check file permissions and wp-config.php constants DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS. Alternatively, you can edit the file manually.

Can you do it for me please?

#1894547

Thanks for writing back.

It seems that your web host or some security plugin has blocked the file editing features from the admin area. I'm afraid, we can't make code changes on your server, but we can guide you in the right direction.

You can check your website's "wp-config.php" file and see if it includes these lines:
( ref:https://wordpress.org/support/article/editing-wp-config-php/ )


define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );

To allow file editing features from the admin area, you'll need to change "true" to "false" in those lines.

If these lines are not present in your wp-config.php file, you may need to get your web host involved to set file permissions on the /wp-content/toolset-customizations/ directory so that WordPress can edit it. If neither of those is possible, you can edit the file(s) manually using FTP access or through the already installed "WP File Manager" plugin.
( please refer to this screenshot: hidden link )

#1894757

I informed and our host doesn't have restrictions on editing files. Is it possible that a plugin like iThemes security blocks editing? If yes, how to solve it?

#1895815

It is possible that the iThemes security plugin is restricting the file editing in the admin area. The best way to confirm this would be to temporarily deactivate the plugin and add see if file editing becomes available.

If it is confirmed that this plugin is responsible, you can consult their official support or documentation.

Did you get a chance to look into my other suggestions about the "wp-config.php" file, using FTP access or the "WP File Manager" plugin?

#1896125

Can we use Poedit pro to translate the English strings to Dutch?
What plugin from Toolset should we select: Toolset Framework? Toolset Blocks? Toolset Views? Toolset Maps?...?

#1896229

Yes, if you prefer, you can also use the Poedit for translating these strings.

The Pro version should be able to locate the PO file from each Toolset plugin automatically, but if you'd like to locate them manually, you'll find them at:

1. Toolset Blocks:
/toolset-blocks/vendor/toolset/toolset-common/languages/orig/views.po
( it should cover the text strings used in the login and password reset forms etc )

2. Toolset Maps:
/toolset-maps/languages/orig/toolset-maps.po
( it should cover the text strings used in the distance-based search filters )

#1898583

My issue is not yet resolved.