| @@ -370,10 +370,13 @@ | ||
| 370 | 370 | if (file_exists(WP_LANG_DIR . '/loco/plugins/yatra-' . $locale . '.mo')) { |
| 371 | 371 | load_textdomain('yatra', WP_LANG_DIR . '/loco/plugins/yatra-' . $locale . '.mo'); |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | - // Load from plugin directory (fallback) | |
| 375 | - load_plugin_textdomain('yatra', false, 'i18n/languages'); | |
| 374 | + // Load from the plugin's own i18n/languages folder (fallback). The 3rd | |
| 375 | + // arg is relative to WP_PLUGIN_DIR, so it MUST include the plugin folder | |
| 376 | + // name — a bare 'i18n/languages' resolves to wp-content/plugins/i18n/ | |
| 377 | + // languages (which doesn't exist), so bundled translations never load. | |
| 378 | + load_plugin_textdomain('yatra', false, dirname(YATRA_PLUGIN_BASENAME) . '/i18n/languages'); | |
| 376 | 379 | } |
| 377 | 380 | |
| 378 | 381 | /** |
| 379 | 382 | * Get container instance |