genstrings

NAME
genstrings -- generate string table from source code SYNOPSIS
genstrings [-j] [-a] [-s <routine>] [-skipTable <Table>] [-noPositionalParameters] [-u] [-q] [-o <outputDir>] file ... DESCRIPTION
The genstrings utility generates a .strings file(s) from the C, Objective-C, or Java (.c, .m, or .java) source code file(s) given as the argument(s). A .strings file is used for localizing an application for different languages, as described under "Internationalization" in the Cocoa Developer Documentation. * C and Objective-C: Source lines containing text of the form NSLocalizedString("key", comment) or CFCopyLocalizedString("key", comment) will generate an appropriate string table entry on stdout. Normally, stdout should be directed to a file named Localizable.strings, since this is where the NXLocalString function looks by default for its string table. Source lines containing NSLocalizedStringFromTable("key", Table, comment) or CFCopyLocalizedStringFromTable("key", Table, comment) will generate an appropriate string table entry in a file named Table.strings. Source lines with NSLocalizedStringFromTableInBundle("key", Table, bundle, comment) or CFCopyLocalizedStringFromTableInBundle("key", Table, bundle, comment) will generate an appropriate string table entry in Table.strings. Source lines with NSLocalizedStringWithDefaultValue("key", Table, bundle, "value", comment) or CFCopyLocalizedStringWithDefaultValue("key", Table, bundle, "value", comment) will generate an appropriate string table entry in Table.strings. * Java: The -j option sets the expected input language to Java. In this case the above keywords are changed to Bundle.localizedString, Bundle.localizedStringFromTable, Bundle.localizedStringFromTableInBundle, and Bundle.localizedStringWithDefaultValue (instead of the Objective-C defaults). OPTIONS
-a Allows the output to be appended to the old output files. However, -a causes the results to be appended to the end of the old file and not merged. -s routine Substitutes routine for NSLocalizedString. For example, -s MyLocalString will catch calls to MyLocalString and MyLocalStringFromTable. -skipTable Table Causes genstrings to skip over the file for Table. Note that any entries in this table will not be generated. -noPositionalParameters turns off positional parameter support. -u Allow unicode characters in the value of strings files. Any occurrence of \\Uxxxx (where xxxx are four hex digits) in the source code will be written to the strings file with its Unicode value (in terms of \\Uxxxx) for the key, but the actual Unicode value for its value. For Example, CFCopyLocalizedString(CFSTR("AB\\U0043D"), "Comment") will result in the key/value pair "AB\\U0043D" = "ABCD". -q Turns off multiple key/value pairs warning -o outputDir Specifies what directory the tables should be created in. Mac OS November 13, 2002 Mac OS

manual pages:

3 A B C D E F G H I L M N O P Q R S T U W X _
a b c d e f g h i j k l m n o p q r s t u v w x y z



www.osxterminal.com is a website by Andreas Wacker