Hey,
i have a http://www.my.com website and i need it in multiple languages. How would you automate the creation and duplication of entire website inside a
spanish.my.com subdomain so that my translator can login and find an ideantical website (same my.com template, plugins, mods.. etc) ready for him to substitute old post texts with his language ones? I'll have to do this for many languages, that's why i want to setup an automated system.
lets imagine you have wpmu set up; a blog at english.my.com and another in spanish.my.com.
now, the english.my.com has content, posts and pages. So far so good.
what you can then do is one of two things:
one - copy the DB wp_#_tablename from the english blog to the new one (a bit complicated if like me you don't master SQL)
two - use the import feature that comes with wordpress to inject the new content in the spanish blog.
does this make sense?
yep, that's what i would do "manually". I'm needing a way to automatize this process on each new language-blog creation, do you think it's possible?
If you can programme, yes.
I would create a php script to automate the first procedure (if I could code in that level).
but lets face it, the manual procedure isn't all that difficult. Once you have the file with all the content from the original blog, all you need is to upload it.
cafespain
Member
Posted 15 years ago #
A "Plugin" approach would need to have a list of "sub language blogs" and the "main blog" and could then hook into the post_save action and "copy" the post details to the "sub language blogs" automatically when a post is created.
If you check the $post->status to make sure it's a publish or future post then you can avoid transferring drafts. You would have to make sure you are only transferring once per post though otherwise your spanish/french staff would be a bit annoyed if you overwrite their translations because you fixed a "teh".