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
Method 1: Poedit (Recommended)
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
- Open Poedit
- Click "Create new translation"
- Select the POT file:
frontend-reset-password.pot - Choose your target language (e.g., Spanish, French, German)
Step 3: Translate strings
For each English string, enter the translation in your language:
| English | Spanish Example |
|---|---|
| Reset Password | Restablecer Contraseña |
| Please enter your email address or username | Por favor ingrese su dirección de correo electrónico o nombre de usuario |
| New Password | Nueva Contraseña |
| The passwords don't match | Las 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
- Go to Plugins > Add New
- Search for "Loco Translate"
- Install and activate
Step 2: Access plugin translations
- Go to Loco Translate > Plugins
- Find "Frontend Reset Password"
- Click to manage translations
Step 3: Create new language
- Click "New language"
- Select your target language
- Choose location: "Custom" or "System"
- Click "Start translating"
Step 4: Translate strings
- Click each English string
- Enter translation in the text area
- Click "Save" after each translation
Step 5: Sync and compile
- Click "Sync" to update from source code
- 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
- Go to WPML > Languages
- Add your target languages
- Configure language switcher
Step 3: Scan for strings
- Go to WPML > Theme and plugins localization
- Scan "Frontend Reset Password"
- WPML detects all translatable strings
Step 4: Translate strings
- Go to WPML > String Translation
- Filter by "frontend-reset-password" domain
- Translate each string
- 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:
- Switch WordPress to translated language
- Test complete password reset flow
- Verify all messages display correctly
- Check email content
- 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:
- Create page: "Reset Password" (English)
- Create page: "Restablecer Contraseña" (Spanish)
- 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
- Install RTL language
- Switch WordPress language
- Verify forms display correctly
- Check text alignment
- 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:
- Export PO/MO files from your translation tool
- Contact plugin developer via support
- 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:
- Verify WordPress language setting: Settings > General > Site Language
- Check file names match language code:
frontend-reset-password-es_ES.mo - Ensure files are in correct directory:
wp-content/languages/plugins/ - Clear all caches (WordPress, browser, CDN)
- Verify MO file is compiled (not just PO file)
Partial translations
Problem: Some strings translated, others still in English.
Solutions:
- Sync translation files with latest plugin version
- Check for missing translations in PO file
- Recompile MO file after adding translations
- Verify text domain matches:
'frontend-reset-password'
Email not translated
Problem: Emails still sent in English despite site translation.
Solutions:
- Check email customization in settings (may override translations)
- Use email language detection filter (see Multi-language sites section)
- Verify user's language preference is set
- Test with default email template (remove customizations temporarily)
Special characters broken
Problem: Accented characters or special symbols display incorrectly.
Solutions:
- Ensure PO/MO files saved with UTF-8 encoding
- Check database collation supports UTF-8
- Verify WordPress charset setting:
define('DB_CHARSET', 'utf8mb4'); - 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
- Customization overview - Explore other customization options
- Settings reference - Configure plugin settings
- FAQ - Common questions and answers