Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • variable labels in Spanish language

    Hi all

    I have a data where the variables levels are in SPANISH language, what is the efficient way to convert the labels into English please

    I have pasted few variables from the data using the dataex command please

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double(tepsi_int_coo tepsi_int_len tepsi_int_mot tepsi_int_t tvip_pb tvip_pt tvip_int asq_pb_6m asq_int_6m asq_pb_12m asq_int_12m asq_pb_18m asq_int_18m cbcl1_pb_1 cbcl1_pb_2 cbcl1_pb_3 cbcl1_pb_4 cbcl1_pb_5 cbcl1_pb_6)
    1 1 1 1 28 101 3 . . . . . .  0  6  3  2  0 3
    1 1 1 1 26 101 3 . . . . . .  7  5  4  2  1 5
    1 1 1 1 38 116 5 . . . . . .  6  7  4  3  4 3
    1 1 1 1 38 116 5 . . . . . .  6  6  2  5  6 5
    1 1 1 1 39 114 4 . . . . . .  3  4  3  2  2 2
    1 1 1 1 15  84 1 . . . . . .  0  3  2  2  2 6
    1 1 1 1 31 104 3 . . . . . .  5  4  6  2  7 4
    1 1 1 1 25 100 3 . . . . . .  4  6  3  3  6 5
    1 1 1 1 33 107 4 . . . . . .  0  1  2  1  0 5
    1 1 1 1 31 107 4 . . . . . .  6  5  4  2  2 6
    1 1 1 1 26 101 3 . . . . . .  2  2  5  2  0 5
    1 1 1 1 31 107 4 . . . . . .  9 10  7  3  5 6
    1 1 1 1 44 124 5 . . . . . .  3  6  7  2  1 6
    1 1 1 1 28 104 3 . . . . . .  2  5  1  1  1 3
    2 1 1 1 30 106 4 . . . . . .  3  2  1  0  1 4
    1 1 1 1 39 118 5 . . . . . .  5  4  2  4  1 5
    1 1 2 1 25 103 3 . . . . . .  4  7  8  4  4 5
    1 1 1 1 17  93 2 . . . . . .  5  6  1  6  2 4
    1 1 1 1  2  70 1 . . . . . .  5  3  7  2  0 8
    1 1 3 1 27 106 4 . . . . . .  0  1  3  4  2 5
    1 1 1 1 46 130 5 . . . . . .  7  7  7  3  4 4
    1 1 1 1 28 107 4 . . . . . .  7  4  5  3  3 7
    1 1 1 1 35 116 5 . . . . . .  0  3  1  7  2 4
    1 1 1 1 24 104 3 . . . . . .  6  6  2  6  4 6
    1 1 1 1 47 134 6 . . . . . .  4  4  1  2  3 2
    1 1 1 1  9  82 1 . . . . . .  3  8  0  4  8 6
    1 1 1 1 11  86 2 . . . . . .  5  8  4  7  5 5
    1 1 1 1 31 111 4 . . . . . .  1  4  0  2  3 5
    1 1 1 1 15  94 3 . . . . . .  3  2  3  0  1 3
    1 2 1 1 12  90 2 . . . . . .  1  3  5  8  2 3
    1 3 1 2 12  90 2 . . . . . .  3  3  5  1  0 3
    1 1 1 1 17  98 3 . . . . . .  3  3  2  1  2 3
    1 1 1 1  3  77 1 . . . . . .  6  6  1  1  0 5
    2 1 1 1 25 108 4 . . . . . .  3  4  5  8 10 5
    1 1 1 1 13  90 2 . . . . . .  0  2  1  2  0 0
    1 1 1 1  3  74 1 . . . . . .  3  3  4  0  6 7
    2 1 1 1  3  79 1 . . . . . .  1  5  3  2  2 5
    1 1 2 1 17  98 3 . . . . . .  4  2  2  3  3 4
    1 1 1 1 15  94 3 . . . . . .  0  2  2  2  1 3
    2 1 2 2  6  82 1 . . . . . .  1  5  1  3  3 5
    1 1 1 1 47 139 6 . . . . . .  6  0 11  3  7 4
    1 1 1 1 22 107 4 . . . . . .  8 10  5  4  4 7
    1 1 1 1 11  93 2 . . . . . .  9 13  3 10 10 8
    3 1 1 1 30 118 5 . . . . . .  7  6  3  4  6 3
    1 1 2 1 15  97 3 . . . . . .  2  3  0  5  6 7
    1 2 2 2 15  98 3 . . . . . .  2  5  5  3  1 3
    1 1 1 1 24 110 4 . . . . . .  3  7  4  4  0 5
    1 1 1 1 17  99 3 . . . . . .  6  8  7  4  1 4
    1 1 1 1  9  91 2 . . . . . .  4  1  6  4  3 5
    1 1 1 1 15  98 3 . . . . . .  0  2  1  4  0 6
    2 1 1 1 26 111 4 . . . . . .  2  0  5  2  0 1
    1 1 1 1 20 107 4 . . . . . .  1  3  4  3  2 3
    1 3 2 2  2  82 1 . . . . . .  5  4  5  0  4 6
    1 1 1 1 26 114 4 . . . . . .  0  0  2  4  0 0
    1 1 1 1 19 106 4 . . . . . .  9  8  5  6  0 6
    1 1 1 1 36 130 5 . . . . . .  2  4  0  1  4 3
    1 1 1 1 31 124 5 . . . . . .  0  4  3  8  6 5
    1 1 1 1 15 103 3 . . . . . . 10 12  8  7  5 8
    2 1 1 1  0  81 1 . . . . . .  5 10  4  3  2 6
    1 1 1 1 17 104 3 . . . . . .  3  6  3  2  6 5
    1 1 1 1  6  89 2 . . . . . .  1  4  4  4  1 3
    3 3 3 3  0  82 1 . . . . . .  9  6  6 11  4 8
    1 1 1 1 35 131 6 . . . . . .  0  0  0  1  3 5
    1 1 1 1 14 102 3 . . . . . .  5  8  2  7  2 6
    1 1 2 1 20 111 4 . . . . . .  5  6  3  6  1 5
    1 1 1 1 23 115 5 . . . . . .  2  5  2  2  0 2
    2 1 2 2 17 107 4 . . . . . .  0  2  3  2  0 6
    1 1 1 1 24 118 5 . . . . . .  2  5  1  2  5 5
    1 1 1 1 29 126 5 . . . . . .  0  4  3  1  1 3
    1 1 1 1 24 118 5 . . . . . .  7  4  5  6  1 6
    3 3 3 3  0  86 2 . . . . . .  4  4  4  3  1 2
    2 3 3 3  0  87 2 . . . . . .  2  5  1  7  0 2
    1 2 2 1  0  87 2 . . . . . .  6  8 13  4  7 5
    2 2 1 2  4  89 2 . . . . . .  0  2  4  4  3 3
    1 2 1 1 15 107 4 . . . . . .  4  5  3  4  2 4
    1 1 1 1  8  98 3 . . . . . .  4  7  4  8  0 4
    1 2 1 1  0  87 2 . . . . . .  7 10  8  3  2 5
    1 1 1 1 15 108 4 . . . . . .  3  4  1  1  1 6
    1 2 1 1  3  93 2 . . . . . .  1  4  3  4  1 3
    2 2 1 2  0  88 2 . . . . . .  5  8  2  8  4 6
    1 1 1 1 23 121 5 . . . . . .  9  3  7  5  5 7
    1 1 1 1  3  90 2 . . . . . .  0  4  4  3  4 2
    1 1 1 1  4  92 2 . . . . . .  2  1  8  2  0 6
    1 1 1 1 10 101 3 . . . . . .  0  4  3  2  2 4
    1 1 1 1 14 107 4 . . . . . .  6  6  4  5  2 7
    1 1 1 1  3  93 2 . . . . . .  7  6  0  8  4 7
    1 1 1 1  0  88 2 . . . . . .  0  2  2  3  1 2
    1 2 1 1 23 123 5 . . . . . .  4  5  2  2  4 3
    2 2 2 3  4  95 3 . . . . . .  5  5  7  2  6 2
    1 1 1 1  3  94 3 . . . . . .  9  8  4  6  6 4
    1 1 1 1 19 117 5 . . . . . .  1  3  4  5  1 4
    2 1 1 1  7 100 3 . . . . . .  4  4  0  0  0 6
    1 2 1 1  9 104 3 . . . . . .  6  6  8  7  3 5
    1 1 1 1  2  93 2 . . . . . .  4  6  5  1  8 5
    1 2 1 1  0  91 2 . . . . . .  0  2  0  2  2 4
    2 2 1 2  0  92 2 . . . . . .  1  3  1  0  3 6
    1 1 1 1 11 107 4 . . . . . .  3  6  2  8  6 6
    1 1 1 1  8 102 3 . . . . . .  .  .  .  .  . .
    1 1 1 1  2  95 3 . . . . . .  1  1  2  3  0 5
    2 2 1 1 12 109 4 . . . . . .  2  4  8  1  8 5
    end
    label values tepsi_int_coo tepsi_categ
    label values tepsi_int_len tepsi_categ
    label values tepsi_int_mot tepsi_categ
    label values tepsi_int_t tepsi_categ
    label def tepsi_categ 1 "Normalidad", modify
    label def tepsi_categ 2 "Riesgo", modify
    label def tepsi_categ 3 "Retraso", modify
    label values tvip_int lblppvt
    label def lblppvt 1 "Moderadamente Bajo", modify
    label def lblppvt 2 "Promedio Bajo", modify
    label def lblppvt 3 "Promedio", modify
    label def lblppvt 4 "Promedio Alto", modify
    label def lblppvt 5 "Moderadamente Alto", modify
    label def lblppvt 6 "Extremadamente Alto", modify
    label values asq_int_6m lblol
    label values asq_int_12m lblol
    label values asq_int_18m lblol
    ------------------ copy up to and including the previous line ------------------

    Listed 100 out of 14161 observations
    Use the count() option to list more



  • #2
    First, Have a look at -help label language- - it is possible to manage several languages in Stata.
    Second, I think you have to translate them. I suggest using deepl.com
    Maybe someone has build a script to automatically translate via API but I haven't yet.

    Comment


    • #3
      Not sure what kind of answer you expect there.

      Stata won't do it for you, as I guess you know.

      The trade-off otherwise is delicate: use a dictionary, use Google, ask a friend. I have never learned Spanish properly but I have found that Google provides plausible translations of small posts. But there is a small but definite risk that you'll get something wildly wrong and by accident use wording that looks incompetent or ridiculous or even offensive. Technical words can be tricky.

      If this were my problem I would use Google translate and then ask someone fluent to look over what I had done.

      Comment


      • #4
        Nick Cox Thanks

        is there a way that I can download the variable's names and labels as a text file and after that I replace the labels (from Spanish to English) and update in the Stata using a command? can this work.

        Comment


        • #5
          You can use label save (see help label) to save the definitions of value labels in a do-file. Then, you can edit that do-file and copy back that code into your own do-file, or else run that file itself from another do-file.

          Comment


          • #6
            Also, see Weesie (2005).


            Weesie, J. 2005. Multilingual datasets. The Stata Journal, 5(2): 162--187.

            Comment


            • #7
              Code:
              help describe
              tells how to get a dataset out of your variable information. Then you can export as desired.

              Comment


              • #8
                Note that the question in #1 repeatedly mentions variable labels, but may be in part about value labels, which is what some people are guessing.

                Comment

                Working...
                X