Author Topic: Step 2: Translating the BeerSmith 2 Program  (Read 21049 times)

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5356
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Step 2: Translating the BeerSmith 2 Program
« on: September 11, 2011, 04:26:41 PM »
Once the data files are complete, (see previous post) you can start working on the program itself.  This is a fairly large task, as the BeerSmith 2 program has thousands of fields and menu items in it.

Also I ask that you not modify any of the credits, items marked for internal use, or copyright information.

The tool to translate the program itself is attached - it is in a file called BResource.zip.  This version is matched with Build 42 (beta) of BeerSmith, so I recommend you download Build 42 before attempting to work with this version. 

Attached to this message is a file called BResource.zip which contains the Windows based resource editor (sorry - no Mac yet).  To use it you need to:
  • Download the attached BResource.zip
  • Unzip it to the directory BResource
  • Open the program BResource.exe
  • Use the Open command to Open "Lang.xml" which has the resources in it
  • Edit the menus, fields and strings in Lang.xml using the tool
  • For testing, you need to copy Lang.xml into the same directory as the BeerSmith program - usually this is C:\Program Files (x86)\BeerSmith2 by default.
  • If you have the Lang.xml file in the BeerSmith program directory, when you start BeerSmith it will pick up the Lang.xml file and use it to display menus and fields throughout the program
  • As you are translating you will need to take into account screen size - as really long field names could lead to poor formatting on screen, particularly for those running on netbooks or other small screens

If you manage to get a complete Lang.xml file - please post it under the appropriate language thread so others can check it as well.

Once we have a complete set of data files and a Lang.xml file, could you send me a private message so I can create an installation package for the program which we can use for testing the translated version.

Note I have not yet addressed translating of the help files.  The commercial tool I use to generate the help files is pretty expensive, but it may be possible to translate the files themselves if you have a good HTML editor.

  http://www.beersmith.com/download/BResource.zip -- Latest version here!!

Thanks,
Brad
« Last Edit: November 19, 2011, 11:22:47 AM by BeerSmith »
Get a free trial of BeerSmith 3 here

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5356
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: Step 2: Translating the BeerSmith 2 Program
« Reply #1 on: November 19, 2011, 11:30:26 AM »
All,
  I have a new version of the resource editor available here:
    http://beersmith.com/download/BResource.zip

  The most important change is the ability to "MERGE" resource files so you can keep up with the latest releases of BeerSmith as they are released.

  Here's how to use it:
  - Unzip the BResource.zip to its own directory - the program BResource.exe is inside as well as the Lang.xml file to translate
  - Load BResource.exe
  - Open Lang.xml with the program and make changes as needed to translate the program
  - NOTE - if you get an error "Had to remap resources... when loading a file, close that file without saving and reopen the program (known bug).
  - After you have some of the Lang.xml file translated, copy the Lang.xml file into the Program Files/BeerSmith2 directory (the same location where you have the actual BeerSmith 2 program installed).

  Here's how to merge your existing Lang.xml with a new release of BeerSmith:
  - Load BResource.exe and make sure your existing Lang.xml file is open
  - Use the Merge command on the file menu to open the file "Res.xml" for the latest version of BeerSmith which can be found in the main Program Files/BeerSmith2 directory (i.e. in the directory where the BeerSmith 2 program itself has been installed)
  - The Merge command will read in and add the new resources from Res.xml without changing your existing Lang.xml translation
  - Now you can click on the RID to sort resources by ID - the new ones added from Res.xml will always have the highest RID numbers.  Using this method it is easy to see what was added in the new version so you can translate those new items
  - As before, copy the Lang.xml file back to the main Program Files/BeerSmith2 directory to test the program translation.

  Latest "Beta" build has improved language support!

  - Today I posted an improved beta version of BeerSmith (Builds 2.0.51 and higher) which has just about every possible string in the Res.xml file
  - I recommend downloading BeerSmith 2.0.51 or higher, then using the Merge command with the BResource editor above to merge in the latest build's Res.xml file before translating.
    Here is build 51: http://www.beersmith.com/forum/index.php/topic,6163.0.html
Cheers,
Brad
« Last Edit: November 23, 2011, 02:35:36 PM by BeerSmith »
Get a free trial of BeerSmith 3 here

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5356
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: Step 2: Translating the BeerSmith 2 Program
« Reply #2 on: January 19, 2012, 09:56:48 AM »
All,
  I published a new version today in which the Lang.xml file was updated and critically the program was compiled for RELEASE libraries.  The Lang.xml is compliant for all released versions up to 2.0.59.

  Note that on some older platforms you may also need the Visual Studio Runtime here:
      http://www.microsoft.com/downloads/en/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

Brad
« Last Edit: January 19, 2012, 12:45:36 PM by BeerSmith »
Get a free trial of BeerSmith 3 here

 

modification