What would be the proper way of outputting a % sign, it's giving me
this error on a regular string saying 3%




On Dec 6, 3:08 pm, Romain Guy <[email protected]> wrote:
> It wouldn't. What if you translate your app in a language where the second
> value should appear first? The translation would be $2%s $1%s and the code
> wouldn't change.
>
> On Mon, Dec 6, 2010 at 12:04 PM, Streets Of Boston
> <[email protected]>wrote:
>
>
>
>
>
>
>
>
>
> > Thank you!
>
> > That's new to me, though....
>
> > I thought that the position/order of the arguments of the code that
> > calls the getString method would take care of this.
>
> > On Dec 6, 2:56 pm, Romain Guy <[email protected]> wrote:
> > > To make this work correctly across multiple locales, you should use the
> > > following syntax:
>
> > > $1%s $2%s
>
> > > On Mon, Dec 6, 2010 at 11:47 AM, Streets Of Boston
> > > <[email protected]>wrote:
>
> > > > When this string is in my strings.xml
>
> > > >   <string name="home_activity_header_name">%s %s</string>
>
> > > > I get this error when compiling the source-code:
> > > > "error: Multiple substitutions specified in non-positional format; did
> > > > you mean to add the formatted="false" attribute"
>
> > > > I just upgraded to the newest tools (v 8.0.0) and downloaded the
> > > > latest SDK (2.3).
> > > > I compile under apil-leverl 8 and i tried compiling under api-level 9.
>
> > > > Why does this error suddenly appear?
> > > > Is there a way to get rid of it?
>
> > > > Thanks!
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<android-developers%2Bunsubs
> > > >  [email protected]>
> > <android-developers%2bunsubs­[email protected]>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support.  All such questions should be posted on public
> > > forums, where I and others can see and answer them- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2Bunsubs 
> > [email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to