Make slugs translatables
under review
Jairo Ochoa
This is the PHP that ACF generates:
'has_archive' => 'docs',
'rewrite' => array(
'slug' => 'doc',
),
To make it translatable it should be:
'has_archive' => _x( 'docs', 'slug', 'text-domain' ),
'rewrite' => array(
'slug' => _x( 'doc', 'slug', 'text-domain' )
),
It works if exists also:
add_filter('acf/settings/l10n_textdomain', 'custom_acf_settings_textdomain');
function custom_acf_settings_textdomain( $domain ) { return 'text-domain'; }
Iain Poulson
updated the status to
under review
Iain Poulson
Hi Jairo Ochoa thanks for the request. How are you translating your site strings - with a plugin?
Jairo Ochoa
Iain Poulson simply with Loco Translate. After making the translation it's necessary to save Permalinks.
In Spain we develop in English so we need to translate all string to Spanish after the plugin is finished. And we use Loco Translate to do it. Any kind of string, slugs included.