Child theme : the file style.css

The theme folder:

folder theme and child

folder theme and child


Here only the files containing (few) modifications are present.
page.php and single.php contain an added tag to display links to other post in different languages under title.
category.php a little modification to set description translatable.
functions.php is more important and will described in next post.

The short style.css :

@charset "UTF-8";
 
/**
 * Theme Name: Twentyten Multilingual Child
 * Theme URI: http://dev.xiligroup.com/
 * Description: Twentyten based but including features for multilingual context with xili-language plugin
 * Author: dev.xiligroup.com ms
 * Author URI: http://dev.xiligroup.com/
 * Version: 0.9
 * Tags: child theme, tabs, multilingual
 * Template: twentyten
 */
 
@import url('../twentyten/style.css'); /* the most important line of the style.css of a child from his parent twentyten */
 
/* some few modifications for xili-language list */
ul.xililanguagelist {list-style: none !important ; margin-left:0 !important ;}
 
/* example in header menu if filter xiliml_infunc_language_list is on */
 
ul.menu li.lang-fr_fr a {background: transparent url('images/flags/fr_fr.png') no-repeat center 13px;}
ul.menu li.lang-en_us a {background: transparent url('images/flags/en_us.png') no-repeat center 13px;}
ul.menu li.lang-de_de a {background: transparent url('images/flags/de_de.png') no-repeat center 13px;}
ul.menu li.lang-es_es a {background: transparent url('images/flags/es_es.png') no-repeat center 13px;}
 
li.lang-fr_fr:hover > a {background:  #333 url('images/flags/fr_fr.png') no-repeat center 13px !important;}
li.lang-en_us:hover > a {background:  #333 url('images/flags/en_us.png') no-repeat center 13px !important;}
li.lang-de_de:hover > a {background:  #333 url('images/flags/de_de.png') no-repeat center 13px !important;}
li.lang-es_es:hover > a {background:  #333 url('images/flags/es_es.png') no-repeat center 13px !important;}

ul.menu li.lang-fr_fr, ul.menu li.lang-en_us, ul.menu li.lang-de_de, ul.menu li.lang-es_es {text-indent:-9999px; width:18px;}

In child theme, the most important file is style.css with the line

* Template: twentyten

and the line

@import url('../twentyten/style.css');

The advantage of child theme :

The parent theme is NOT modified.
The child theme (selected in theme settings page) is easy to maintain but need knowledge of the parent theme.
The child theme contains a language sub-folder with the .mo files.
For xili-language, when template tags are not ‘hookable’, it is easy here to add specific tags provided by the plugin.

next post

Posted in How to, News | Tagged , , , | 1 Comment

What is a child theme ? Example here for multilingual website

This post to introduce a new series of posts to explain how with few modifications and the way of child theme of twentyten theme containing just modified files, it possible to create a multilingual website. Here, the child theme is named twentyten-xili and his parent is default shipped twentyten.
In functions.php file of child theme some functions where added to improve multilingual features delivered by xili-language plugin. The child style.css is very short and contains just the lines to format languages menu automatically added to header menu and for widget added in sidebar.
Next post : the child theme content… and the advantage of this approach.

Posted in News | Tagged , , , | 2 Comments

dev.xiligroup.com website renewed and new release of xili-language trilogy shipped !

dev.xiligroup.com website renewed

With the “child theme” approach, and without modification on the parent theme “twentyten”, on our website, we have tested this way to design a new theme. All the datas, posts and presentations plugins (xili-floom-slideshow, sliding tabs,…) were reused without main adjustement.

new release of xili-language trilogy shipped

By reading readme.txt of each plugin of the trilogy (xili-language, xili-tidy-tags, xili-dictionary), you will discover some improvements to facilitate implementation of multilingual features.

Don’t hesitate to use forum !

Hope you enjoy !

Posted in News | Tagged | Leave a comment

xili-language: 1.8.0 version adds multilingual features for your custom post type !

With version 1.8.0, xili-language, shipped as other version for tests, now offers automatic ways to add multilingual features for custom post types created by you or developers. Soon, (I hope) a ‘how to set’ post with example of custom post type.

Edit Book (Custom post type)

Edit Book (Custom post type)


At the right, you can see the meta boxes to set language of the edited book (here in french by an english writer !) and create linked book in other language if exists.

Posted in News | Tagged , , | Leave a comment

xili-tidy-tags plugin version 1.4.2 released !

WordPress 3.0.1 (and end of summer) was an opportunity to improve and rewrite some parts of xili-tidy-tags plugin. No deep transformations but deep verification of compatibility with lastest version and obviously for multisite mode. So as presented here (see clouds at right), this plugin brings an original way to organize the tags both by languages or semantic ways.
To download use the WP repository or the internal plugin dashboard updating page.

Posted in News | Tagged , , , | Leave a comment