WordPress.org

Ready to get started?Download WordPress

Forums

Setting up a dual language website (36 posts)

  1. Chris
    Member
    Posted 2 years ago #

    How can I set up a WordPress website in two languages? I do NOT need nor want a translation plugin. The client will add all text.

    The site will only be 6+ pages and needs 2 buttons in the header, one for English and one for Norwegian. Is it possible to have a different main navigation bar for each language? (using the menus function)

    Also, is there any way of having 2 blog/posts pages (one for each language)?

    Or, can you install WordPress twice (in folders 'English' and 'Norwegian') and then have a simple index/homepage to select which site to visit?

  2. Chris
    Member
    Posted 2 years ago #

    Can anyone help please?

  3. keesiemeijer
    moderator
    Posted 2 years ago #

  4. Chris
    Member
    Posted 2 years ago #

    Is there not a simple way of achieving this without the use of Plugins?

    I do not want a translation Plugin. Both texts will be input by writers in their native languages.

    Is it possible to simply have a different main navigation bar for each language? (using the menus function)

  5. keesiemeijer
    moderator
    Posted 2 years ago #

    I do not want a translation Plugin. Both texts will be input by writers in their native languages.

    Not all off these plugins use automatic translations.

    Did you check out any of these plugins? What didn't you like about any of these plugins?

  6. Chris
    Member
    Posted 2 years ago #

    I haven't tried anything yet. I was hoping to get answers to my very specific questions.

    Thank you

  7. nati1007
    Member
    Posted 2 years ago #

    Or, can you install WordPress twice (in folders 'English' and 'Norwegian')

    I belive you can do it. just instell wordpress in 2 diffrent filles.

  8. keesiemeijer
    moderator
    Posted 2 years ago #

    Try them (why reinvent the wheel).
    These plugins all allow authors to make posts in their native languages: qTranslate, WPML, xili-language, Polylang, Multisite Language Switcher, Multilingual Press.

  9. shirazdrum
    Member
    Posted 2 years ago #

    I haven't tried anything yet. I was hoping to get answers to my very specific questions.

    keesiemeijer did give you an straight answer to your "specific" question. A little effort on your part would reveal that these plugins make the switching of the languages function available for you and they don't necessarily translate your content.

  10. Chris
    Member
    Posted 2 years ago #

    Shirazdrum, I had several questions and do not agree that they have been answered

    (1) Is it possible to have a different main navigation bar for each language? (using the menus function)

    (2) Also, is there any way of having 2 blog/posts pages (one for each language)?

    (3) Or, can you install WordPress twice (in folders 'English' and 'Norwegian') and then have a simple index/homepage to select which site to visit?

    Nati1007 replied to me saying she thought (3) was possible.

    When someone asks for advice, it's not very helpful to just say try all of these and see if one works. There must be many people who have experience of this fairly simple problem. It's OK to say "a little effort on your part" but as we all know it's very easy to screw things up by just fiddling around.

    I appreciate any help. thanks

  11. Tami
    Member
    Posted 2 years ago #

    Hi Chris, I am experiencing the same problem myself.

    Ideally, I would like to know if it is possible to assign 2 different custom menus to the primary location (using the menus function).

    To answer 3) It is possible to install WP twice into different folders but depending on how you do it you will either have 2 separate installs with 2 separate admin logins or you can do a multi-site install. I have attempted the multi-site install with one super admin but am encountering problems and frankly solving the custom navigation seems to be an easier solution – if possible.

    Anyone?

  12. shirazdrum
    Member
    Posted 2 years ago #

    @Chris People here ARE trying to help you, in fact the link that you got was a complete list of different ways of doing it. Help doesn't mean chewing it for you, and then putting it in your mouth. It means someone pointed you in the right direction and the rest of the way was just as easy as picking up a spoon.

    The issue that I see here is that you are doing this for a "client", so:

    a) don't charge people for things you don't know
    b) don't expect other people to do the work for you when you are the one getting paid

    and

    c) when someone tells you something LISTEN.

    If you did, you would find your answer right in front of your eyes:

    Each language in its own WordPress installation
    A separate site is created for each language you want to translate into (e.g. in a WordPress Multisite installation). All the sites need to run the same theme and plugin. When a translation is saved source posts get pinged by translation posts and the system keeps a separate table with the translation relationships.

  13. Chris
    Member
    Posted 2 years ago #

    shirazdrum, I do listen. I am setting this up for someone as a favour. I asked a few clear questions....is that unreasonable? I am not asking anyone to do the work for me, I am asking for good advice before I do anything.

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    Then listen instead of complaining when you don't get the advice you were expecting.

  15. Chris
    Member
    Posted 2 years ago #

    esmi, I am not complaining...I am asking for advice. Tammy M Rogers (above) asks the same thing "is it possible to assign 2 different custom menus to the primary location (using the menus function)"

  16. esmi
    Forum Moderator
    Posted 2 years ago #

    No.

  17. Chris
    Member
    Posted 2 years ago #

    Thank you!

  18. esmi
    Forum Moderator
    Posted 2 years ago #

    Please understand that, on a community site such as this, people don't like just saying "No - you can't" and leaving it at that. They'll usually try very hard to come up with an alternative approach that might suit your needs. That's what the previous posters were trying to do for you.

  19. Chris
    Member
    Posted 2 years ago #

    esmi,

    I have always (see my previous requests) been polite and sometimes I even try and help other users if it is something I do know. I have been thinking how to do this and asked a few questions because there seemed to be a number of possible solutions. I am happy to be pointed in the direction but would have liked answers to my questions. There are probably other users with the same questions. Saying No is fine if it can't be done. Not everybody is as WordPress savvy as you.

    I am sorry if I have upset anybody, I didn't mean to.

  20. esmi
    Forum Moderator
    Posted 2 years ago #

    Not a problem. I just think everyone was a little at cross-purposes on this one. :-)

  21. Tami
    Member
    Posted 2 years ago #

    Hi, if I may chime back in here, I have to say I am very grateful of the help that is offered through forums such as this. I have a certain understanding of web code but often need guidance and clarification when working on projects.

    I had gone through a lot of the various options first mentioned above and they didn't quite suit my needs (which are similar to Chris). I did go through setting up a multisite network but it does seem there should be a more straight forward way. I appreciate your candid answer to my question but I saw a thread regarding menus for logged in users or general public where the primary menu is different depending whether you are logged in or not.

    See response given to that situation:
    <?php if ( is_user_logged_in() ) {
    wp_nav_menu(array( 'container' => '',
    'menu_class' => 'member-menu',
    'menu' => 'Members')
    );

    Is there a way to possibly indicate language specific pages, something like (I just made this up randomly):
    <?php if ( page-id() ) {
    wp_nav_menu(array( 'container' => '',
    'menu_class' => 'english-menu',
    'menu' => 'English')
    );

    Thanks!

  22. esmi
    Forum Moderator
    Posted 2 years ago #

    In theory, that should work but it could be terribly tiresome to keep updating it as the site grew. What might work a little better from a practical pov is to use something like a custom field to indicate a page's language and then base the menu conditional on the value in get_post_meta(). On a bilingual site, you'd still need to add the correct custom field value to at least 50% of your pages & posts but at least you wouldn't have to delve into the code every time you wanted to add a page.

  23. shirazdrum
    Member
    Posted 2 years ago #

    WordPress is just a bunch of php files packaged in a bundle to make your life easier. It's not a magic software, nor is it something extraordinary needing spacial training. php is php, html is html and css is css, however you spin it, they will always be the same in whatever package you put them in.

    Saying that and my point is: you guys need to study how the software you are using work in the first place. Specially if you are doing it "professionally."

    As in php package on your server that you have a set of functions from the get go, WordPress uses pre-defined functions so you don't have to come up with your own, and trying to do what you want is to re-invent the wheel, when you have a fully functioning and elegant wheel at your disposal.

    Multi-language functionality is already offered by this software so use it. (multi-install and language switcher plugin)

    Now if you want to reinvent the wheel, there are more ways that I can count to get what you want. Here are three:

    1. Have a separate install of WP (idiotic)
    2. Have a separate header with added function for another menu (moronic)
    3. Check the page id and display different menu ( This is not even worth calling a name)

  24. in4fun
    Member
    Posted 2 years ago #

    I vote for two seperate wordpress installations as well, using a plugin like "Codestyling Localisation" to modify wordpress and all theme contents in norwegian

    your idea with a front page that lets you select a language before you get to your actual homepage is not seen as an elegant solution nowadays, so you shouldn't consider this option

    use one WP installation for the main language (I guess norwegian) in your root folder and the other in a seperate folder or even a subdomain like en.yourdomain.com if possible

    then you can modify your .htaccess file or use a php script to redirect visitors according to their IP address. So norwegian visitors see your norwegian page and the rest of the world goes straight to your english page.

  25. keesiemeijer
    moderator
    Posted 2 years ago #

    @Tammy M Rogers (and @Chris)
    As the first link in this topic explains: "WordPress does not support a bilingual or multilingual blog out-of-the-box."

    I did go through setting up a multisite network but it does seem there should be a more straight forward way.

    I agree with you, but as it is, setting up a multilingual website is one of the most difficult things to do (whatever software you use). Personally I would go with the multisite network setup (and plugin), but most of the plugins in the first link can probably be tweaked (in your theme) to show a different menu on a specific language. The beauty of the multisite setup is that sites can have their own nav menus and if a plugin is no longer developed (it happens) you can just deactivate it and you still have two (or more) working sites in different languages.

    Did you try one of these plugins (when on multisite)?
    http://wordpress.org/extend/plugins/multisite-language-switcher/
    http://wordpress.org/extend/plugins/multilingual-press/

    What were your problems with the multisite setup?

    Or use the seperate WordPress installs solution mentioned by nati1007, Tammy M Rogers and in4fun.

  26. Tami
    Member
    Posted 2 years ago #

    @keesiemeijer
    I can't access the 2 sub-sites. I get the 404 error when I click on dashboard, new post, etc. I have been going through forums trying to sort that out but in the meantime was contemplating other routes as I'm not sure the multisite will be the solution anyway. Unless, I can select separate custom menus for the primary navigation.

    I did check out both plugins (not in action site as my site's not working) but I don't really need translation. I have all the content already built. What I'd love is to simply have one custom menu (eng) load when it is an English page and the other menu (fre) to load on the French pages. I was thinking I could do that by somehow registering a custom navigation that contingent on some value (as esmi suggested).

    Initially, I did try the separate installs but that didn't seem to work either. I have to manually install via ftp, couldn't run the installation script and the host doesn't think I can do that with the one database. They are not wordpress savvy at all and basically said it can't be done.

    Sorry so wordy.

  27. keesiemeijer
    moderator
    Posted 2 years ago #

    I've tried the Polylang plugin. http://wordpress.org/extend/plugins/polylang/
    As it says on the plugin page "The plugin does not integrate automatic or professional translation." You can even assign a menu to each language in the options page.

    Or you can use this with that plugin to see what the current language is:

    $mylocale = get_bloginfo('language');
    if($mylocale == 'en-US') {
    // show English nav menu
    }
    elseif($mylocale == 'fr-FR'){
    // show French nav menu
    }

    I have to manually install via ftp, couldn't run the installation script and the host doesn't think I can do that with the one database.

    That's correct, for seperate installs you need seperate databases. With multisite you have one database.

  28. AmirHelzer
    Member
    Posted 1 year ago #

    I'd like to clear some terminology and hope that it will help the discussion.

    Individual WordPress Sites

    If you install several individual WordPress sites, one in each directory, or domain, you'll be running the languages completely independent. Some people do that, for example:
    * http://mashable.com/
    * http://fr.mashable.com/

    This is good when the sites are not translated, but contain completely different content, in each language. Mashable has different writers and editors per language and the fr version is run independently.

    Multisite

    You can achieve the same using a multisite install. Each site will server a different language, but they're not connected. Using multisite, you can use different language folders or subdomains. To put content in completely different domains, use a plugin like Domain Mapping:
    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    A multisite install uses one database, but it really works like a set of independent sites. Different sites feel like they're completely separate and translations will not be interlinked.

    Multilingual Plugins

    There are a number of multilingual plugins for WordPress. All these will let you run a multilingual site from a single database. These plugins will not translate for you. You can do the translation, or use a translation service.

    How to Choose

    Different multilingual plugins work in different ways. WPML, which I am responsible for, puts translations in different posts/pages. Other plugins, like qTranslate or Polylang, put all translations in the same post and separate languages using meta tags.

    Of course, everyone will tell you that his approach is best. I'll leave that to you to decide.

    Some plugins are free. WPML costs money. If you're running a business with zero budget, a free solution is great. One of the reasons people like WPML is that we can dedicate so much resources to development, QA and support. From several years of experience, I don't see how this can be possible without revenue.

    I hope that this helps. I'm subscribed to this thread and will try to answer any questions that come up.

  29. Michel - xiligroup dev
    Member
    Posted 1 year ago #

    The responsible of WPML give his advice about multilingual approach...
    As author of xili-language trilogy (since 2008), I will add here small notes or links

    About plugin architectures:
    http://dev.xiligroup.com/?p=2109
    http://dev.xiligroup.com/?p=1961

    Docs in progress : http://wiki.xiligroup.org/

    and a short note - ABC article by a plugin’s developer for the plugin’s day

    http://dev.xiligroup.com/?p=2293

    Michel

  30. Code Metic
    Member
    Posted 1 year ago #

    Sorry for interuption.

    Using this code

    $statuslabels = array(
    'name' => _x( 'Status', 'taxonomy general name', 'contempo' ),
    'singular_name' => _x( 'Status', 'taxonomy singular name', 'contempo' ),
    'search_items' => __( 'Search Statuses', 'contempo' ),
    'popular_items' => __( 'Popular Statuses', 'contempo' ),
    'all_items' => __( 'All Statuses', 'contempo' ),
    'parent_item' => null,
    'parent_item_colon' => null,
    'edit_item' => __( 'Edit Statuses', 'contempo' ),
    'update_item' => __( 'Update Statuses', 'contempo' ),
    'add_new_item' => __( 'Add New Status', 'contempo' ),
    'new_item_name' => __( 'New Status Name', 'contempo' ),
    'separate_items_with_commas' => __( 'Separate Statuses with commas', 'contempo' ),
    'add_or_remove_items' => __( 'Add or remove Status', 'contempo' ),
    'choose_from_most_used' => __( 'Choose from the most used Statuses', 'contempo' )
    );
    register_taxonomy( 'status', 'listings', array(
    'hierarchical' => false,
    'labels' => $statuslabels,
    'show_ui' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'status' ),
    ));

    function status() {
    global $post;
    global $wp_query;
    $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'status', '', ', ', '' ) );
    echo $terms_as_text;
    }

    I successfully registered custom taxonomy in admin->post sidebar.
    However it generates input text.
    Does anyone knows to turn input['text'] from taxonomy box to dropdown selection.

Topic Closed

This topic has been closed to new replies.

About this Topic