{"id":3120,"date":"2017-09-15T08:07:47","date_gmt":"2017-09-15T08:07:47","guid":{"rendered":"https:\/\/ombra.pikarthouse.com\/documentation\/?page_id=3120"},"modified":"2018-03-20T14:23:31","modified_gmt":"2018-03-20T14:23:31","slug":"multilingual","status":"publish","type":"page","link":"https:\/\/ombra.pikarthouse.com\/documentation\/miscellaneous\/multilingual\/","title":{"rendered":"Multilingual"},"content":{"rendered":"<div class=\"pikode pikode--cols cols \" style=\"margin-left: -36px;\" ><div class=\"pikode--column pikode--column--8\" style=\"border-left-width: 36px;\"><p>We strived to make OMBRA international to help you customizing your site as quickly as possible.<\/p>\n<p>That is why the theme comes with MO &amp; PO files included \u2014 where you can get translations for both the Admin Dashboard and the site itself \u2014 and compatibility with well-known <a href=\"https:\/\/wpml.org\/\" target=\"_blank\" rel=\"noopener\">WPML plugin<\/a>.<\/p><\/div><div class=\"pikode--column pikode--column--4\" style=\"border-left-width: 36px;\">\n<div \t\tclass=\"pikode pikode--row  summary-box\" style=\"padding: 0px 0px 36px 0px; margin: 0px -36px 0px 0px;\" >\n\t<div class=\"pikode--row__wrapper pikode--row--height-auto\"  >\n\t\t<div class=\"pikode--row-inner\">\n\n\t\t\t\n\t\t\t\t<div class=\"pikode--row__background\">\n\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"color-overlay\" style=\"opacity: 1; background-color: #4b917d;\" ><\/div>\n\t\t\t\t\t\n\t\t\t\t<\/div>\n\n\t\t\t\n\t\t\t<div class=\"pikode--row__content pikode--row__content--skin-light\"\n\t\t\t\tstyle=\"vertical-align: middle;\" >\n\n\t\t\t\t<div class=\"pikode--row__content__wrapper pikode--row__content--center\"  >\n\t\t\t\t\t<div class=\"pikode--row__content-inner pikode--row--width-auto\" style=\"padding: 0px 30px 0px 30px;\" >\n\t\t\t\t\t\t<div class=\"pikode pikode--custom-content  custom-content--28\" style=\"font-weight: 700; line-height: 1.0; text-decoration: none; color: #ffffff; padding: 36px 0px 0px 0px;\"><p>Summary<\/p><\/div>\n<p><a href=\"#localization\">Localization<\/a><br \/>\n<a href=\"#wpml\">WPML Plugin<\/a><\/p>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div>\n<\/div><\/div>\n\n<div id=\"localization\"\t\tclass=\"pikode pikode--row \"  >\n\t<div class=\"pikode--row__wrapper pikode--row--height-auto\"  >\n\t\t<div class=\"pikode--row-inner\">\n\n\t\t\t\n\t\t\t<div class=\"pikode--row__content pikode--row__content--skin-none\"\n\t\t\t\tstyle=\"vertical-align: middle;\" >\n\n\t\t\t\t<div class=\"pikode--row__content__wrapper pikode--row__content--center\"  >\n\t\t\t\t\t<div class=\"pikode--row__content-inner pikode--row--width-auto\"  >\n\t\t\t\t\t\t<div class=\"pikode pikode--custom-content  custom-content--28\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: none; color: #4b917d; padding: 24px 0px 0px 0px;\"><p>Localization<\/p><\/div>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n<p><a href=\"https:\/\/developer.wordpress.org\/themes\/functionality\/localization\/\" target=\"_blank\" rel=\"noopener\">Localization<\/a> describes the subsequent process of translating an internationalized theme like OMBRA theme is.\u00a0To find out more about installing languages on WordPress, <em>please see the <a href=\"https:\/\/codex.wordpress.org\/Installing_WordPress_in_Your_Language\" target=\"_blank\" rel=\"noopener\"><strong>link<\/strong><\/a><\/em>.<\/p>\n<p>So, in case you want to translate Ombra to another language, different from those already coming with theme <em>(French, Portuguese, Spanish)<\/em>, you should use a <em>child-theme<\/em>\u00a0and follow the next steps:<\/p>\n<ul>\n<li>Go to <strong>\/languages\/<\/strong> directory located in theme folder \u2014 you will see there the files related to translations \u2014<em>\u00a0.mo and .po files<\/em> \u2013 and find <em>ombra.pot<\/em><\/li>\n<li>Copy <em>ombra.pot\u00a0<\/em>file, then go to <em>ombra-child<\/em> folder, create\u00a0<strong>\/languages\/\u00a0<\/strong>directory and paste there <em>ombra.pot<\/em> file<\/li>\n<li>Rename both the name of file \u2014 according to your desired language (for example, from <strong><em>ombra\u00a0<\/em><\/strong>to <em><strong>es_ES<\/strong><\/em>) \u2014 and its extension (from <strong><em>pot<\/em><\/strong> to <strong><em>po<\/em><\/strong>).\u00a0<em><strong>The name of your .po and .mo files has the form ll_CC.<\/strong><\/em> Here ll is an ISO 639 two-letter language code, and CC is an ISO 3166 two-letter country code. For example, for German in Germany, ll is de, and CC is DE. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, de<em>_AT<\/em> is used for Austria, and <em>pt_BR<\/em> for Brazil. The country code serves to distinguish the dialects. <em>Read more about <a href=\"https:\/\/www.gnu.org\/software\/gettext\/manual\/html_node\/Language-Codes.html\" target=\"_blank\" rel=\"noopener\"><strong>Languages Codes<\/strong><\/a> and <a href=\"https:\/\/www.gnu.org\/software\/gettext\/manual\/html_node\/Country-Codes.html\" target=\"_blank\" rel=\"noopener\"><strong>Country Codes<\/strong><\/a>.<\/em><\/li>\n<li>Open the new renamed file with <a href=\"https:\/\/poedit.net\/\" target=\"_blank\" rel=\"noopener\"><strong><em>Poedit<\/em><\/strong><\/a> <em>(free software that you need to install in order to easily edit .mo and .po\u00a0<\/em><em>files)<\/em> and you will see the list of all English phrases \u2013 you need to translate in your desired language \u2013 on the left side, and all the translations \u2013 if present \u2013 on the right side. In order to translate, left-click on the English phrase and you will see at the bottom of the window two boxes: the first one \u2013 with English phrase \u2013 and the second one \u2013 initially empty \u2013 the place you should enter the translation for your language. Make all your translations by this way.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3141\" src=\"https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Poedit.jpg\" alt=\"\" width=\"751\" height=\"563\" srcset=\"https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Poedit.jpg 1000w, https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Poedit-300x225.jpg 300w, https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Poedit-768x576.jpg 768w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><\/p>\n<ul>\n<li>Hit <strong><em>Save button<\/em><\/strong> and, right in that moment, you will automatically create the .mo file for your language.<\/li>\n<li>Go to <em>child-theme<\/em> folder, find\u00a0<em>functions.php<\/em> file, open it and paste there\u00a0\u2014 <strong><em>right below<\/em><\/strong> the existing code in the file\u00a0\u2014 the following lines:<\/li>\n<\/ul>\n\n<div id=\"child-theme-translation-function\"\t\tclass=\"pikode pikode--row \" style=\"margin: 0px 0px 0px 36px;\" >\n\t<div class=\"pikode--row__wrapper pikode--row--height-auto\"  >\n\t\t<div class=\"pikode--row-inner\">\n\n\t\t\t\n\t\t\t<div class=\"pikode--row__content pikode--row__content--skin-none\"\n\t\t\t\tstyle=\"vertical-align: middle;\" >\n\n\t\t\t\t<div class=\"pikode--row__content__wrapper pikode--row__content--center\"  >\n\t\t\t\t\t<div class=\"pikode--row__content-inner pikode--row--width-auto\"  >\n\t\t\t\t\t\t<pre>add_action( 'after_setup_theme', function () {\r\n   load_child_theme_textdomain( 'ombra', get_stylesheet_directory() . '\/languages' );\r\n} );<\/pre>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n<ul>\n<li>Save <em>functions.php<\/em> file and close it.<\/li>\n<li>Compress your child-theme folder as a <em><strong>ZIP file<\/strong><\/em> and upload it to your WordPress Dashboard.<\/li>\n<li>In WordPress Dashboard, navigate to <em>Settings \u2192\u00a0General<\/em>, choose your language from Site Language box and click on <em>Save Changes<\/em>. Also, you may need to go to <em>Users<\/em>\u00a0<em>\u2192 Your Profile,\u00a0<\/em>find <em>Language<\/em> field, choose your language and click on <em>Update Profile<\/em>. That&#8217;s it!<\/li>\n<\/ul>\n\n<div id=\"wpml\"\t\tclass=\"pikode pikode--row \"  >\n\t<div class=\"pikode--row__wrapper pikode--row--height-auto\"  >\n\t\t<div class=\"pikode--row-inner\">\n\n\t\t\t\n\t\t\t<div class=\"pikode--row__content pikode--row__content--skin-none\"\n\t\t\t\tstyle=\"vertical-align: middle;\" >\n\n\t\t\t\t<div class=\"pikode--row__content__wrapper pikode--row__content--center\"  >\n\t\t\t\t\t<div class=\"pikode--row__content-inner pikode--row--width-auto\"  >\n\t\t\t\t\t\t<div class=\"pikode pikode--custom-content  custom-content--28\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: none; color: #4b917d; padding: 24px 0px 0px 0px;\"><p>WPML Plugin<\/p><\/div>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t<\/div>\n\n\t\t<\/div>\n\t<\/div>\n<\/div>\n\n<p>OMBRA empowers you to translate all the theme elements effortlessly with WPML plugin integration. <strong>WPML is a premium plugin, that\u00a0is not included\u00a0<\/strong>in theme package, and is well documented by their own developers.<\/p>\n<p>For a better understanding of WPML plugin, initially, you should follow the <em><a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/\" target=\"_blank\" rel=\"noopener\">Getting Started Guide<\/a>\u00a0<\/em>that will help you in setting up WPML in a few minutes. Then, you will want to refer later to some of its subtopics, such as <em><a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/theme-localization\/\" target=\"_blank\" rel=\"noopener\">Theme and Plugin Localization<\/a><\/em> and <em><a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/string-translation\/\" target=\"_blank\" rel=\"noopener\">String Translation<\/a><\/em>.<\/p>\n<p>In a short, these are the main steps you need to follow to get started:<\/p>\n<ul>\n<li><strong><em>Install and activate the core WPML plugins<\/em><\/strong> (<em>WPML Multilingual CMS<\/em>, <em>WPML String Translation<\/em>, <em>WPML Translation Management<\/em>) and other WPML plugins that may depend on them.<\/li>\n<li><strong><em>Set up WPML from the dashboard<\/em><\/strong>, by going to WPML tab. Initial simple three-step setup is self-explanatory, asking you to choose your default language, a set of active languages, and a language selector.<\/li>\n<\/ul>\n<div class=\"pikode pikode--custom-content  custom-content--21\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: underline; color: #959595; padding: 12px 0px 0px 0px;\"><p>Posts, Pages and other Post Types<\/p><\/div>\n<p>In order to translate Posts, Pages, Projects or Albums, you need to navigate to their items and you will see\u00a0columns \u2014 for each active language \u2014\u00a0with <strong>&#8220;+&#8221; sign\u00a0<\/strong>to add translation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3160\" src=\"https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml1.jpg\" alt=\"\" width=\"800\" height=\"600\" srcset=\"https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml1.jpg 1000w, https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml1-300x225.jpg 300w, https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml1-768x576.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Now you will be able to translate your page by setting the translated title and body and then clicking on the <strong>Publish<\/strong> button.<\/p>\n<p>Note that you can click on the <strong>Copy content from &#8230;<\/strong> or <strong>Overwrite with content<\/strong> options found on the language metabox to the right:<\/p>\n<ul>\n<li>The <strong>Copy content from &#8230;<\/strong>\u00a0option will automatically copy the content from the primary (default) language to the translated language, giving you the option to translate the copied content.<\/li>\n<li>The <strong>Overwrite with content<\/strong> option will always set the translation of that page to be a duplicate of the original page (in the default language). You can disconnect the page to be translated independently by clicking on <strong>Translate independently<\/strong>, found on the language metabox.<\/li>\n<\/ul>\n<div class=\"pikode pikode--custom-content  custom-content--21\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: underline; color: #959595; padding: 12px 0px 0px 0px;\"><p>Post slugs<\/p><\/div>\n<p>WPML lets you use unique URLs for custom content in different languages. This includes translating the post slug, as well as the name of the custom post type.<\/p>\n<p>URLs for custom post types include the name of the post-type and the page name. Typically, custom post types in different language will look like:<\/p>\n<ul>\n<li>\/<strong>houses<\/strong>\/my-green-house\/<\/li>\n<li>\/<strong>casas<\/strong>\/mi-casa-verde\/<\/li>\n<\/ul>\n<p>The first part of the URL, in bold, is the post type. The second type is the page name.<\/p>\n<p>In order to translate custom posts slugs, follow these steps:<\/p>\n<ul>\n<li>Go to <em><strong>WPML \u2192 Translation Management \u2192 Multilingual Content Setup<\/strong><\/em> and scroll down to <strong><em>Custom posts slug translation options<\/em><\/strong> section. Confirm that the <strong><em>Translate custom posts slugs (via WPML String Translation)<\/em><\/strong> option is checked.<\/li>\n<li>Scroll down to\u00a0<strong><em>Post Types Translation<\/em><\/strong> section and confirm that your custom post type is set as translatable, <strong><em>uses different slugs in different languages<\/em><\/strong> and has the proper slug translation (make sure that each slug is assigned to the proper language, checking the language flag next to each slug)<\/li>\n<li>Go to <strong><em>Settings \u2192\u00a0Permalinks<\/em><\/strong> and save your permalinks structure again to make sure that rewrite rules cache is flushed.<\/li>\n<\/ul>\n<p>For more information, please check the <a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/translating-page-slugs\/\" target=\"_blank\" rel=\"noopener\"><strong><em>translating page slugs tutorial<\/em><\/strong><\/a>.<\/p>\n<div class=\"pikode pikode--custom-content  custom-content--21\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: underline; color: #959595; padding: 12px 0px 0px 0px;\"><p>Menus<\/p><\/div>\n<p>With WPML you can easily synchronize between your languages\u2019 menus. For more information, please check the full <a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/translating-menus\/\" target=\"_blank\" rel=\"noopener\"><strong>translating menus tutorial<\/strong><\/a>.<\/p>\n<div class=\"pikode pikode--custom-content  custom-content--21\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: underline; color: #959595; padding: 12px 0px 0px 0px;\"><p>Widgets<\/p><\/div>\n<p>You easily translate your Widgets via String Translation screen, that requires WPML String Translation being installed. For more information, please check the full <a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/translating-widgets\/\" target=\"_blank\" rel=\"noopener\"><strong>translating widgets tutorial<\/strong><\/a>.<\/p>\n<div class=\"pikode pikode--custom-content  custom-content--21\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: underline; color: #959595; padding: 12px 0px 0px 0px;\"><p>Translating the theme other strings<\/p><\/div>\n<p>To translate the theme strings you will need to scan your theme for strings, as this will register the strings for translation on the string translation screen.<\/p>\n<p>This can be be done by following the steps below:<\/p>\n<ul>\n<li>In your WordPress dashboard, go to <em>WPML \u2192\u00a0Theme and plugin localization<\/em>.<\/li>\n<li>Find <em><strong>Select how to translate strings in the theme and plugins<\/strong><\/em> section, where you should choose<strong><em> Translate the theme and plugins using WPML\u2019s String Translation<\/em><\/strong>.\u00a0When you select <strong><em>Don\u2019t use String Translation to translate the theme and plugins<\/em><\/strong>, you simply tell WPML not to allow editing these translations using the String Translation module.<\/li>\n<li>Click on the <strong><em>Scan the theme for strings<\/em><\/strong> button, this will register the theme texts for translation on the string translation screen.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3166\" src=\"https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml_2.jpg\" alt=\"\" width=\"751\" height=\"563\" srcset=\"https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml_2.jpg 1000w, https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml_2-300x225.jpg 300w, https:\/\/ombra.pikarthouse.com\/documentation\/wp-content\/uploads\/sites\/5\/2017\/09\/Wpml_2-768x576.jpg 768w\" sizes=\"auto, (max-width: 751px) 100vw, 751px\" \/><\/p>\n<ul>\n<li>Now you can navigate to <em>WPML \u2192\u00a0String translation<\/em> and filter the strings by <strong><em>Translation needed<\/em><\/strong> to see which strings are missing translations, or select a specific text domain. You can also search for a specific string by typing it in the <em>Search for<\/em> field and then clicking the <em>Search<\/em> button. Once you find your string, click on translations and add your translated text. Then, choose the <strong><em>Translation is complete<\/em><\/strong> option and click on <strong><em>Save<\/em><\/strong>.<\/li>\n<\/ul>\n<div class=\"pikode pikode--custom-content  custom-content--21\" style=\"font-weight: 700; letter-spacing: -1px; line-height: 1.68; text-decoration: underline; color: #959595; padding: 12px 0px 0px 0px;\"><p>Theme Options<\/p><\/div>\n<p>Translating theme options can be done by navigating to <em>WPML \u2192\u00a0String translation. For more details about Theme Options translation, please see the <a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/translating-theme-options\/\" target=\"_blank\" rel=\"noopener\"><strong>link<\/strong><\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Localization describes the subsequent process of translating an internationalized theme like OMBRA theme is.\u00a0To find out more about installing languages on WordPress, please see the link. So, in case you want to translate Ombra to another language, different from those already coming with theme (French, Portuguese, Spanish), you should use a child-theme\u00a0and follow the next [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1663,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3120","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/pages\/3120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/comments?post=3120"}],"version-history":[{"count":59,"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/pages\/3120\/revisions"}],"predecessor-version":[{"id":3826,"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/pages\/3120\/revisions\/3826"}],"up":[{"embeddable":true,"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/pages\/1663"}],"wp:attachment":[{"href":"https:\/\/ombra.pikarthouse.com\/documentation\/wp-json\/wp\/v2\/media?parent=3120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}