Skip to main content

Translations

Overview

The Frontend Reset Password plugin is translation-ready and uses WordPress's standard internationalization system. You can translate all user-facing text into any language using translation tools like Poedit, Loco Translate, or WPML.

Text domain

The plugin uses the text domain 'frontend-reset-password' for all translatable strings.

Translation files location

Translation files are stored in:

wp-content/plugins/frontend-reset-password/i18n/languages/

The plugin includes a POT (Portable Object Template) file:

frontend-reset-password.pot

This template contains all translatable strings from the plugin.

Translation methods

Poedit is a desktop application for creating and editing translation files.

Step 1: Download and install Poedit

Visit poedit.net and download the application for your operating system.

Step 2: Create new translation

  1. Open Poedit
  2. Click "Create new translation"
  3. Select the POT file: frontend-reset-password.pot
  4. Choose your target language (e.g., Spanish, French, German)

Step 3: Translate strings

For each English string, enter the translation in your language:

EnglishSpanish Example
Reset PasswordRestablecer Contraseña
Please enter your email address or usernamePor favor ingrese su dirección de correo electrónico o nombre de usuario
New PasswordNueva Contraseña
The passwords don't matchLas contraseñas no coinciden

Step 4: Save translation files

Poedit generates two files:

  • frontend-reset-password-es_ES.po (editable source)
  • frontend-reset-password-es_ES.mo (compiled binary)

Step 5: Upload to WordPress

Upload both files to:

wp-content/languages/plugins/

Or to the plugin's language directory:

wp-content/plugins/frontend-reset-password/i18n/languages/

Method 2: Loco Translate (WordPress Plugin)

Loco Translate allows you to translate plugins directly from the WordPress admin.

Step 1: Install Loco Translate

  1. Go to Plugins > Add New
  2. Search for "Loco Translate"
  3. Install and activate

Step 2: Access plugin translations

  1. Go to Loco Translate > Plugins
  2. Find "Frontend Reset Password"
  3. Click to manage translations

Step 3: Create new language

  1. Click "New language"
  2. Select your target language
  3. Choose location: "Custom" or "System"
  4. Click "Start translating"

Step 4: Translate strings

  1. Click each English string
  2. Enter translation in the text area
  3. Click "Save" after each translation

Step 5: Sync and compile

  1. Click "Sync" to update from source code
  2. Loco Translate automatically compiles MO files

Method 3: WPML

WPML (WordPress Multilingual Plugin) provides advanced translation management.

Step 1: Install WPML

Purchase and install WPML from wpml.org.

Step 2: Configure WPML

  1. Go to WPML > Languages
  2. Add your target languages
  3. Configure language switcher

Step 3: Scan for strings

  1. Go to WPML > Theme and plugins localization
  2. Scan "Frontend Reset Password"
  3. WPML detects all translatable strings

Step 4: Translate strings

  1. Go to WPML > String Translation
  2. Filter by "frontend-reset-password" domain
  3. Translate each string
  4. Click "Translation is complete"

Step 5: Test translations

Switch site language and verify all strings display correctly.

Translatable strings

The plugin includes approximately 50 translatable strings across these categories:

Form labels and buttons

  • "Reset Password"
  • "Email Address or Username"
  • "New Password"
  • "Re-enter Password"
  • "Please enter your email address or username. You will receive a link to create a new password via email."

Success messages

  • "An email has been sent. Please check your inbox."
  • "Your password has been reset. You can now Sign in."

Error messages

  • "ERROR: something went wrong with that!"
  • "That email address is not recognised."
  • "That username is not recognised."
  • "Please enter a username or email address."
  • "The passwords don't match."
  • "That key has expired. Please reset your password again."
  • "That key is no longer valid. Please reset your password again."

Email content

  • "Someone requested that the password be reset for the following account:"
  • "Username: %s"
  • "If this was a mistake, just ignore this email and nothing will happen."
  • "To reset your password, visit the following address:"
  • "Account Password Reset"
  • "The e-mail could not be sent."

Settings page

  • "Settings"
  • "General Settings"
  • "Security Settings"
  • "Page Settings"
  • "Form Title"
  • "Form Text"
  • "Button Text"
  • "Email Subject"
  • "Email Sender"
  • "Minimum Length"

Password requirements

  • "Please enter a new password."
  • "Please enter a new password. Minimum %s characters."
  • "Minimum X characters."

Translation best practices

Keep formatting intact

Preserve HTML tags, placeholders, and special characters:

Correct:

English: "Username: %s"
Spanish: "Nombre de usuario: %s"

Incorrect:

Spanish: "Nombre de usuario: s%" (wrong placeholder order)

Maintain context

Understand the context where text appears:

  • "Reset Password" as button text vs. page title
  • "Email" as noun vs. verb
  • Error messages vs. success messages

Test thoroughly

After translating:

  1. Switch WordPress to translated language
  2. Test complete password reset flow
  3. Verify all messages display correctly
  4. Check email content
  5. Test error scenarios

Consider cultural differences

Adapt text for cultural context:

  • Formal vs. informal tone
  • Date/time formats
  • Currency symbols (if applicable)
  • Local conventions

Multi-language sites

For sites with multiple languages:

Language switcher

Add language switcher to password reset page:

// Using WPML
do_action('wpml_add_language_selector');

// Using Polylang
if (function_exists('pll_the_languages')) {
pll_the_languages(array('dropdown' => 1));
}

Language-specific pages

Create separate reset password pages for each language:

  1. Create page: "Reset Password" (English)
  2. Create page: "Restablecer Contraseña" (Spanish)
  3. Configure each page in plugin settings per language

Email language detection

Send emails in user's preferred language:

add_filter( 'somfrp_retrieve_password_message', 'multilang_reset_email', 10, 4 );
function multilang_reset_email( $message, $key, $user_login, $user_data ) {
// Get user's language preference
$user_lang = get_user_meta( $user_data->ID, 'locale', true );

// Switch to user's language
if ( function_exists( 'switch_to_locale' ) && $user_lang ) {
switch_to_locale( $user_lang );
}

// Build translated message
$reset_url = som_get_lost_password_url() . '?somresetpass=true&key=' . $key . '&uid=' . $user_data->ID;
$message = sprintf( __( 'Hello %s,', 'frontend-reset-password' ), $user_login );
$message .= "\n\n";
$message .= __( 'Click the link below to reset your password:', 'frontend-reset-password' );
$message .= "\n\n";
$message .= $reset_url;

// Restore original language
if ( function_exists( 'restore_current_locale' ) ) {
restore_current_locale();
}

return $message;
}

RTL (Right-to-Left) languages

For RTL languages like Arabic or Hebrew:

WordPress handles RTL automatically

WordPress detects RTL languages and loads appropriate stylesheets.

Test RTL layout

  1. Install RTL language
  2. Switch WordPress language
  3. Verify forms display correctly
  4. Check text alignment
  5. Verify button positions

Custom RTL styles (if needed)

Add RTL-specific CSS:

/* RTL adjustments */
body.rtl #lostpasswordform {
text-align: right;
}

body.rtl .lostpassword-submit {
text-align: left;
}

body.rtl .somfrp-eye-toggle {
right: auto;
left: 12px;
}

Contributing translations

Share translations with community

If you create a translation, consider sharing it:

  1. Export PO/MO files from your translation tool
  2. Contact plugin developer via support
  3. Submit translation for inclusion in plugin

Translation platforms

Some plugins use platforms like:

  • translate.wordpress.org
  • GitHub repositories
  • Plugin developer's website

Check plugin documentation for contribution guidelines.

Troubleshooting

Translations not showing

Problem: Site still displays English after adding translations.

Solutions:

  1. Verify WordPress language setting: Settings > General > Site Language
  2. Check file names match language code: frontend-reset-password-es_ES.mo
  3. Ensure files are in correct directory: wp-content/languages/plugins/
  4. Clear all caches (WordPress, browser, CDN)
  5. Verify MO file is compiled (not just PO file)

Partial translations

Problem: Some strings translated, others still in English.

Solutions:

  1. Sync translation files with latest plugin version
  2. Check for missing translations in PO file
  3. Recompile MO file after adding translations
  4. Verify text domain matches: 'frontend-reset-password'

Email not translated

Problem: Emails still sent in English despite site translation.

Solutions:

  1. Check email customization in settings (may override translations)
  2. Use email language detection filter (see Multi-language sites section)
  3. Verify user's language preference is set
  4. Test with default email template (remove customizations temporarily)

Special characters broken

Problem: Accented characters or special symbols display incorrectly.

Solutions:

  1. Ensure PO/MO files saved with UTF-8 encoding
  2. Check database collation supports UTF-8
  3. Verify WordPress charset setting: define('DB_CHARSET', 'utf8mb4');
  4. Use Poedit's "Save" (not "Export") to maintain encoding

Resources

Translation tools

  • Poedit: poedit.net - Desktop translation editor
  • Loco Translate: WordPress plugin for in-admin translation
  • WPML: wpml.org - Premium multilingual plugin
  • Polylang: Free WordPress multilingual plugin

WordPress translation resources

Community

  • WordPress Polyglots Team
  • Plugin support forums
  • Translation platforms

What's next