Multiple install for multilanguage. How to?
I would go for /en/ in order to prevent future issues and keep isolated the content that is not localizable. From my knowledge WPML does not support this yet.
I would go for /en/ in order to prevent future issues and keep isolated the content that is not localizable. From my knowledge WPML does not support this yet.
Ok, now that you know your final goal I can try to answer : first , A little background for other people who will read this and might wonder why this question exists (because it can help also in other cases ) the function get_page_by_title() does exactly what the name say . But qTarnslate , … Read more
get_bloginfo returns strings so this works fine: <?php $language = get_bloginfo( ‘language’ ); if(language == ‘en-US’) the_time(‘jS F Y’); else the_time(‘d/m/Y’); ?>
No, it doesn’t work that way. Taxonomy terms and posts are in a n:n relation: each term may be assigned to multiple posts and each post to multiple terms. But you probably want to set just one main language per post – taxonomies are the wrong tool for that. Use post meta data or a … Read more
Thanks to @Milo on the comments, I’m gonna post my answer: Firstly I added this rule: add_rewrite_rule( “en/artist/([^/]+)/?”, ‘index.php?pagename=post_type=artist&artist=$matches[1]&gal_template=en’, “top”); Then this filter: add_filter( ‘query_vars’, ‘gal_query_vars’ ); function gal_query_vars( $query_vars ) { $query_vars[] = ‘gal_template’; return $query_vars; } Finally, I filtered the single template: add_filter( ‘single_template’, ‘get_custom_post_type_template’ ); function get_custom_post_type_template($single_template) { global $post; if ($post->post_type … Read more
You have to use a static page in this case: Settings -> General -> Fron Page Display: A static Page
I just found this which I applied and works perfectly: If you have your blogs installed in subdirectories you could use this solution: if (strpos($_SERVER[‘REQUEST_URI’], ‘/enblog’) === 0) { define (‘WPLANG’, ‘en_US’); } else { define (‘WPLANG’, ‘pl_PL’); } … and so on. Good luck!
If your just looking for a way for your site to be viewed in other languages I would defiantly recommend using Google Translate Tools. I just add it to the theme: <div id=”google_translate_element”><span id=”trans”>Translate: </span></div> You can hide the Google Logo and funky colors in your css: .goog-logo-link{display:none;} Instead of calling the Google Translate js … Read more
I think and use the way about an WP Multisite install, see my answer, background, information and benefit on a older question.
This is untested, but I think you can just define wp_handle_upload_error in your functions.php file and return custom error messages. If you look at where that function is defined in that file, if ( ! function_exists( ‘wp_handle_upload_error’ ) ) { function wp_handle_upload_error( &$file, $message ) { return array( ‘error’=>$message ); } } You can see … Read more