• Hi,

    Basically i need to make a multilingual web site, a site that offers information in multiple language. It have language choices (not automatic), and once the user chooses a language, the whole site would be in that language (preferably with cookies). Any ideas how to do that and how to manage contents?

    I’m going to enter the translations myself, so no need to automatic-translations.

    Appreciate your help

Viewing 9 replies - 1 through 9 (of 9 total)
  • Is it (or will it be) a WP powered site?
    This is all what I know about multilingual blogging… and not much news since then:
    https://crosscultural.transycan.net/blog/archives/2005/06/03/multilingual-blogging/

    Yeah, I’ve done this for clients before. I’ve never done it with a blog before, though – just static pages. So I can’t tell you quite how to implement it with WordPress (I don’t know if you want comments enabled or what you’re going after in the design phase of the whole thing) – if there were more details I might ba able to. but I *do* know you’re looking at a *lot* of work. You at least understand that you’ll have to translate each post yourself – and that’s good (most clients don’t understand why that has to happen!), so you’re aware of the work involved.

    The good thing is that WordPress is PHP-based, and there are plenty of PHP scripts that can assist you with the whole “language-swapping” issue and setting cookies. I’m no PHP guru by any means, but I have done it before. What I’ve had to do (and like I said – this is on static sites, so working it in with WordPress is another matter) is #1 – be sure your header character encoding can change based on the cookie that is set by the end user.

    For exmaple, most headers begin with something like so:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">

    See that last line? That says “this site’s default language is English”…you’ll have to use PHP to alter that line from “xml:lang=”en” to “xml:lang:de” (for Dutch) or “xml:lang:es” (for Spanish), for example.

    You’ll probably need to have the character encoding change, as well, so that special characters can be displayed when the cookie sets the alternate site.

    You’ll want a button or text link at the top of your page, offering the translated text/altered site (and this is also what will set the cookie for the language choice). I’ll have to dig through old client’s files to find you a script, but you can google for one, as well – there’s plenty of freebies out there that can be used to do what you need to do.

    Hope that gets you started!

    Well, with WP it can be simpler and/or more complicated.
    Anyway, despite what she said above: don’t touch the WP file’s head before you decide in which way you go.
    Do you want ONE single blog that can switch from one language to another?
    Or, do you want “mirroring” blogs in different languages?
    (like example.com/en
    example.com/es
    example.com/hu etc.)
    Depending on the apprach you will have to take a different route.

    “you’ll have to use PHP to alter that line from “xml:lang=”en” to “xml:lang:de” (for Dutch) or “xml:lang:es” (for Spanish)”

    Right on the money, except that “de” is German, not Dutch. It might look like I’m just nitpicking but I thought it’s important to clarify.

    Deutsch vs. Dutch ??

    Thread Starter misterm

    (@misterm)

    My site is WordPress powered and consists of static pages only, no blog. And yes, i’d want “mirroring” pages (if that’s what it’s called) so that example.com/some-page/ is my page in english and example.com/some-page/sp or example.com/sp/some-page is my page in spanish (for example).

    Sorry about the “de” thing – I *did* mean “deutch”, which *is* German…brainfart there.

    But, as I said, I’m not an expert in doing these things via wordpress – I’ve only done them with static pages that I’ve created for clients. I figured there’d be an easier way via WordPress – but in the end, hopefully what I’ve shared has helped get you started ??

    By the way, here’s an excellent article on “switching” via PHP. Yes, it’s mainly for switching stylesheets, but it can be easily modified to swap out pages instead of stylesheets.

    Hope it helps!

    Hi,

    I’m currently building a bilingual wordpress blog (designed so it could be multilingual). I’ve nearly finished the wordpress customisation that’s needed to translate everything. It’s not a huge amount of work, but it is very fiddley. There is no simple plugin that could allow you to translate your entire blog. As well as installing plugins, you also have to change the core code.

    The link above from moshu is quite old now, and there have been some developments. In particular, the plugin called polyglot has been developed further, and it now does nearly all of the work that is necessary. There are a few others in development, including one called Gengo, which looks very promising, but none of the plugins can fully translate your blog, because there are limitations in wordpress itself. Also, last time i checked last november/december, many of the available wordpress themes needed a bit of work to make them fully internationalised. Nonetheless, polyglot does work very nicely, and one particularly good feature is that it detects the Accept-Language header in the HTTP request. This means that if a visitor’s browser is set to prefer a particular language, and there is a translation available, then the blog will automatically respond by providing the page in that language. If you’re using a good browser you can edit this setting, which can be set to a list of languages in decreasing preference. Oh, and once a language has been selected it does use cookies to keep track.

    avibrazil

    (@avibrazil)

    I want a very simple thing: to have WP automatically select a .mo file (the one that contain common word/phrases as ‘filed under’, ‘archives’, ‘categories’, etc) based on the language configured in the visitor browser, send by HTTP.

    This will make my pt_BR posts at least browseable to foreign visitors, and help them find the other en_US posts I have.

    No cookies, no automatic redirection based on language, and no page auto-translation cause I don’t trust these machine translators.

    This is so damn simple that I expected WP to support it out of the box, without the need of any plugin. Is there any plan for 2.1 ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Multilingual Website’ is closed to new replies.