1. Using site-specific text

To create your own site-specific language file, all you have to do is select which strings you would like to override from $LJHOME/bin/upgrading/en.dat and put them in a new file: en_YS.dat. Then, you add the language to your database using the steps below:

Procedure 17.1. Creating a new site-specific language file: en_YS:

  1. Create a new file under $LJHOME/bin/upgrading, labeled en_YS.dat. This file should contain all of the text you would like to override from $LJHOME/bin/upgrading/en.dat.

  2. If you do not have a local BML configuration file (_config-local.bml) in your $LJHOME/htdocs directory, you should create one now. Add the following line to your local configuration file:

    DoGZIP 1
    DefaultLanguage en_YS
    DefaultScheme nameofscheme
  3. If you don't have a local language directive file ($LJHOME/bin/upgrading/text-local.dat) create one now. Add the following lines to your local language file:

    domain:100:faq
    
    # EnglishYS is child of English for general domain:
    lang:100:en_YS:English (YS):sim:en
    langdomain:en_YS:general
    
    # EnglishYS is root of FAQ:
    langdomain:en_YS:faq:1
  4. Add the appropriate values, like en_YS, to the relevant variables in your $LJHOME/etc/ljconfig.pl file: @LJ::LANGS and @LJ::DEFAULT_LANG.

  5. Run $LJHOME/bin/upgrading/texttool.pl load.

Note

The line “langdomain:en_YS:faq:1” is only required if you want your FAQs to be translatable into other languages which derive from en_YS. You probably do not want that, at least initially.

Once text is in the database, it is never changed with texttool.pl load. This is to prevent site local modifications (and modifications made at /translate/) from being lost. To start over, use texttool.pl wipedb, and re-populate. Restart memcached if you are using it, as text lives in there, too.