You’re right, that’s my bad — it would be resource_path('languages/')
FWIW, the translate scripts that ship with Radicle are configured for the resources/lang/ directory
I went to test locally with translations for European Spanish (es_ES) and followed these steps:
- Run
yarn translate:pot - Generate
es_ES.moandes_ES.pofiles fromradicle.potinresources/lang/ - Set WordPress language to Spanish
- Added to a
mu-plugincalledlocalization.php:<?php add_action('after_setup_theme', function () { load_theme_textdomain('radicle', resource_path('lang/')); }); - Translations working as expected
