Nastavení jiného jazyka pro web (frontend) a jiného pro administraci

User Language Switch
https://wordpress.org/…uage-switch/

Allows backend users to set the language displayed in the back-end and front-end of your site. It also allows to translate pages and posts. Define one language for admin and the other for theme. Don’t define WPLANG in your wp-config.php file.

A nebo:

// setup one language for admin and the other for theme
// must be called before load_theme_textdomain()
function set_my_locale($locale) {

        $locale = ( is_admin() ) ? "cz_CS" : "en_US";
        setlocale(LC_ALL, $local );
        return $locale;

}
add_filter( 'locale', 'set_my_locale' );

Generátor .po souborů, konvertor .mo souborů

This generator will scan PHP file(s) and create .po files, that are used for localization. It will extract all strings wrapped in __("txt", "domain") and _e("txt", "domain") calls.

Strings can be enclosed in either double quotes (") or single quotes(') and with any character encoding.

You can upload a single PHP file or a ZIP file containing multiple files. The scanner will extract strings from all PHP files inside the archive, ignoring other files (like images and stylesheets).

Nástroj pro Konverzi z .mo do .po »

Multisite – vytvoření a migrace

Create A Network

As of WordPress 3.0, you have the ability to create a network of sites by using the multisite feature. This article contains instructions for creating a multisite network.

A multisite network is a collection of sites that all share the same WordPress installation. They can also share plugins and themes. The individual sites in the network are virtual sites in the sense that they do not have their own directories on your server, although they do have separate directories for media uploads within the shared installation, and they do have separate tables in the database.

http://codex.wordpress.org/…te_A_Network

Understanding WordPress Multisite, a conceptual introduction
http://wpcandy.com/…ss-multisite

Migrating Multiple Blogs into WordPress 3.0 Multisite

This tutorial explains how to migrate multiple WordPress installations into one new WordPress multisite. You can migrate sites that are using their own domain, as well as sites using a subdomain on your main domain.

http://codex.wordpress.org/….0_Multisite

Move an Existing Blog into WordPress Multi-Site
http://shibashake.com/…s-multi-site

Comprehensive WordPress Multisite Migrations
http://iandunn.name/…-migrations/

Setup A WordPress Multisite
http://www.paulund.co.uk/…ss-multisite

Správa několika webů nebo jazykových verzí v multisite instalaci

With multisite installation you can set up multiple blogs that share the same WordPress files, DB, plugins, themes.

Protože WPML plugin pro jazykové verze webů je nadále už k dispozici jen v komerční verzi, a u starších verzí WPML na posledních verzích WordPressu jsme zaznamenali problémy (např. zdvojování části URL), hodí se multisite instalace velmi dobře například jako náhrada WPML pro provoz jazykových verzí.
Použito (mj.) na webu opavské jazykové školy Primalingua.

To wp-config.php file add line:

define('WP_ALLOW_MULTISITE', true);

In your Tools menu in the left sidebar, you’ll now see the Network Setup item. Click on that and then go to Create a Network of WordPress Sites. Follow the directions and choose a few options such as the URL structure and network name.

You’ll then be prompted to make a blogs.dir directory in /wp-content and it will provide several more lines of code to add to the wp-config.php file.

It will also tell you to add some rules to .htaccess, a server text file used to work with permissions and configurations for each directory.

When you log into the Network Admin, you’ll now see a My Sites item, where you can manage all the network sites. Hover over that, and under “Network Admin”, there will be several administration items. When you click on Sites, you can add new sites with the click of a button!

A WP network can manage any number of sites on different domains, sub-domains or paths. However, they must all reside on the same server.

Klonování existujícího webu v síti

  • zazálohovat celou db
  • založit skrz networkmanagera nový site
  • zjistit prefixy tabulek té nové verze (wp_n+1)
  • dumpnout databázi stávající verze (wp_n)
  • nahradit v dumpu prefixy (wp_n > wp_n+1), ev. url (example.old > example.new)
  • smazat tabulky nově vytvořené verze (wp_n+1)
  • naimportovat replácnuté a přejmenované tabulky (wp_n+1)
  • změnit siteurl ve wp_n+1_options na nové
  • změnit nastavení jazyka (resp. siteurl) ve wp-admin/network/si­tes.php
  • přiřadit nové verzi existující adminy

a nebo - pohodlněji - s pomocí pluginu:

NS Cloner - Site Copier
https://wordpress.org/…site-copier/

The NS Cloner saves multisite admins LOTS of time by enabling them to clone existing sites in their network to a completely new site in a few seconds.

Související:

WordPress MU Domain Mapping

This plugin allows users of a WordPress MU site or WordPress 3.0 network to map their blog/site to another domain.

How to Get More From WordPress With Multisite Blogs (Network Install) »

WordPress Multisite Without a Domain Mapping Plugin

You don’t need to use the domain mapping plugin if you are planning on running a WordPress Multisite with top-level domains and/or sudomains. WordPress allows you to change the domain from a sub-domain to a top level domain once you have added the site.

The only important thing is to set the COOKIE_DOMAIN to an empty string in your wp-config.php:

define('COOKIE_DOMAIN', '');

Otherwise WordPress will always set it to your network’s $current_site->domain and you won’t be able to login into any of the other sites.

Zdroj »

Vícejazyčný web

WPML Multilingual CMS
http://wpml.org/

Jednoznačný mercedes mezi jazykovými pluginy, opakovaně osvědčený (např. na JetíkoviNovatopu.

Multilingual WordPress

WPML makes multilingual content management easy, just like running a site in one language.

Multilingual Features

  • Turns a single WordPress install into a multilingual site.
  • Built-in theme localization without .mo files.
  • Comments translation allows you to moderate and reply to comments in your own language.
  • Professional translation, connecting expert translators with site owners (optional, you can translate yourself for free).

CMS Navigation Features

  • Includes CMS navigation elements for drop down menus, breadcrumbs trail and sidebar navigation.
  • Robust links to posts and pages that never break.

Architecture (for geeks)

  • Translations are grouped together and not mixed in the database.
  • CMS navigation elements provide accurate and easy to use site-wide navigation.
  • Simple CSS for easy customization. Try WPML's CSS customization tool.

!!! Při potřebě přebírat stávající obsah (custom fields, galerie) popis řešení zde .

Alternativy:

Polylang
http://wordpress.org/…ns/polylang/

You write posts, pages and create categories and post tags as usual, and then define the language for each of them. The translation is optional. You can have as many languages as you want. You can translate posts, pages, media, categories, post tags, menus, widgets... Custom post types, custom taxonomies, sticky posts and post formats, RSS feeds and all default WordPress widgets are supported.

How to use »

xLanguage
http://wordpress.org/…s/xlanguage/

xLanguage is a full featured plugin allows you to blog in different language, and allows user to select which version to read. It works for blog post, page, tags, categories. The user language preferences will also select the right theme and plugins MO files.

Customization is the No. 1 design goal, after all that's probably the reason why you want to setup a multilingual blog. The language configuration combination is highly customizable to facilitate multiple fallbacks. Every UI is extracted out, which could be optionally overridden by theme design without touching the plugin file at all.

qTranslate
http://wordpress.org/…/qtranslate/
http://www.qianqin.de/qtranslate/

qTranslate supports infinite languages, which can be easily added/modified/de­leted via the comfortable Configuration Page. All you need to do is activate the plugin and start writing the content!

qTranslate Plus
https://wordpress.org/…ranslate-xp/

qTranslate Plus is an unOfficial modified version of qTranslate (created by Qian Qin) created to be compatible with WordPress 3.9 or highter.

ZdMultiLang
http://wordpress.org/…zdmultilang/

  • Translate posts ang pages
  • Translate categories and tags
  • Switch blog language
  • Widget to change currently viewed language

Bogo
http://wordpress.org/…lugins/bogo/
http://ideasilo.wordpress.com/bogo/

Bogo is a straight-forward multilingual plugin for WordPress. Assigns one language per post. Bogo does not create any additional custom table on your database, unlike some other plugins in this category. This design makes Bogo a solid, reliable and conflict-free multilingual plugin.

For custom post types add to function.php

function my_localizable_post_types($localizable) {
$localizable = array('post', 'page', 'mycustom_post');
return $localizable;
}
add_filter('bogo_localizable_post_types', 'my_localizable_post_types', 10, 1);

For your own language switcher in header.php:

$uri = $_SERVER["REQUEST_URI"];
$uri_array = split("/", $uri);
$uri_first = $uri_array[1];
$odkaz = ($uri_first == 'en') ? '<a href="..." title="Česky"><img src="cs.png"></a>' : '<a href="..." title="English"><img src="en.png"></a>';
echo $odkaz;

Transposh
http://wordpress.org/…r-wordpress/

Transposh translation filter for WordPress offers a unique approach to blog translation. It allows your blog to combine automatic translation with human translation aided by your users with an easy to use in-context interface.

xili-language
https://wordpress.org/…li-language/

xili-language provides for a bilingual (or multilingual) website an automatic selection of language (.mo) in theme according to the language of current post(s) or page. Theme's behaviour can be fully personalized through settings, hooks and api.

Multisite Language Switcher
https://wordpress.org/…ge-switcher/

A simple, powerful and easy to use plugin that will add multilingual support to a WordPress multisite installation, i.e. multiple subdomains or folders (if you need to set up multiple sites across multiple domains, you'll also want to use the WordPress MU Domain Mapping plugin as well - as long as the domains are all hosted on the same server).