orbit-compat-wpmllisted
Install: claude install-skill adityaarsharma/orbit
# 🪐 orbit-compat-wpml — WPML compatibility
WPML is the dominant paid translation plugin (~1M sites). Plugins that store/output translatable text need WPML hooks or strings stay in default-language only.
---
## What this skill checks
### 1. wpml-config.xml registration
**Whitepaper intent:** WPML reads `wpml-config.xml` from your plugin directory to know which custom fields, options, and CPTs to translate. Without it, WPML can't translate your plugin's content.
```xml
<!-- wpml-config.xml -->
<wpml-config>
<custom-fields>
<custom-field action="translate">my_plugin_subtitle</custom-field>
<custom-field action="copy">my_plugin_color</custom-field>
</custom-fields>
<admin-texts>
<key name="my_plugin_settings">
<key name="welcome_text" />
</key>
</admin-texts>
<custom-types>
<custom-type translate="1">my_plugin_post</custom-type>
</custom-types>
<taxonomies>
<taxonomy translate="1">my_plugin_taxonomy</taxonomy>
</taxonomies>
</wpml-config>
```
### 2. Translatable strings via WPML String API
```php
// Register strings WPML should pick up
do_action( 'wpml_register_single_string', 'my-plugin', 'Settings Title', 'Settings' );
// Retrieve
$translated = apply_filters( 'wpml_translate_single_string', 'Settings', 'my-plugin', 'Settings Title' );
```
### 3. Get current language
```php
$lang = apply_filters( 'wpml_current_language', null ); // 'en', 'fr', etc.
```
### 4. Switch language programmatically
```php
do_action( 'wpml_switch_