Multilingual Setup
Multilingual Setup
WPML and Polylang
Cybermaps supports both WPML and Polylang through the TranslationHelper abstraction:
// Get current language
$lang = TranslationHelper::get_current_language();
// Get all active languages
$languages = TranslationHelper::get_active_languages();
// Switch language context
TranslationHelper::switch_to_language('fr');
Per-Language Discovery Files
When enable_multilingual_hub is enabled, the Static File Engine writes language-prefixed copies:
/fr/llms.txt
/fr/llms-full.txt
/es/llms.txt
/es/llms-full.txt
Language-Filtered Content Maps
The llms.txt content map uses a lang parameter on WP_Query to filter posts by language. This ensures the French llms.txt only shows French content, not a mix of all languages.
Translation Management
TranslationRegistry and TranslationManager handle translatable string registration. Use standard WordPress translation functions (__(), esc_html__()) in your code, the plugin’s text domain is cybermaps.