Clone wiki

public / Localization

About Localization

Starting with version 1.9.4, phpLiteAdmin can be translated into different languages. By default, it comes with the English localization. More localizations can be downloaded from our web site (see below). It is also easy to translate phpLiteAdmin in your own language if no translation is available yet.

Download a Localization

Note: You can use old localization files for new phpLiteAdmin versions, or new localization files for older versions. Some texts might then be in English. See chapter "changes in localization files" below.

Localization-files should be called lang_xx.php with xx being the language code for the corresponding language as defined by ISO 639-1, e.g. "de" for German.

Install a Localization

To install a localization, download the corresponding file and drop it into one of the following two places: * the folder in which you installed phpLiteAdmin (where the phpliteadmin.php file is) * the subfolder "languages"

To use the language, you need to configure it. So in your configuration, set $language = "xx"; with xx being the language code of your language (e.g. "en" or "de"). See Configuration for details.

Translate phpLiteAdmin into your language

You can easily translate phpLiteAdmin into your language. If you do so, please don't forget to send us your localization so we can make it available to other users!

To create your own localization:

  1. Search for the language code of your language in ISO 639-1. Example: de for German
  2. Download the English localization lang_en.php
  3. Rename it to "lang_xx.php" with xx being the language code. Example: lang_de.php
  4. Open the file in a texteditor. Translate the texts (see below) and save the file.
  5. Install the localization to test it (see above).
  6. Please send us your localization so we can make it available to other users. This is a community project, we need your contribution!

How to do the actual translation

Language files are normal php-files that define an array called $lang. Therefore, they start like this:

// Version 1.9.5
$lang = array(

And end like this:

The second line is a comment that makes clear for which phpLiteAdmin-version you intend the file.

If you want to, you can additionally add a comment at the beginning of the file with your name like this:

// German translation by Christopher Kramer
// Version 1.9.5
$lang = array(
The rest of the file is the actual translation. It looks like this:
    "direction" => "LTR",
    "date_format" => 'g:ia \o\n F j, Y (T)',
    "ver" => "version",
    "for" => "for",
At the left side before =>, there is the key of the language-text. In the code above, the keys are "direction", "date_format", "ver" and "for". Never translate or change the key. On the right side after =>, the value follows in the language of the translation. For example for the key "ver", the value "version" is defined. You can now translate the value into your language. For example the Spanish word for "version" is "versión". So the translated file would look like this:
    "direction" => "LTR",
    "date_format" => 'g:ia \o\n F j, Y (T)',
    "ver" => "versión",
    "for" => "for",

To do the translation, you go through the file line by line and translate the values into your language. There are some special keys with special values like "direction" or "date_format" that are not that obvious how to translate them. You will find an explanation for these below.

You don't have to translate everything if you don't want to. You could for example leave some error messages and the help documentation in English and only translate the important texts.

For those of you who do not know PHP some additional remarks:

  • Make sure each value is enclosed by either double quotes or single quotes and after the quotes, there is a comma at the end of the line
  • If you want to use quotes in the value and the value is enclosed in the same type of quotes (i.e. also single quotes or also double quotes), you must escape them by putting a backslash before the quote. Example: "key" => "some \"test in double quotes\"",
  • If you use double quotes and want to use a dollar sign in your value, you should escape it using a backslash. Example: "key" => "US currency: \$",
  • Everything after // or # is only a comment. This is some advice for you, no need to translate it. Comments can also start with /* and end with */ (multi-line comments).

Special translation keys and their values

direction : direction the texts are written. Possible values:

  • LTR = left to right (used for most languages like English, German, Spanish, French, ...)
  • RTL = right to left (used for Arabic languages for example)

date_format : Format in which dates are printed. Special characters stand for the day, month, year, hour and so on. For example "d" stands for "Day of the month, 2 digits with leading zeros". You can find the list and definition of these special characters in the documentation of the PHP date function. If you want to put text in here that should not be replaced, escape it using a backslash. Example: g:ia \o\n F j, Y (T). Here the text "on" is put between the time and the date. (Note: use single quotes for simplicity here. If you use double quotes, you might need to double-escape things because \n would stand for a line-break.)

If there is some other key you don't understand, please ask in our mailing list.

Ask in case of problems

In case you have problems translating phpLiteAdmin, we will try to help you. Just ask in our mailing list. It might be the case that something is not possible to translate into some language because we made things not flexible enough. If you think this is the case, then please let us know and we will adjust things in the next version.

Changes in localization files

With new versions, we usually need to add new language texts. This means localization files need to be updated. You can use old localization files with new version, but the texts that were added in the new version will then be in English. If you are a translator, here is the list of changes that we did with the last versions so you know what you need to add:

key English value Added in comment
dir_not_executable The directory you specified cannot be scanned for databases as %s has no execute permissions on it. On Linux, use 'chmod +x %s' to fix this. 1.9.8
database_not_writable The database-file is not writable, so its content cannot be changed in any way. 1.9.8
max_file_size Maximum file size 1.9.8
help11 Maximum size of file uploads 1.9.8
help11_x The maximum size of file uploads is determined by three PHP settings: upload_max_filesize, post_max_size and memory_limit. The smallest of these three limits the maximum size for file uploads. To upload larger files, adjust these values in your php.ini file. 1.9.8
download Download 1.9.8
open_in_browser Open in browser 1.9.8
vac_on_empty Rebuild database file to recover unused space (Vacuum) 1.9.8
db_blank The database name cannot be blank. 1.9.8
col_inexistent Column %s does not exist 1.9.8
help10 Partial Indexes 1.9.7
help10_x Partial indexes are indexes over a subset of the rows of a table specified by a WHERE clause. Note this requires at least SQLite 3.8.0 and database files with partial indexes won't be readable or writable by older versions. See the SQLite documentation. 1.9.7
new_version There is a new version! 1.9.6
free_software This is free software. 1.9.6
please_donate Please donate. 1.9.6
recent_queries Recent Queries 1.9.6
full_texts Show full texts 1.9.6
no_full_texts Shorten long texts 1.9.6
no No 1.9.5
none None 1.9.5
as_defined As defined 1.9.5
expression Expression 1.9.5
as_defined As defined 1.9.5
ques_primarykey_add Are you sure you want to add a primary key for the column(s) %s in table '%s'? 1.9.5
ques_column_delete Are you sure you want to delete column(s) %s from table '%s'? 1.9.5 only the key was renamed, before it was ques_del_col

Please send updated language files to our discussion group.