Er9x language options
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Er9x language options
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.
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.
Mike.
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.
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.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
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.
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: Er9x language options
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
-Gohst
Sent from my LG-P999 using Tapatalk 2
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
No, I wasn't doing that (yet). I'll see if I can add some comments to that effect.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
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.
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!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
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.
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!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
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.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
First post updated again, I missed a few strings, and I also added defines for strings used in ersky9x only.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
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.
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!
The difficult we do immediately,
The impossible takes a little longer!
Re: Er9x language options
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
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
- MikeB
- 9x Developer
- Posts: 18010
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Er9x language options
The template names start in the fifth column (of 21) so 16 chars will fit.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Er9x language options
Thanks, Mike
Reinhard
Reinhard
Re: Er9x language options
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
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
Re: Er9x language options
Hi Mike, Sorry but it looks like a 6th hour was needed. Problem sorted. As above - editing en.lang and not en.h
Cheers
Cheers