Support Log in

30. Options Reference

Developer Guide
Prefer video? Watch the Lang Forge tutorials 9 short guides covering every feature Watch

All Lang Forge options are stored in the wp_options table.

Option KeyTypeDefaultDescription
lf_default_languagestring'ru'Default site language code
lf_active_languagesarray['ru'=>..., 'en'=>...]Active languages with metadata
lf_url_formatstring'directory'URL mode: directory, parameter, subdomain, domain
lf_hide_default_languageboolfalseHide language prefix for default lang
lf_auto_detect_languageboolfalseWhen enabled, first-visit Accept-Language read → 302 redirect to /{lang}/ (once per browser, gated by the lf_autodetect_done cookie)
lf_translatable_post_typesarray[]Post types enabled for translation
lf_language_fallbacksarray[]Fallback chains: ['de' => ['en', 'ru']]
lf_domain_maparray[]Domain mapping: ['en' => 'example.co.uk']
lf_switcher_stylestring'dropdown'Default switcher style
lf_switcher_show_flagsbooltrueShow flags in switcher
lf_switcher_show_namesbooltrueShow language names in switcher
lf_switcher_show_currentbooltrueShow current language in switcher list
lf_email_notificationsboolfalseEmail notifications for translation events
lf_translate_commentsboolfalseEnable comment translation
lf_license_dataarray[]License/activation data
langforge_license_dataarray[]Avakode Connect license data used by the split PRO add-on and shared credits widget
forge_license_last_pro_atint0Shared last-confirmed PRO timestamp; under local FORGE_SKIP_LICENSE_REVALIDATION, values older than 24h force Free
forge_e2e_planstring''Local/E2E-only plan override (pro or trial) gated by FORGE_SKIP_LICENSE_REVALIDATION
Example: Configure language fallback chains
php
$fallbacks = get_option('lf_language_fallbacks', []);
$fallbacks['de'] = ['en', 'ru'];
$fallbacks['fr'] = ['en'];
update_option('lf_language_fallbacks', $fallbacks);
Example: Programmatically add a new language
php
$languages = get_option('lf_active_languages', []);
$languages['fr'] = [
    'name'        => 'French',
    'native_name' => 'Francais',
    'flag'        => 'fr',
    'locale'      => 'fr_FR',
];
update_option('lf_active_languages', $languages);
flush_rewrite_rules();

Forge AI Assistant Online

Hi! I'm the Lang Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs