How to change ?lang=cn into /cn/

Set permalink to (Post Name) or http://www.example.com/[blog_name]`/%post_id%/%postname%/` Add following code to functions.php of your theme: add_filter ( ‘alias_rule’, ‘xili_language_trans_slug_qv’ ) ; function xl_permalinks_init () { global $XL_Permalinks_rules; if (class_exists(‘XL_Permalinks_rules’) ) { $XL_Permalinks_rules = new XL_Permalinks_rules (); add_permastruct ( ‘language’, ‘%lang%’, true, 1 ); add_permastruct ( ‘language’, ‘%lang%’, array(‘with_front’ => false) ); } }

Change menu with language?

Solved it with add_meta_box in functions.php. Here is my code: add_action( ‘add_meta_boxes’, ‘my_custom_box’ ); function my_custom_box(){ if ( function_exists(‘add_meta_box’) ) { add_meta_box( ‘page_custom_menu’,’page-menu’, ‘page_custom_menu_box’, ‘page’, ‘side’,’high’); add_meta_box(‘page_custom_menu’,’page-menu’, ‘page_custom_menu_box’, ‘post’, ‘side’, ‘high’); } } function page_custom_menu_box(){ global $post; if ( metadata_exists( ‘post’, $post->ID, ‘page_menu’ ) ) { $menu_id = get_post_meta( $post->ID, ‘page_menu’, true ); } $entries … Read more

One of the messages in .po file doesn’t show up

Looks like you may not be able to just add a pair to your .po file, without first adding it to the wordpress.pot file: http://codex.wordpress.org/Translating_WordPress#gettext_files. You’ll also need to compile your .po file into a .mo (Machine Object) file in order for your changes to take effect. I’m not certain that will work, but it … Read more

How to add just one page in Arabic

@toscho is right about the direction of the text… But as someone who builds websites in hebrew all the time i would reccomend you create a custom page template by putting this tag in a copy of page.php /* Template name: arabic page */ THen you can design it differently… maybe remove the sidebar which … Read more

Change the Search Base in a multi language wordpress

I found the solution. I had to flush rules after I change the search base with the code on the edited question. Here is the final code: $lang = get_bloginfo(“language”); if ( $lang == ‘de-DE’ ) { add_action(‘init’, ‘search_base_german’); function search_base_german() { $search_slug = ‘suche’; // change slug name $GLOBALS[‘wp_rewrite’]->search_base = $search_slug; $GLOBALS[‘wp_rewrite’]->flush_rules(); } }

Integrate post tags in Post Edit page with qTranslate

When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any). In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately after that. Looking at source … Read more