Actions

Custom Sample Data

From Joomla! Documentation

Revision as of 12:17, 20 January 2011 by Infograf768 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1.6.1 brings a new feature to your distributions.

You now can add your own database to the official English one and have its name translated and chosen at time of install, this while keeping also, if you wish, the usual default English one.

STEPS:

1. Add the database in installation/sql/mysql/sample_data_xx.sql //can be something else than xx

(You can leave sample_data.sql there if you wish)

2. Modify installation/localise.xml


<?xml version="1.0" encoding="utf-8"?>
<localise version="1.6" client="installation" >
        <forceLang>xx-XX</forceLang> // as usual, this forces your language to be the one used at install time.
        <helpurl></helpurl>
        <debug>0</debug>
        <sampledata>sample_data_xx.sql</sampledata> // has to be the same as in the msql folder
        <params/>
</localise>

3. Add in your xx-XX.ini installation file

INSTL_SAMPLE_DATA_XX_SET="My own sample data I like a lot"

=> XX has to be the text entered before .sql in sample_data_xx.sql


This way, you can add any number of sample data, one chosen per default and each of them with its name translated.