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.mo
andes_ES.po
files fromradicle.pot
inresources/lang/
- Set WordPress language to Spanish
- Added to a
mu-plugin
calledlocalization.php
:<?php add_action('after_setup_theme', function () { load_theme_textdomain('radicle', resource_path('lang/')); });
- Translations working as expected