Stata 11 help for label_language

help label language dialog: label language -------------------------------------------------------------------------------

Title

[D] label language -- Labels for variables and values in multiple languages

Syntax

List defined languages

label language

Change labels to specified language name

label language languagename

Create new set of labels with specified language name

label language languagename, new [copy]

Rename current label set

label language languagename, rename

Delete specified label set

label language languagename, delete

Menu

Data > Data utilities > Label utilities > Set label language

Description

label language lets you create and use datasets that contain different sets of data, variable, and value labels. A dataset might contain one set in English, another in German, and a third in Spanish. A dataset may contain up to 100 sets of labels.

We will write about the different sets as if they reflect different spoken languages, but you need not use the multiple sets in this way. You could create a dataset with one set of long labels and another set of shorter ones.

One set of labels is in use at any instant, but a dataset may contain multiple sets. You can choose among the sets by typing

. label language languagename

When other Stata commands produce output (such as describe and tabulate), they use the currently set language. When you define or modify the labels by using the other label commands (see [D] label), you modify the current set.

label language (without arguments) lists the available languages and the name of the current one. The current language refers to the labels you will see if you used, say, describe or tabulate. The available languages refer to the names of the other sets of previously created labels. For instance, you might currently be using the labels in en (English), but labels in de (German) and es (Spanish) may also be available.

label language languagename changes the labels to those of the specified language. For instance, if label language revealed that en, de, and es were available, typing label language de would change the current language to de.

label language languagename, new allows you to create a new set of labels and collectively name them languagename. You may name the set as you please, as long as the name does not exceed 24 characters. If the labels correspond to spoken languages, we recommend that you use the language's ISO 639-1 two-letter code, such as en for English, de for German, and es for Spanish. For a complete list of codes, see http://lcweb.loc.gov/standards/iso639-2/iso639jac.html.

label language languagename, rename changes the name of the label set currently in use. If the label set in use were named default and you now wanted to change that to en, you could type label language en, rename.

Our choice of the name default in the example was not accidental. If you have not yet used label language to create a new language, the dataset will have one language, named default.

label language languagename, delete deletes the specified label set. If languagename is also the current language, one of the other available languages becomes the current language.

Option

copy is used with label language, new and copies the labels from the current language to the new language.

Examples

Setup . webuse autom

List defined languages . label language

Change labels to es . label language es

Describe data . describe

Rename current label set to Spanish . label language Spanish, rename

Saved results

label language without arguments saves the following in r():

Scalars r(k) number of languages defined

Macros r(languages) list of languages, listed one after the other r(language) name of current language

Also see

Manual: [D] label language

Help: [D] codebook, [D] label, [D] labelbook


© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index