Display Help Text in French ?

Oct 17, 2012 at 11:20 AM
Edited Oct 17, 2012 at 11:23 AM


In my options class I have some options, for example:

            #region Standard Option Attribute
            [Option("r", "read", Required = true, HelpText = "Chemin & Nom du fichier contenant les Urls a scrapper.")]
            public string InputFile { get; set; }

            [Option("w", "write", HelpText = "Chemin & Nom du fichier dans lequel seront stockés les résultats..")]
            public string OutputFile { get; set; }

But when I display help text, I have "Required."  in text eg

-r, --read     Required. Chemin & Nom du fichier contenant les Urls a scrapper.
Is it possible to display "Obligatoire" instead of "Required" ?
Feb 24, 2013 at 6:22 AM
You've to implement a the equivalent a french version of BaseSentenceBuilder. It's quite trivial, copy the english one translate it:

Take a look of the one implemented in the codebase:

Then pass it to the alternate constructor:

var ht = new HelpText(new FrenchSentenceBuilder());

REMARKS (1): actually AutoBuild do not support this hierarchy (but I can do this change). If you're using it, rather than coding your GetUsage method let me know.

REMARKS (2): this feature is not documented, because it will be soon replaced with an easy way of providing this values using delegates (not so soon, after the next stable, so go for the hint for now)

Did this helped? If not write what you still need.

Feb 24, 2013 at 6:51 AM
I've added this for you in the wiki :))


Have a nice day!
Feb 24, 2013 at 8:09 AM
Great ;)

It helps me.