m.qamaruddin
Forum Replies Created
-
Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!I have been going through the source code of the WordPress :
You see, even though I enforced the blog locale as mentioned above, it gets overriden here :
function load_theme_textdomain( $domain, $path = false ) { $locale = apply_filters( 'theme_locale', get_locale(), $domain ); if ( ! $path ) $path = get_template_directory(); // Load the textdomain from the Theme provided location, or theme directory first $mofile = "{$path}/{$locale}.mo"; if ( $loaded = load_textdomain($domain, $mofile) ) return $loaded; // Else, load textdomain from the Language directory $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo"; return load_textdomain($domain, $mofile); }The locale is still not popularized with multipress locale or wplang or which is used to do the job?
Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!I used this, and it worked to load the text domain, but it is still not solving the main problem which is that for example the plugin did not set the language automatically and loaded rtl.css in case of Arabic.
$locale = get_site_option(‘inpsyde_multilingual’);
var_dump($locale[get_current_blog_id()]);Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!Is this any close? $result = $wpdb->update( $wpdb->sitemeta, array( ‘meta_value’ => $value ), array( ‘site_id’ => $wpdb->siteid, ‘meta_key’ => $option ) );
By the way, I want the most standard and clean way.
Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!I found this snippet in source code :
if ( ” != $data[ ‘inpsyde_multilingual_lang’ ] || ” != $data[ ‘inpsyde_multilingual’ ] ) {
if ( ! is_array( $siteoption ) )
$siteoption = array( );$siteoption[ $current_blog_id ] = array(
‘text’ => esc_attr( $data[ ‘inpsyde_multilingual_text’ ] ),
‘lang’ => esc_attr( $data[ ‘inpsyde_multilingual_lang’ ] )
);
}
update_site_option( ‘inpsyde_multilingual’, $siteoption );Will it help to use this value to get the current locale? blog language?
Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!I have done this, but still not helping :
if (!function_exists(‘mq_load_theme_translation’)) {
function mq_load_theme_translation() {
// Retrieve the directory for the localization files
$lang_dir = WP_LANG_DIR . ‘/’ . get_locale() . ‘/sunjoytravel’;// Set the theme’s text domain using the unique identifier from above
load_theme_textdomain(‘sunjoytravel’, $lang_dir);
}// end custom_theme_setup
}
add_action(‘after_setup_theme’, ‘mq_load_theme_translation’);Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!I have tried get_locale, and I am still only getting en_US always
echo ‘local:>>’;
var_dump(get_locale());
exit;Forum: Plugins
In reply to: [MultilingualPress] Exact New Language Installation Process!I add a question here, because I noted that multipress did not change teh WP_LANG constant on any of the blogs, even though I set the language correctly in the “network admin”.
Any help is highly appreciated.
Forum: Plugins
In reply to: [Marekkis Watermark-Plugin] How to change the watermark png image?Hello Marekki,
Thank you for the reply.
If I may suggest, but would you like to allow the image to be inserted via the WordPress built-in image / media library uploader?
Thanks!
Forum: Plugins
In reply to: [MultilingualPress] Custom URL for Posts Listing in Multiple LanguagesHello Robert,
Thanks for clarifying it. I guess I will follow either of the two option.
Regards,
Qamar-ud-DinForum: Plugins
In reply to: [MultilingualPress] Custom URL for Posts Listing in Multiple LanguagesI just want to make it clearer; This is what I am asking about :
http://codex.ww.wp.xz.cn/Function_Reference/get_post_type_archive_link
The function returns the archive link for the custom post type, but does MultilingualPress plugin hook to this function to return the translated URLhttp://mysite.com/movies [en]
http://mysite.com/filmen [de]
http://mysite.com/aflam [ar]Different URLs for same post type archive page but in all different languages?