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?
Welcome! In order to change the site language, navigate to Admin dashboard-> Settings-> General and change Site Language setting.
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
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
Translation for frontend
Getting tired so mistakes creep in that I don’t see. I totally missed the fact that my sprintf strings are missing the domain name. I copied the code directly from the wordpress core files, and these code don’t include any domain name. So this is the fix: Change ‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( __( … Read more
use poedit, and build a translation database with it. Even without poedit you can probably parse an old po file to read all the translation and replace the matching string in the new file.
No you can’t this way. See documentation : $echo = text_function(); printf( __( ‘My string is %s’, ‘my-text-domain’ ), $echo );
Found it. Anyone with a similar problem can add this code to their site plugin or theme functions.php function convert_numbers_to_arabic( $string ) { $arabic_numbers = array(‘۰’, ‘۱’, ‘۲’, ‘۳’, ‘٤’, ‘۵’, ‘٦’, ‘۷’, ‘۸’, ‘۹’, ‘.’); $english_numbers = array(‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘.’); return str_replace($english_numbers, $arabic_numbers, $string); } add_filter( … Read more
Problem resolved. WordPress default translation were overriding my translation string. In locotranslate plugin go to settings and click on : Activate the main translation from wordpress. And than you can find and edit your specific string who is overrided.