Localization String Guidelines

From SLIS Second Life Wiki

Jump to: navigation, search

[edit] General Guidelines

[edit] String Naming

Localization strings in the Moodle software are specified by two things: module name, and string name. In our case, the module name is "sloodle" (notice that is is in lower-case). The string names should all be concise English words/phrases to describe the purpose of the string (the names must be exactly the same across all languages).

Generally, the names should be made up only of lowercase letters and numbers. However, a colon can be introduced to group related strings into categories, like this:

"category:stringname"

The name of the category comes first, followed by a colon, and then the name of the string. This is particularly useful for error messages, where several messages may be almost exactly the same, or for large blocks of text which are made up of several paragraphs, for example:

"section:description1"
"section:description2"


[edit] String Content

It is imperative that you do not add PHP code to your localization strings -- remember that it will be executed in the localization file and not wherever the strings are used. Additionally, it is advisable to avoid HTML, although it is permissible where necessary.

If you need to use single or double quotation marks (' or ") or backslash (\) then you will need to escape them using an additional backslash, like this: \' \" \\

You may need to use HTML entities in some cases (such as & in place of &), although any other Unicode character should be fine.

Personal tools