Er9x language options

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Post Reply
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Er9x language options

Post by MikeB »

I've been asked about translating er9x into another language. This is something I've had in mind for a while. I'm now moving all the text strings into a single header file (en.h), and organising the makefile to allow for the selection of alternative header files for different languages.
I'm going to need some help to produce these alternative header files. What I will do is put the en.h file on here, then anyone who would like a different language will need to take a copy and post back a translated version.
I have still to decide how many versions to actually build. I shall probably drop the "noht" versions anyway.

Here is the en.h so far, quite a bit more to add, but it shows what will be required.
Note: Most of the strings need to remain the same length. Certain strings, that are actually options, have the first byte coded in octal (base 8) indicating the length of each sub-string option.
Example:
#define STR_V_OPT1 "\007 8 Secs12 Secs16 Secs"
The \007 is octal for 7, then there are 7 characters each for " 8 Secs" "12 Secs" and "16 Secs".

Edit: Other strings also use an octal value as a "horizontal tab" position.
Example:
#define STR_2SOURCE "\002Source"
The text "Source" is displayed indented by 2 characters.



Updated 21/7/2013 09:56 (BST), I missed a few strings! Also added strings for ersky9x.
en.h
(15.64 KiB) Downloaded 349 times
de.h
(15.66 KiB) Downloaded 338 times

And for initial testing here is the built version of er9x-frsky in German with the de.h file as it is so far.
There are some problems with strings too long to sort out.
er9x-frsky-de.zip
19/7/2013 20:21 (BST)
(67.32 KiB) Downloaded 221 times

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

For info, and to avoid duplication of effort, someone is working on a German (de.h) file.

I'm looking into adding some language specific characters to the font.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Er9x language options

Post by gohsthb »

A suggestion, I the string needs to be a specific length. You should add a comment for that line with it's length. Assuming that you aren't already doing that, of course.
-Gohst

Sent from my LG-P999 using Tapatalk 2
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

No, I wasn't doing that (yet). I'll see if I can add some comments to that effect.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

First post updated. I have the Makefile ready and command line options to choose a build with other languages.
Quite a bit of typing to get all the strings into a language specific header so this is on-going.
Beginning to add comments in en.h regarding indexed strings and allowed length of strings so they fit the screen layout.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

First post updated again. I think I now have all the strings in the .h files.
So, if someone has any translated files, post them and I'll add them in.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

I see the en.h file has been downloaded a few times. If you are translating this, please post to say so to avoid duplication of effort, and also so I can put the build code in place.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

First post updated again, I missed a few strings, and I also added defines for strings used in ersky9x only.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

I've committed changes for language options. At present there are 3 language files (en.h, de.h fr.h). Fr.h is waiting for translations so is a copy of en.h. De.h has some translations in it, some strings are currently too long, and is waiting for more translations and strings being shortened.

No hex files have been committed yet.

To build a version with an alternative language, just add a LANG=XX option to the make line, e.g.:
make EXT=FRSKY TEMPLATES=NO PHASES=YES LANG=DE
makes the Frsky version with language 'de'.
make PHASES=YES LANG=DE
makes the standard version

All er9x versions have flight modes enabled (PHASES=YES).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1593
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Er9x language options

Post by ReSt »

Mike,
I have some modified template names.
So will I be able to simply modify the language file and add/ modify entries at will or is there a strict length limit that has to be obeyed?
My longest template name at the moment, is 16 characters long

Reinhard
User avatar
MikeB
9x Developer
Posts: 18010
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Er9x language options

Post by MikeB »

The template names start in the fifth column (of 21) so 16 chars will fit.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1593
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Er9x language options

Post by ReSt »

Thanks, Mike

Reinhard
wombat67
Posts: 25
Joined: Wed Aug 07, 2013 12:07 pm
Country: Australia

Re: Er9x language options

Post by wombat67 »

Hi Mike
Sorry but I have been at this for about 5 hours. I want to change the actual template names. I have tried editing the en language file but I am sure I am doing something wrong. Say I want to change the templates to read:

1 Cars
2 Planes
3 Boats
4 Trains

rather than

1 Simple 4-CH
and so on...

How do I go about this now with the latest release?

Cheers
wombat67
Posts: 25
Joined: Wed Aug 07, 2013 12:07 pm
Country: Australia

Re: Er9x language options

Post by wombat67 »

Hi Mike, Sorry but it looks like a 6th hour was needed. Problem sorted. As above - editing en.lang and not en.h
Cheers

Post Reply

Return to “er9x”