Maaike
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Yes, this worked like a charm. Thank you so much for all your effort!
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Hi bcworkz,
Thank you for your continuous support.
I have inserted the code in the header, and this was the output:The proper language attribute: dir="rtl" lang="ar"
If you want, I could give you access to the backend to make things easier? Is there a way to send a pm on WordPress forum?
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Hi bzworkz,
I’m so sorry to keep bothering you with this, but it changed back to the English. ??
I placed it as:add_filter('gettext', function( $tran, $txt, $dom ) { if ( 'Select Category' == $txt && 'lang="ar"'== get_language_attributes()) return '???? ?????'; return $tran; }, 10, 3 );
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Hello bcworkz,
Thank you for your assistance in this.
The if line gave the following error:
'Fatal error: Uncaught Error: Call to undefined function get_language_attribute() in'
When I tried the put the echo code in the header.php, I got this:
Uncaught Error: Call to undefined function get_language_attribute() in wp-content/themes/bb-theme/header.php:49 Stack trace: #0 wp-includes/template.php(730): require_once() #1 wp-includes/template.php(676): load_template('/home/forge/moa...', true, Array) #2 wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #3 wp-content/themes/bb-theme/page.php(1): get_header() #4 wp-includes/template-loader.php(106): include('/home/forge/moa...') #5 wp-blog-header.php(19): require_once('/home/forge/moa...') #6 index.php(17): require('/home/forge/moa...') #7 {main} thrown
Am I doing something wrong?
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Could we add another filter that recognizes the language (html[lang=”ar”]), so that I can set it for both languages (‘select category’ and ‘???? ?????’)?
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’It worked! Thank you so much. Really appreciate it.
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Hello bcworkz,
Thanks for your reply.
The dashboard language is English (set in settings > geenral), however in Polylang I’ve set the default language to Arabic.
I’ll try to reach polylang regarding the locale filter.
Could you explain to me how I approach the gettext filter technique?
Forum: Developing with WordPress
In reply to: Translation for ‘Select Category’Hey t-p,
Thanks for the quick reply!
Are you sure it is connected to the theme? (it’s bb-child-theme)
Because the widget, the category dropdown, is a default wordpress widget, so I’m not sure if the support team from Beaverbuilder can help me in this.