release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > DocsIndex > LangFiles > LocalizablePlugins (r1)

Proposal for making the plugins localizable

This page was created to collect all the details on implementing a system for localization of the plugins in RockBox. The following is my suggestion for how it could be done, comments, suggestions etc. are of course welcome smile

Source files

This is pretty much covered by the LangV2 format, plugin strings are added to the existing .lang files using the 'user' field to describe which plugin uses them. Will probably need implementation/adjustment of the genlang script.

Binary language files

The core has one for each language, plugins could use one of the following (further suggestions?)

* Plugin strings in the same file as the core strings, changing the core loader/file format so that only what's necessary is loaded by the core. (I vote for this)

* One file per plugin and language, probably the simplest solution but would create far too many files.

* Combination files for each language or each plugin, less files but would be as complicated as only one file.

Loading languages

Each plugin provides the necessary buffer to store all the strings in memory and calls a loader function either in the plugin lib or the core with some plugin ID. The loader function fills the buffer and an array of pointers just like the core loading works now. Possibly each plugin also has a compiled in language (English) do we need this?
Edit | Attach | Print version | History: r2 < r1 | Backlinks | View wiki text | More topic actions...
r1 - 26 Mar 2008 - 18:37:03 - NilsWallmenius

Parents: DocsIndex > LangFiles
Copyright by the contributing authors.