Fahad Alduraibi
Forum Replies Created
-
Forum: Plugins
In reply to: [Comments - wpDiscuz] Mixed language supportThanks, waiting for the new updated version
Forum: Plugins
In reply to: [Comments - wpDiscuz] Mixed language supportHey, me again. So I found the solution to my problem and I created a plugin for it and it works. However, not with your plugin.
So the way the plugin works is that when loading a page and before loading the translations the plugin check the post meta for the language and then tells wordpress to load the correct language. But your plugin loads the translation files at
plugins_loaded
which is too early even wordpress doesn’t do that.To fix that kindly change one line in
class.WpdiscuzCore.php
from:
add_action('plugins_loaded', array(&$this, 'wpdiscuzTextDomain'));
To:
add_action('init', array(&$this, 'wpdiscuzTextDomain'));
and another line in
class.WpdiscuzOptionsSerialized.php
from:
add_action('plugins_loaded', array(&$this, 'initPhrasesOnLoad'), 2126);
To:
add_action('init', array(&$this, 'initPhrasesOnLoad'), 2126);
Read here for more info about why you need to load the translations at
init
and not before:
https://geertdedeckere.be/article/loading-wordpress-language-files-the-right-wayForum: Plugins
In reply to: [Language Field] Plugin not working!Solution for
undefined index
do this:else if( (isset($_GET['reset']) ? $_GET['reset'] : '')==1 ) {
Forum: Plugins
In reply to: [Language Field] Plugin not working!The solution for the
undefined constant
is to quote the array keys as follow:if(isset($_POST['addlflang'])) {
and
} else if($_GET['reset']==1) {
Forum: Plugins
In reply to: [Language Field] Plugin not working!There are so many issues with your plugin, also the code is not following a standard indentation.
Notice: Use of undefined constant addlflang - assumed 'addlflang' in /var/www/html/wordpress/wp-content/plugins/language-field/lf_admin_page.php on line 10 Notice: Use of undefined constant reset - assumed 'reset' in /var/www/html/wordpress/wp-content/plugins/language-field/lf_admin_page.php on line 12 Notice: Undefined index: reset in /var/www/html/wordpress/wp-content/plugins/language-field/lf_admin_page.php on line 12
Forum: Plugins
In reply to: [Language Field] Plugin not working!The problem is with thePostID
It is defined as
the_Post_ID
but then used asthePostID
Here is the original code:
$the_Post_ID = $wp_query->post->ID; $lf_language_code = get_post_meta( $thePostID, '_lf_language_code', true);
The fix:
$the_Post_ID = $wp_query->post->ID; $lf_language_code = get_post_meta( $the_Post_ID, '_lf_language_code', true);
But the other error is still not resolved.
Forum: Plugins
In reply to: [Language Field] Plugin not working!I get these errors from php:
Undefined index: lang in /var/www/html/wordpress/wp-content/plugins/language-field/lf_core_functions.php Undefined variable: thePostID in /var/www/html/wordpress/wp-content/plugins/language-field/lf_core_functions.php
Might be the reason behind it not working.
Forum: Plugins
In reply to: [Comments - wpDiscuz] Mixed language supportAnd that is why WordPress has added the ability to override core functions and also add child-themes, to allow users like me to change things to support their needs without breaking the update process.
I am not the only one who uses wordpress to support multi-language blogs, many people do.
I will figure it out myself.What about the translations, who approves new translations? plugin owners or wordpress translation team?
Forum: Plugins
In reply to: [WP-RTL] Span instead of PSorry but this is from the built in editor and I have no control over it.
Forum: Plugins
In reply to: [Comments - wpDiscuz] WpDiscuz – localisationHi, I am also interested in the support for multi-languages. Currently my blog supports Arabic and English per post.
English is the default, but I use WP “Custom Fields” to add a metadata to indicate that the post is in arabic, so in my child-theme i check for that field and use it to change text direction RTL or LTR and the language of messages.I am only interested in translating the front end, by my backend (dashboard) is in english. And i would love to find an easy way to do it with your plugin.
Forum: Plugins
In reply to: [W3 Total Cache] Minify and file generation@destac, i think you didn’t read my whole post!
Forum: Plugins
In reply to: [WP-RTL] WP 3.9 editor not working with WP-RTL activeit should be fixed now
Forum: Reviews
In reply to: [WP-RTL] works but isn't affecting the post title.This is a limitation with wordpress, the Rich editor is for the body only, you cannot format the title. It can be done by modifying the theme of your blog.
Forum: Fixing WordPress
In reply to: Downgrade to 3.05I just saw this, I knew this is a very old post, but thought i need to reply and be in the loop just in case there is another issue.
I have been using my plugin with no issue with almost all of WP versions 3.x. Most problems that I have seen are caused by other plugins interfering with mine. Since my plugin is very simple in it just re-enable the RTL feature which already comes with the TinyMCE editor.
I have just upgraded my WP to 3.3, tested the RTL buttons and they work fine. I hope you were able to resolve the issue.