genstrings(1) System General Commands Manual genstrings(1)
NAME
genstrings - generates .strings file(s) from your source code.
SYNOPSIS
genstrings [-j] [-a] [-s <routine-name>] [-q] [-o <output directory>]
file1 ... filen
DESCRIPTION
The names of your source files are the arguments: file1 ... filen
* C and Objective-C:
Source lines with NSLocalizedString(keyString, comment) or CFCopyLocal-
izedString(keyString, comment) will generate an appropriate string table
entry on Localizable.strings.
Source lines with NSLocalizedStringFromTable(keyString, tablename, com-
ment) or CFCopyLocalizedStringFromTable(keyString, tablename, comment)
will generate an appropriate string table entry in tablename.strings.
Source lines with NSLocalizedStringFromTableInBundle(keyString, table-
name, bundle, comment) or CFCopyLocalizedStringFromTableInBun-
dle(keyString, tablename, bundle, comment) will generate an appropriate
string table entry in tablename.strings.
Source lines with NSLocalizedStringWithDefaultValue(keyString, tablename,
bundle, valueString, comment) or CFCopyLocalizedStringWithDefault-
Value(keyString, tablename, bundle, valueString, comment) will generate
an appropriate string table entry in tablename.strings.
* Java:
The -j option sets the expected input language to Java. In this case the
above keywords are changed to Bundle.localizedString, Bundle.localized-
StringFromTable, and Bundle.localizedStringFromTableInBundle (instead of
the Objective-C defaults).
Options
-a Allows the output to be appended to the old output files. How-
ever, -a causes the results to be appended to the end of the old
file and not merged.
-s Substitutes its argument for NSLocalizedString. For example, -s
MyLocalString will catch calls to MyLocalString and MyLocal-
StringFromTable.
-q Turns off multiple key/value pairs warning
-o Specifies what directory tables should be created in.
Mac OS April 26, 2002 Mac OS