Lokalizace bez externího editoru .po souborů

**Codestyling Localization**
„http://wordpress.org/plugins/codestyling-localization/“:http://wordpress.org/plugins/codestyling-localization/

You can manage and edit all gettext translation files (*.po/*.mo) directly out of WordPress Admin Center without any need of an external editor.

Viz též „Jak přeložit plugin nebo šablonu pro WordPress »“:http://www.janbien.cz/blog/wordpress-lokalizace/

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

**User Language Switch**
„https://wordpress.org/plugins/user-language-switch/“:https://wordpress.org/plugins/user-language-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:

/—code php
// 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“:http://www.icanlocalize.com/tools/php_scanner 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 »“:http://tools.konstruktors.com/

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/Create_A_Network“:http://codex.wordpress.org/Create_A_Network

**Understanding WordPress Multisite, a conceptual introduction**
„http://wpcandy.com/presents/an-introduction-to-wordpress-multisite“:http://wpcandy.com/presents/an-introduction-to-wordpress-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/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite“:http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite

**Move an Existing Blog into WordPress Multi-Site**
„http://shibashake.com/wordpress-theme/move-an-existing-blog-into-wordpress-multi-site“:http://shibashake.com/wordpress-theme/move-an-existing-blog-into-wordpress-multi-site

**Comprehensive WordPress Multisite Migrations**
„http://iandunn.name/comprehensive-wordpress-multisite-migrations/“:http://iandunn.name/comprehensive-wordpress-multisite-migrations/

**Setup A WordPress Multisite**
„http://www.paulund.co.uk/setup-wordpress-multisite“:http://www.paulund.co.uk/setup-wordpress-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“:https://wordpresso.ovx.cz/vicejazycny-web/ 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“:http://www.primalingua.cz/.

To wp-config.php file add line:

/—code php
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/sites.php
– přiřadit nové verzi existující adminy

*a nebo – pohodlněji – s pomocí pluginu:*

**NS Cloner – Site Copier**
„https://wordpress.org/plugins/ns-cloner-site-copier/“:https://wordpress.org/plugins/ns-cloner-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“:http://wordpress.org/extend/plugins/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) »“:http://www.1stwebdesigner.com/tutorials/wordpress-multisite-blogs/

**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.

[* http://konstruktors.com/wp-content/uploads/2013/02/wordpress-multisite-top-level-domains-500×353.png *]

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

/—code 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 »“:http://konstruktors.com/blog/wordpress/4510-wordpress-multisite-without-domain-mapping/

Vícejazyčný web

**WPML Multilingual CMS**
„http://wpml.org/“:https://wordpresso.ovx.cz/wp-wpml.php

Jednoznačný mercedes mezi jazykovými pluginy, opakovaně osvědčený (např. na „Jetíkovi“:http://www.jetik.info a „Novatopu“:http://novatop-system.cz/.

Multilingual WordPress

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

[* http://wpml.org/wp-content/uploads/2009/11/translation_controls.jpg *]

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“:http://wpml.org/?page_id=909.

!!! Při potřebě přebírat stávající obsah (custom fields, galerie) „popis řešení zde“:http://wpml.org/2009/09/creating-a-multilingual-product-catalog/ .

*Alternativy:*

**Polylang**
„http://wordpress.org/extend/plugins/polylang/“:http://wordpress.org/extend/plugins/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 »“:http://www.sitepoint.com/multilingual-wordpress-websites-with-polylang/

**xLanguage**
„http://wordpress.org/extend/plugins/xlanguage/“:http://wordpress.org/extend/plugins/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/extend/plugins/qtranslate/“:http://wordpress.org/extend/plugins/qtranslate/
„http://www.qianqin.de/qtranslate/“:http://www.qianqin.de/qtranslate/

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

[* http://www.qianqin.de/wp-content/uploads/2008/02/screenshot-1.png *]

**qTranslate Plus**
„https://wordpress.org/plugins/qtranslate-xp/“:https://wordpress.org/plugins/qtranslate-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/extend/plugins/zdmultilang/“:http://wordpress.org/extend/plugins/zdmultilang/

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

**Bogo**
„http://wordpress.org/extend/plugins/bogo/“:http://wordpress.org/extend/plugins/bogo/
„http://ideasilo.wordpress.com/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

/—code 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:

/—code php
$uri = $_SERVER[„REQUEST_URI“];
$uri_array = split(„/“, $uri);
$uri_first = $uri_array[1];
$odkaz = ($uri_first == ‚en‘) ? ‚‚ : ‚‚;
echo $odkaz;
\—

**Transposh**
„http://wordpress.org/plugins/transposh-translation-filter-for-wordpress/“:http://wordpress.org/plugins/transposh-translation-filter-for-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/plugins/xili-language/“:https://wordpress.org/plugins/xili-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/plugins/multisite-language-switcher/“:https://wordpress.org/plugins/multisite-language-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“:http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/ as well – as long as the domains are all hosted on the same server).