0

I am tring to use plurals

<plurals name="days">
  <item quantity="one"  >%1$d = @string/day_one</item>
  <item quantity="few"  >%1$d = @string/day_few</item>
  <item quantity="many" >%1$d = @string/day_many</item>
  <item quantity="other">%1$d = @string/day_many</item>
</plurals>

Where @string/day_* referes to diffrent day translations, however I get:

0 = @string/day_one
David Guyon
  • 2,759
  • 1
  • 28
  • 40
Yarh
  • 4,459
  • 5
  • 45
  • 95

3 Answers3

0

you can't do that. You have to move %1$d = to the single string, and only then you can reference the single string. Concatenation does not work

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
0

You can reference string on xml but it has to be the entire string like this:

<string name="message_title">@string/app_name</string>

More here.

Community
  • 1
  • 1
amalBit
  • 12,041
  • 6
  • 77
  • 94
0

you can try this

<plurals name="days">
    <item quantity="one">%d day</item>
    <item quantity="other">%d days!</item>
</plurals>
khyper
  • 124
  • 1
  • 6