New answers tagged

1

I'm not completely sure whether this is what you want, but if the option page is in one language you can simply put the gettext call in the custom field itself to avoid using variables. For the admin you force the translation to spanish: function wpse227983_force_language ( $locale ) { if ( is_admin() ) { return 'es_ES'; } return ...


2

The easiest approach would be to have custom fields on the edit page: one text field for every language you want to use (and perhaps different title fields?) For this you could use a plugin like ACF. This would provide an easy interface for non-tech editors. Supposing you are building your own theme you can integrate the custom fields in your template. ...


2

In my opinion you are focusing on a wrong issue in this case. For instance, if I want to change the Read More message I have to browse all files to see if it is there. This doesn't indicate localization problem. This indicates templating problem. What if you want to change markup of Read More of whatever else? Do you have to do this in multiple ...


-1

There is an easy way to get around this problem. Store all frontend messages as options of your theme. Let's define an option 'messages': add_option('messages',array()); Now we must populate this option. Let's define the defaults: $theme_messages_defaults = array ( 'read-more' => __('Read more','tekko'), 'next-page' => ...



Top 50 recent answers are included