Open DavidCramer opened 9 years ago
Yes but then we need eval(), not very secure.
On Sat, Apr 25, 2015, 7:09 AM David Cramer notifications@github.com wrote:
having .html or .htm is all very well, but wont be easily translated. having php on an include will allow to do things like :
{{#if rates}}
{{/if}}
— Reply to this email directly or view it on GitHub https://github.com/CalderaWP/metaplate-core/issues/3.
Here's my proposal:
caldera_metaplate_localize()
to work like wp_localize_script()
Then you could do:
$strings = array(
'happy' => __( 'Happiness, woo!', 'slug' ),
'cats' => __( 'Cats', 'slug' ),
);
caldera_metaplate_localize( 'metaplate_id', $strings );
Not sure where you do that..., but then in the metaplate you do:
{{#translatable_string happy}}
having .html or .htm is all very well, but wont be easily translated. having php on an include will allow to do things like :