Common Issues & Solutions
| Issue | Solution |
|---|---|
| Theme not translating | Check Loco Translate path settings |
| Polylang not showing languages | Verify permalinks structure (Settings → Permalinks → Save) |
| Strings missing in Loco | Sync template in Loco Translate |
| Language switcher not appearing | Add to menu manually |
| Translations not saving | Check folder permissions (755) |
| RTL not working | Verify rtl.css exists and loads |
| Elementor not translating | Elementor → Settings → Enable translation |
Debug Mode for Translation
Add to wp-config.php:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); // Force language for testing define('WPLANG', 'fr_FR');
Check Translation Loading
// Add to functions.php temporarily add_action('init', function() { if (function_exists('get_locale')) { echo '<!-- Current language: ' . get_locale() . ' -->'; } if (function_exists('pll_current_language')) { echo '<!-- Polylang language: ' . pll_current_language() . ' -->'; } });
Frequently Asked Questions
Q: Do I need both Loco Translate and Polylang?
A: Not necessarily. Loco Translate is for theme strings, Polylang for content. For a fully multilingual site, you’ll want both.
Q: Will translations survive theme updates?
A: If using Loco Translate’s custom directory (wp-content/languages/loco), YES. If saving in theme folder, they may be overwritten.
Q: How do I translate Elementor content?
A: Polylang handles Elementor content automatically when you translate pages.
Q: Can I use WPML instead of Polylang?
A: Yes! PestAnnihilate is compatible with WPML. The same principles apply.
Q: My language isn’t listed in Loco Translate?
A: You can manually enter any language code (e.g., ar for Arabic, he_IL for Hebrew).
Q: How do I know if a string is translatable?
A: In theme code, look for:
esc_html__('String', 'pestannihilate-core') esc_html_e('String', 'pestannihilate-core') __('String', 'pestannihilate-core') _e('String', 'pestannihilate-core')
Q: What about SEO in multiple languages?
A: Use Yoast SEO or Rank Math with Polylang add-ons for multilingual SEO.