Starting from v9.00, Online Nandroid has support for localization using external language files. Language file should be provided at /data/local/tmp/onandroid.lang
for Online Nandroid to parse the file and display the provided language strings. A sample language file for English (US) is provided below:
LANGFILE_LANGNAME="English (US)"
LANGFILE_LANGCODE="en-US"
LANGFILE_DESC="Online Nandroid Language File for English (US)"
LANGFILE_AUTHORNAME="Ameer Dawood"
LANGFILE_AUTHOREMAIL="ameer1234567890@gmail.com"
LANGFILE_VERSION="1.0"
LANGFILE_FORONLINENANDROIDVERSION="9.00"
LANG_SCRIPTNAME="Online Nandroid Backup"
LANG_SCRIPTHEAD1="* A tool to perform a nandroid backup"
LANG_SCRIPTHEAD2=" without booting into recovery."
LANG_SCRIPTHEAD3="* It is fully compatible with nandroid."
LANG_SCRIPTHEAD4="* Type 'onandroid --help' for usage"
LANG_SCRIPTHEAD5=" instructions."
LANG_SCRIPTHEAD6="* Created by Ameer Dawood"
LANG_ERROR="Error"
LANG_EXITING="Exiting"
LANG_FREEINGSPACE="Freeing Space"
LANG_NOTFOUNDSKIP="not found! Skipping backup of"
LANG_BACKINGUP="Backing up"
LANG_FSOVER2GB="The filesystem contains a file over 2GB. The backup might not restore properly!"
LANG_MAYXRESTORE="An error occured! Backup may not restore properly!"
LANG_ENTERNAME="Enter backup name"
LANG_ENTERSTORAGE="Enter storage path"
LANG_ENTERSDEXT="Enter sd-ext path"
LANG_ENTERPARTS="Enter partitions to backup"
LANG_SCRIPTSNAME="Online Nandroid"
LANG_STARTEDAT="Started at"
LANG_RUNWITH="Run with options"
LANG_BUSYBOX="Busybox"
LANG_FSLAYOUT="File System Layout"
LANG_DEVDETAILS="Device Details"
LANG_RECOVERY="Recovery"
LANG_GENRECOOVERY="Generic recovery."
LANG_NORECOVERY="No recovery detected!"
LANG_USINGBUSYBOX="Using busybox from"
LANG_CHECKROOT="Checking for root permissions"
LANG_ROOTOK="Root permissions acquired!"
LANG_NOROOT="Could not acquire root permissions!"
LANG_ANALYSEBATT="Analysing battery level"
LANG_CANNOTBATT="Unable to check battery level! Taking a chance here"
LANG_BATTOK="Sufficient battery available!"
LANG_NOBATT="Sufficient battery not available!"
LANG_BATTLEVEL="Battery Level"
LANG_CHECKINGBB="Checking version of BusyBox installed"
LANG_BBLESS="BusyBox version less than 1.20 found."
LANG_BBOK="BusyBox version 1.20 or above installed!"
LANG_BBCANNOTCHECK="Unable to check BusyBox version. Taking chances here"
LANG_SEARCHSD="Searching for SD card"
LANG_ALTERNATEMEDIA="Alternate storage media provided!"
LANG_SDNOTFOUND="SD card not found!"
LANG_MOUNTS="Mounts"
LANG_SDFOUND="SD card found!"
LANG_ISMTDDEV="This is an MTD based device!"
LANG_ISEMMCDEV="This is an EMMC based device!"
LANG_ISMTKDEV="This is an MTK based device!"
LANG_HASPATCH="This device has a patch file installed!"
LANG_INCREMSELECTD="Incremental backup mode selected by default!"
LANG_INCREMSELECTR="Incremental backup mode selected at run time!"
LANG_SPLITSELECTD="Split backup mode selected by default!"
LANG_SPLITSELECTR="Split backup mode selected at run time!"
LANG_TWRPSELECTR="TWRP backup mode selected at run time!"
LANG_TWRPCOMPN="TWRP compression enabled at run time!"
LANG_TWRPCOMPG="TWRP compression (gzip) enabled at run time!"
LANG_ADVSELECTR="Advanced backup mode selected at run time!"
LANG_ADVSELECTD="Advanced backup mode selected by default!"
LANG_CHECKTOOLS="Checking for required tools"
LANG_NOMKYAFFS2IMAGE="mkyaffs2image not found in path!"
LANG_NODEDUPE="dedupe not found in path!"
LANG_NOBUSYBOX="busybox not found in path!"
LANG_ALLTOOLSOK="All required tools available!"
LANG_CANNOTCHANGETO="Could not change to"
LANG_CANNOTCREATE="Cannot create"
LANG_REPLSELECTEDR="Replace backup mode selected at run time!"
LANG_ALREADYEXISTS="already exists!"
LANG_WANTTOREPLACE="Do you want to replace?"
LANG_REPLSELECTP="Replace backup mode selected upon prompt!"
LANG_CANNOTWRITETO="Cannot write to"
LANG_GARBSELECT="Garbage Collection mode selected!"
LANG_GARBCOMPL="Garbage Collection Completed in"
LANG_MINUTES="minutes"
LANG_SECONDS="seconds"
LANG_CHECKDISKSPACE="Checking disk space"
LANG_SDFREESPACE="SD Card Free Space"
LANG_REQUIREDSPACE="Required Space"
LANG_NOSPACE="Not enough disk space!"
LANG_PARTITIONS="Partitions"
LANG_SPACEOK="Necessary disk space available!"
LANG_DETECTINGEXCL="Detecting mountpoints to exclude"
LANG_BACKINGUPTO="Backing up to"
LANG_BACKINGUPOLD="Backing up the old backup for replace operation"
LANG_PATCHNOTICE="Consider installing patch file for your device, for a complete nandroid!"
LANG_REPLACINGOLD="Replacing old backup with new backup"
LANG_GENMD5SUMFOR="Generating md5sum for"
LANG_GENMD5SUM="Generating md5sum"
LANG_VERIFYMD5SUM="Verifying md5sum"
LANG_BACKUPCOMPL="Online Nandroid Backup Completed in"
LANG_FILESBKPEDUP="Files Backed-up"
LANG_INVALIDARGS="One or more of the arguments passed are invalid!"
LANG_USAGE="Usage"
LANG_OPTIONS="Options"
LANG_FLAGH="display this help message and exit"
LANG_FLAGH2="display more help messages and exit"
LANG_FLAGAH="display help for advanced backup mode"
LANG_FLAGV="display version number and exit"
LANG_FLAGP="generate backup name with phone timezone"
LANG_FLAGU="generate backup name with UTC time (default)"
LANG_FLAGI="CWM6 style incremental backup mode"
LANG_FLAGA="advanced / selective backup mode"
LANG_FLAGL="split backup mode (CWM 6+ only)"
LANG_FLAGO="good old backup mode (default)"
LANG_FLAGGC="run garbage collect mode"
LANG_FLAGW="TWRP backup mode"
LANG_FLAGME="enable md5 generation (TWRP only)"
LANG_FLAGMD="disable md5 generation (TWRP only)"
LANG_FLAGCE="enable compression (TWRP only)"
LANG_FLAGCD="disable compression (TWRP only)"
LANG_FLAGCG="enable compression and use gzip (TWRP only)"
LANG_FLAGC="specify a custom backup name"
LANG_FLAGS="specify an alternate storage media to backup"
LANG_FLAGE="specify path to sd-ext partition"
LANG_FLAGR="replace backup with same name"
LANG_FLAGY="create tar balls instead of yaffs images for yaffs2 partitions"
LANG_FLAGT="use /sbin as last option for busybox"
LANG_FLAGNE="enable vibrate and LED notification (default)"
LANG_FLAGND="disable vibrate and LED notification"
LANG_FLAGPP="show percentage progress indicator (default)"
LANG_FLAGPD="show dot progress indicator"
LANG_FLAGD="return device id used by TWRP"
LANG_FLAGXD="exclude dalvik-cache from backup"
LANG_FLAGXG="exclude Google Music files from backup"
LANG_LANGFILEL="Language File"
LANG_LANGFILEN="Name"
LANG_LANGFILEC="Code"
LANG_LANGFILED="Description"
LANG_LANGFILEA="Author"
LANG_LANGFILEE="Email"
LANG_LANGFILEV="Version"
LANG_LANGFILEF="For Online Nandroid Version"
LANG_LANGFILEO="Not found!"
- A language file is essentially a shell script consisting of variables for each string in Online Nandroid that can be localized and their respective strings in double quotes.
- The language file should not contain any shell comments. If it contains any such shell comments, Online Nandroid will not parse the language file.
- The first 7 lines of the language file are file headers, used as follows:
-
LANGFILE_LANGNAME
which is the name of the language, such asEnglish (US)
. -
LANGFILE_LANGCODE
which is the IETF Language Tag, such asen-US
. -
LANGFILE_DESC
which is a description for the language file, such asOnline Nandroid Language File for English (US)
. -
LANGFILE_AUTHORNAME
which is the name of the author who did the localization, such asAmeer Dawood
. -
LANGFILE_AUTHOREMAIL
which is the email address of the author, such asameer1234567890@gmail.com
. -
LANGFILE_VERSION
which is the version of the language file, such as1.0
. -
LANGFILE_FORONLINENANDROIDVERSION
which is the version of Online Nandroid for which the language file was created, such as9.00
.
-
- Note: If you have created or wants to create a language file for your preferred language, you are most welcome to contact me and I shall be happy to include it in Online Nandroid's repository and any other places where I provide language files.
- Note: Since language files are essentially shell scripts and Online Nandroid uses shell built-in
eval
to parse language files, this opens a vast opportunity for other developers who bundle the script in their tools and apps to change some of the behaviors of Online Nandroid.