Professional Web Applications Themes

Purpose of comment in CFCopyLocalizedString? - Mac Programming

What is the purpose of the comment parameter passed to CFCopyLocalizedString? It seems like the string should be fully identified by the key parameter. Also, what text encoding is expected to be used for the string passed as the comment? -- -Thomas <http://www.bitjuggler.com/>...

  1. #1

    Default Purpose of comment in CFCopyLocalizedString?

    What is the purpose of the comment parameter passed to
    CFCopyLocalizedString? It seems like the string should be fully
    identified by the key parameter. Also, what text encoding is expected
    to be used for the string passed as the comment?

    --
    -Thomas

    <http://www.bitjuggler.com/>
    Thomas Guest

  2. #2

    Default Re: Purpose of comment in CFCopyLocalizedString?

    In article <150520040837297129%spam.me>,
    Thomas Reed <spam.me> wrote:
     

    See
    <http://developer.apple.com/doentation/CoreFoundation/Reference/CFBund
    leRef/Reference/function_group_4.html#//apple_ref/c/func/CFCopyLocalizedS
    tring>

    "comment A comment to provide the translators with contextual
    information necessary for proper translation

    [...]
    Discussion

    This is a macro variant of CFBundleCopyLocalizedString for use with
    the genstrings tool.

    I haven't checked this, but I would guess that the macro does not use
    the 'comment' parameter at all.
     

    CFString is an abstract class. It does not have a text encoding. The
    implementation has at least one, but that should not matter to you; all
    that matters is the CFString interface.

    To construct a CFString, use:

    - CFSTR if you have ASCII characters
    - CFStringCreateWithCharacters if you have Unicode characters
    - One of the other CFStringCreateWith calls if you have the text in
    some other encoding

    See
    <http://developer.apple.com/doentation/CoreFoundation/Reference/CFStri
    ngRef/>

    Reinder
    Reinder Guest

  3. #3

    Default Re: Purpose of comment in CFCopyLocalizedString?

    In article <150520040837297129%spam.me>,
    Thomas Reed <spam.me> wrote:
     

    The comment is put as a comment in the .strings file when you use
    genstrings to make the file. This helps the localizers clarify where it
    is used and in what context.


    Jim Guest

Similar Threads

  1. Purpose of Contribute
    By Seraya in forum Macromedia Contribute General Discussion
    Replies: 2
    Last Post: April 13th, 02:48 PM
  2. CFCopyLocalizedString problems
    By Frederick Cheung in forum Mac Programming
    Replies: 6
    Last Post: August 17th, 01:31 PM
  3. Purpose of this group?
    By A. in forum Mac Applications & Software
    Replies: 5
    Last Post: July 29th, 03:58 PM
  4. purpose of threads?
    By Paul Archer in forum PERL Miscellaneous
    Replies: 0
    Last Post: July 9th, 02:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139