How translate the template amp-index.php?
-
I installed the plugin from GitHub repository
I’m working on a custom template using the filter
amp_template_file, works fine. Like this:add_filter('amp_template_file', 'proceso_amp_template_file'); function proceso_amp_template_file($default_template){ return locate_template('amp/templates/amp-index.php'); }In the original template file
amp-index.phpI see the line number 212 and I want to apply the translation.<?php echo esc_html( sprintf( _x( 'Posted %s ago', '%s = human-readable time difference', 'amp' ), human_time_diff( get_the_date( 'U', $post_id ) ) ) ); ?>Create the file
es_MX.poand compiler to create the filees_MX.mo.I used the functions
load_plugin_textdomain,load_theme_textdomain,load_textdomainand I failed to apply the translation.I come to you for help on how I can apply the translation.
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘How translate the template amp-index.php?’ is closed to new replies.