How to avoid override string by child theme mo files when the string is empty?
How to avoid override string by child theme mo files when the string is empty?
How to avoid override string by child theme mo files when the string is empty?
Polylang post_translations key [closed]
Since .po files are full text, you could first compare the files to see if the differences between the files occur at a specific place (is the addition only located at the end?), are the same keys used for different values?, … to ensure that no data is being lost. To that purpose you could … Read more
Welcome! In order to change the site language, navigate to Admin dashboard-> Settings-> General and change Site Language setting.
I found wp cli based solution. These below commands are useful for update translate files for core, themes and plugins: wp language core update wp language theme update –all wp language plugin update –all To schedule these commands, insert this line in crontab: 30 0 * * * wp language core update ; wp language … Read more
How to Translate a string of an array inside a class?
Thank @Sally CJ I made the solution : main code global $sitepress_settings; //Insert post with main lang $post = $binding_main_cpt[‘post’]; $default_language = $sitepress_settings[‘default_language’]; $main_post = $post[$default_language]; $postInformation = [ ‘post_title’ => wp_strip_all_tags(trim($main_post[‘post_title’] ) ), ‘post_content’ => $main_post[‘post_content’], ‘post_type’ => $main_post_type, ‘post_status’ => ‘publish’ ]; $master_post_id = wp_insert_post($postInformation); echo sprintf( “insert post %d”, $master_post_id ); foreach($sitepress_settings[‘active_languages’] … Read more
One easy solution, if you want the frontend to be a different language than the backend, is to change the site language under Settings > General (Spanish for example) and then change your user account’s language by going to Users > Your Profile and changing the Language setting to English. In addition, you can add … Read more
Generate JSON files for language translation from po file without wp-cli i18n make-json
The problem here is that WordPress project folder is a shared folder on Ubuntu VirtualBox guest OS with guest additions. Searching in wp cli source code, I found that to scan the directory is used: $files = new IteratorIterator( new DirectoryIterator( $this->source ) ); and I could verify that it returns only . and .. … Read more