Difference between revisions of "German Language Pack"

From eXo Wiki
Jump to navigation Jump to search
(Created page with "== Technical Specs == === Core concepts overview === Language Packs are “add-ins”. They need eXoDOS lite or full installed. Yet they are designed to be as separate as...")
 
(Blanked the page)
Tag: Blanking
Line 1: Line 1:
== Technical Specs ==
=== Core concepts overview ===
Language Packs are “add-ins”. They need eXoDOS lite or full installed. Yet they are designed to be as
separate as possible to avoid conflicts, overwrites and complicated merges that require parsing and
validating existing data, at the cost of some potential data duplication.


* Each language is a separate pack. Users can install several as they do not overlap.
* Each language pack has its own release schedule, asynchronous from eXoDOS or other
language packs.
* Each language pack includes its own XML that its installer will merge in eXoDOS’ “MS-
DOS.xml” leveraging the existing “merge.bat” util.
* For games already existing in eXoDOS as English version, a new entry is added as a LB
“AdditionalApplication” which lets users launch the localized game from right-click in LB.
* For games that do not exist, a new game entry is appended to MS-DOS.xml
* Multilanguage games (that may or may not exist in eXoDOS already) get their own
standalone preconfigured entry, which implies duplication of sources.
* This document uses the French language as an example, all other languages follow the same
concept.
=== Structure ===
As separate add-ins, language pack files are stored in their own folder structure that plugs to
eXoDOS.
==== X:\eXoDOS\xml\french ====
* Contains the LB platform XML files (“french.xml” and “frenchfamily.xml”) that will be
merged into MS-DOS.xml in the same folder by the language pack setup.
==== X:\eXoDOS\eXo\eXoDOS\!french ====
* Contains all localized game zips and is the destination for installed games 
* Functional equivalent of “X:\eXoDOS\eXo\eXoDOS” for regular eXoDOS
==== X:\eXoDOS\eXo\eXoDOS\!dos\!french ====
* Contains individual game folders that include localized install batch, game launch batch,
dosbox.conf 
* Each game folders contain an “Extras” subfolder for localized manual and other documents
as well as a localized Alternate Launcher.bat
* Functional equivalent of “X:\eXoDOS\eXo\eXoDOS\!dos” for regular eXoDOS
==== X:\eXoDOS\Images\MS-DOS\<image type>\France ====
* Localized game images should be stored in a regional subfolder for easier packing.
LaunchBox already has pre-configured folders such as France and Germany. A new folder
should be created if necessary.
After discussion with eXo, this requires a little more work as it is probable LB just loads
images based on its “region” settings. Open question is: are multiple regions supported for a
single game, and if yes, will it fetch images in all region folders? This is a problem for existing
games mainly, as new games (=not existing in eXoDOS) will be added with the proper region.
==== X:\eXoDOS\eXo\dosbox ====
* Contains a localized config.bat file (renamed to config_FR.bat for French), for global DOSBox
settings management
==== X:\eXoDOS\eXo\LanguagePacks\french (YET TO BE DEFINED – Placeholder) ====
* Contains setup batch + other necessary files for language packs setup and management. 
My suggestion would be to include localized setup batches in every language pack in their
own folder, then instruct users to extract the language pack over their existing eXoDOS
installation, then browse to “LanguagePacks\French” and run setup_FR.bat there, for
example. This way in the case of several language packs installed, the setup files do not
overwrite each other in a different language, and we do not have to worry about asking the
user what languages he wants the setup in. The language of the setup is always in the
language of the pack it belongs to. Yet if it finds several language XML’s, it installs all of them
(see §3.2)
=== Setup and update ===
The full setup mechanism is still to be precisely defined at this stage.
==== Existing base concepts: ====
* §2.1: Extraction of the xml files to the xml folder
* §2.2: Extraction of all localized game zips to the localized game folder
* §2.3: Extraction of all game files and extras to the localized “!dos” folder
* §2.4: Extraction of all pictures to the region-specific images folders
* §2.5: Extraction of the localized config batch file
==== XML Merging: ====
* Merge.bat parses all xml files in the xml folder and identifies installed language pack(s)
* Asks the user if he wants adult games or not to select the proper source XML from the
language pack(s) and the proper destination XML from the base eXoDOS install
* Merges the appropriate language pack(s) xml files into the chosen base xml.
** Adult games included: merges french.xml (+other installed language packs) into base
MS-DOS.xml, copy to X:\eXoDOS\Data\Platforms
** Adult games excluded: merges frenchfamily.xml (+other installed language packs)
into dosfamily.xml and copy to X:\eXoDOS\Data\Platforms as MS-DOS.xml
This implies every time a language pack is installed (be it for the first time or for an update),
it creates a new clean MS-DOS.xml, overwriting potential manual changes.
=== Bat files localization ===
Game install and launch bat files need to have their “echo” instructions localized for a better
user experience. A template of files is created for each language. 
The download on demand mechanism is stripped out, as language packs will only be released as
full packages (no “lite” releases).
To support foreign languages accents and special characters, the codepage of batch files needs
to be changed to Unicode (UTF-8). This is done by adding these lines to the beginning of batch
files to call a codepage change to 65001 (ref: https://docs.microsoft.com/en-
us/windows/win32/intl/code-page-identifiers)
The files that need translation are:
* Install.bat (in every “!dos\!french\” game folder)
* Gamename (year).bat (in every “!dos\!french\” game folder)
* Alternate Launcher.bat (in every game folder “Extras” subfolder)
* Config.bat (only once in “eXo\Dosbox”, renamed to config_fr.bat)
=== Games packaging and localized names ===
Games are packaged in the same format as other eXoDOS games: GameName (year).zip
When an official localized name exists for a game, this should be used instead of the English
name.
=== LaunchBox integration ===
Three additional applications need to be merged into existing games, with the language as prefix
to sort them out properly:
* Standard game
* Alternate Launcher (pixel perfect & shader options)
* Open Extras folder (for localized manuals and docs)
Example for Space Quest IV French:
“Open Folder.bat” is a simple batch: “explorer.exe .” that opens explorer from the folder the
batches is run from.
These new entries should also be localized themselves for consistency.
How it looks in the contextual menu:
What about new games that do not exist yet in eXoDOS? We just merge a full game entry in the
french.xml instead of an additional application? Unlikely scenario – what happens if two language
packs both insert the same game that doesn’t exist in eXoDOS (ie, a game that would only exist in
French and German but not English). Borderline, I know...
=== Language Playlists ===
To be defined... Timber? :D

Revision as of 01:49, 8 November 2021