See [online wiki](https://github.com/openwrt/luci/wiki/LMO) for latest version.
LMO is a simple binary format to pack language strings into a more efficient form.
-Although it's suitable to store any kind of key-value table, it's only used for the LuCI *.po based translation system at the moment.
-The abbreviation "LMO" stands for "Lua Machine Objects" in the style of the GNU gettext *.mo format.
+Although it's suitable to store any kind of key-value table, it's only used for the LuCI \*.po based translation system at the moment.
+The abbreviation "LMO" stands for "Lua Machine Objects" in the style of the GNU gettext \*.mo format.
## Format Specification
## Hash Function
-The current LuCI-LMO implementation uses the "Super Fast Hash" function which was kindly put in the public domain by it's original author. See http://www.azillionmonkeys.com/qed/hash.html for details. Below is the C-Implementation of this function:
+The current LuCI-LMO implementation uses the "Super Fast Hash" function which was kindly put in the public domain by its original author. See http://www.azillionmonkeys.com/qed/hash.html for details. Below is the C-Implementation of this function:
```c
#if (defined(__GNUC__) && defined(__i386__))
# HowTo: Create Themes
-**Note:** You should read the [Module Reference](./Modules.md) and the [Template Reference](./Templates.md) before.
+**Note:** You have already read the [Module Reference](./Modules.md) and the [Template Reference](./Templates.md).
We assume you want to call your new theme `mytheme`.
-Make sure you replace this by your module name everytime this is mentionend in this Howto.
+Replace `mytheme` with your module name every time this is mentioned in this Howto.
## Creating the structure
At first create a new theme directory `themes/luci-theme-mytheme`.
The `header.htm` will be included at the beginning of each rendered page and the `footer.htm` at the end.
So your `header.htm` will probably contain a DOCTYPE description, headers,
the menu and layout of the page and the `footer.htm` will close all remaining open tags and may add a footer bar.
-But hey that's your choice you are the designer ;-).
+But hey that's your choice: you are the designer ;-).
Just make sure your `header.htm` begins with the following lines:
```
-%>
```
-This makes sure your content will be sent to the client with the right content type.
+This ensures your content is sent to the client with the right content type.
Of course you can adapt `text/html` to your needs.
Put any stylesheets, Javascripts, images, ... into `htdocs/luci-static/mytheme`.
-You should refer to this directory in your header and footer templates as: `<%=media%>`.
+Refer to this directory in your header and footer templates as: `<%=media%>`.
That means for a stylesheet `htdocs/luci-static/mytheme/cascade.css` you would write:
```html
<link rel="stylesheet" type="text/css" href="<%=media%>/cascade.css" />
## Making the theme selectable
If you are done with your work there are two last steps to do.
-To make your theme OpenWrt-capable and selectable on the settings page you should now create a file `root/etc/uci-defaults/luci-theme-mytheme` with the following contents:
+To make your theme OpenWrt-capable and selectable on the settings page, create a file `root/etc/uci-defaults/luci-theme-mytheme` with the following contents:
```sh
#!/bin/sh
uci batch <<-EOF
}
```
-This is some OpenWrt magic to correctly register the template with LuCI when it gets installed.
+This correctly registers the template with LuCI when it gets installed.
That's all. Now send your theme to the LuCI developers to get it into the development repository - if you like.