WordPress theme doesn’t read my translations from pt_BR.po file
Try copying the files to wp-content/languages/themes/[theme name]-pt_BR.mo and .po.
Try copying the files to wp-content/languages/themes/[theme name]-pt_BR.mo and .po.
If you have any kind of caching enabled on a site with WordPress, IMHO, it’s probably best to use cookies instead of session variables, because with caching enabled, the user’s request for a page may not even hit the server at all — so the session var isn’t even being read. What I typically do … Read more
I managed to assign a variable to context. $context = Timber::get_context(); $context[‘search_placeholder’] = __(“Suche”,”pixel_framework”); Timber::fetch(‘test.twig’,$context); inside twig <input type=”text” id=”s” name=”s” value=”” placeholder=” {{search_placeholder}}”>
I believe this might help https://support.weglot.com/article/76-wordpress-404-error-translating, it’s exactly the same error you have. It seems to be about permalinks.
__() function inside html tags
Looks like you correctly specified WordPress language code for other languages but not Japanese. https://make.wordpress.org/polyglots/teams/ Japanese .mo files need to be named themename-ja.mo but you are probably naming them using ‘jp‘?
I would suggest you go with the sub directory option as it would be the best foot forward. You can integrate google translation api with wordpress in order to translate the content. Will let know in case i find something more about it.
You can change the line number 103 in the file /weglot/vendor/weglot/weglot-php/src/Parser/Check/RegexCheckerProvider.php original code : /* Add JSON LD checker */ $this->addChecker(new RegexChecker(“#<script type=(‘|\”)application\/ld\+json(‘|\”)([^\>]+?)?>(.*?)<\/script>#s” , SourceType::SOURCE_JSON, 4 , array( “description” , “name” , “headline” , “articleSection” ))); To replace by : /* Add JSON LD checker */ $this->addChecker(new RegexChecker(“#<script type=(‘|\”)application\/ld\+json(‘|\”)([^\>]+?)?>(.*?)<\/script>#s” , SourceType::SOURCE_JSON, 4 , array( “description” … Read more
for example use: _e(‘the things to print’) or if woocommerce is being used its possible to use this way: _e(‘the things to print’, ‘woocommerce’) add_filter( ‘get_the_date’, function($the_date, $d, $post){ $date = new DateTime( $post->post_date ); echo _e($date->format(‘j F, Y’)); // change formatting as needed }, 10, 3 ); for more information about _e() the text … Read more
Depending on how Mailster handles WP’s email processing (which is actually out-of-scope here), you could probably do it by adding a BCC when phpMailer is initialized. In a pure WP sense, that would add your BCC to any email being handled through wp_mail(). add_action( ‘phpmailer_init’, function( $phpmailer ) { $phpmailer->addBCC( ‘[email protected]’ ); });