Hotaru Docs

 [həʊdɒks]

How to Make a Language Pack

Necessary language files

A default Hotaru installation has two language files:

/content/admin_language.php
/content/main_language.php

Plugin language files can be found at:

/content/plugins/PLUGIN_NAME/languages/PLUGIN_NAME_language.php

Combining the files

A language pack consists of all of the above and each file goes in the user's theme languages folder, i.e.:

  1. /content/themes/THEME_NAME/languages/admin_language.php
  2. /content/themes/THEME_NAME/languages/main_language.php
  3. /content/themes/THEME_NAME/languages/PLUGIN_NAME_language.php (for each plugin)

Language files in the theme's languages folder override the originals.

Example language pack

An example language pack for Hotaru CMS with the Social Bookmarking Plugin Pack (in alphabetical order):

  • Italian
    • admin_language.php
    • category_manager_language.php
    • comment_manager_language.php
    • comments_language.php
    • jquery_test_language.php
    • main_language.php
    • post_manager_language.php
    • posts_widget_language.php
    • recaptcha_language.php
    • sb_base_language.php
    • search_language.php
    • stop_spam_language.php
    • submit_language.php
    • tags_language.php
    • user_manager_language.php
    • user_signin_language.php
    • users_language.php
    • vote_language.php
    • widgets_language.php

Requirements

At the top of a theme's index.php file, after the comment block, the user will need this:

$h->includeThemeLanguage();

Advanced Know-How

In the case of plugin language files, each file overrides the original. However, in language items in admin_language.php and main_language.php are merged together instead. This allows theme designers to alter just a few language items without needing to duplicate the whole main_language.php file.

Note: admin_language.php in a theme folder takes precedence over admin_language.php in an admin theme. That means you can edit admin language from your theme without having to edit anything in the admin theme itself.

Getting StartedDesign and LayoutPlugin DevelopmentAdvanced TopicsFunction ReferenceTroubleshooting