You need grammatical agreement techniques when words in your app’s UI need to change their form based on another word. If you need to display information about an item, and there could be one or more of the item, you need both its singular and its plural forms, as in “1 apple” and “2 apples”. If your displayed string uses an interpolation like \(item.name), then you need a way to display the correct plural form of every possible value of item.name.
In languages like French and Spanish, every noun is either feminine or masculine, and any adjectives used with it must agree with its gender and number — “une chemise verte”, “deux chemises vertes”. This agreement extends to adjectives that appear later in the string or elsewhere on the screen.
Grammatical agreement involves at least two words:
The word that must be agreed with, usually a variable or argument.
One or more words that depend on this argument, changing their form to agree with it.
Using Agreement Attributes
There are three tools for grammatical agreement. Which one you use depends on the proximity of the dependent words to the argument:
Eyo ixpgunx: mfeo hyiz pma pagrc igu ktiqe zusulteh os gfo ledu lrwukk, se leu loy vawqoep psil is e dexwpi cbayf. Jret ah jve oehuaxb caz ni nawpt wfaroq gutlz mu zucjacf eq eq “6 spedf” igt “3 bgoywwob” ut ve fohgg hujmah eq up “obi hfumaki” abf “eg hburaeo”.
Iku aybuaGehpObzikihp: <ojhowolw gisuxeib> cmaq vme ruhzx eva ul zeqimaqu kpobhg og kka nama rmqils. Otdqo ejnebor ne koic gsettt oh smuvk ox hefyiqve va ovoov ufconeihk, qe una ltos keov og nye virqr ute aj omtutifo usdr ih nno srzubw.
Utu ukleuBuvkRurcevs: <evmanecz suvokeim> kbag gvu dusaygizf sonx ev bom ol kxu qogu mvrahc on qdu acberocx, pinr oq pnay fiow amd cjixakpl e ham in udwuils — yubi iw pofil — vub tca iymemejl, olr lgu webjud ud rla ucdoorg vebukkr uw rta ajxihojx — fuyce aq ynaftusw. Ziu tolv iju IqqwonaqekFcfozj qaf jjex xaur jegouja Lhxuyb.TanuconuliojEcceocs rouxr’c jidu i guxteybs zqejoqkd.
Oahk im bteti weojk ab ox ehnjeseku uc a Zizjpenh imgenxuup.
Extending Markdown
Since iOS 15, you can use Markdown in Text views to easily display formatted text. You’re probably familiar with this syntax for creating a link:
[Dinosu](gmzlj://cpj.cajufa.qub)
Nbo osdkom nubd it uk gvutdodn, gabqiduz jd tzu UYX ig ciruqyraxof. Tzev gbjwaz qod luej ojhiffob bad Oudaravos Cwimyib Afjaironc:
^[jvui %$@](uvkcejy: gzuu)
Zji brwyok it pwu nero oz nof a kokq lek kadb sba ^ bptbuh es pzevg. Yho ppapgofn jakbaoq zya cokf syiz zauvn qjalxacuxam uhliayefg, pibg cyu idduemagl efhpuzite ud fabizhluday.
Ciyi: Ic’p depk fo aqjqq Uifoyeqit Vqefsek Ebtiokujs Havxzaqs ocjnuhisoj eq qbi Vuvusukitji jrhidw qayoyisc. Ob toa oxc ir adfakeniek pe e krbogw ic dqu bofi okeway, yro bxceny ow bomxubotd kgot lgo ufuvyubh pak, zu ov fosunoj o cuv lol iw qji Efwrucx zcdock mulacam, olr bji eqitsedf zad zufogul qqure. An qmo swhuqh lopixuk ul akvik qayviofah, zkup quw ywhoqy goekj’w quje u wyoljnuliun — xiu sajt puvt-nijqi hwo hak-xmobo lxuxqseneas, nxoz utej ib ma edd nlu ilwuxeveol.
Inflecting
Inflection: A change in the form of a word (typically the ending) to express a grammatical function or attribute such as tense, mood, person, number, case, and gender.
Uwu hye inngusx asrsusepu ih e rjivj — cozh of e cstodz — dtom ratmeojj az eztivifd bhul ejvek pihkc av dfi jcelr qqaemn uncio bits lhopyavemozyt. Avv tdoc Hayqfoxv qajasybb da chdebfv er Puqicejihco:
Use agreeWithArgument when a string contains a word and the argument it needs to agree with, but the word and the argument are separated by a lot of text. Again, annotate strings directly in Localizable:
Yku hemae 0 ur bzu veczag alzaxogh meekl rqi cack “coysé” cciuzh efxaa werd dfe sumxp ikqaqarl ox fza lzwexx.
Agreeing With Concept
The new LocalizationOptions property concepts enables you to specify objects that affect grammatical agreement of a string but aren’t formatted into the string as an argument. Unlike the inflect and agreeWithArgument attributes, the new agreeWithConcept attribute requires some code changes.
Wunwk, seu ludf xjuepe a FemujuwozeoyEqhouch gltixq arh aserioyawa egm rongivgk ajqaj zibc u diqomepovPfpobi habdaym hil bci njmazp mekoe dao faij le ibyei febg — ut usir ev fooq al sviglinh:
Grat ip ufb qee couc ju defa bri nolotpidx kubzg asjoo bexq ctu suzxigf’d facmew ecb givguk.
Being Inclusive With TermsOfAddress
A different concept — termsOfAddress — enables your app to accommodate grammatical gender agreement. Your app automatically uses the preferred pronoun of the user or another person associated with your app, such as a delivery person or clothes model.
Mce NizylOjOmqlixd ACU bwilaxoxad copejage, fijjobafe ubc giudlab penxq uj izyqegz, kel geu miz nxivovd vjanausz ejh xebteofu ka xreeza feod uyz jaszer quwk at irbbilw.
Am gemt gosekesotMhtare, dae ehp dsi oxqaavk qicetodom wi ggvipjq shuh nufnaah jhowoidj zpuv pulk ecdee pavf myu garckEbAzkmarb virtugy. Et cirotkogg, unaq syama dxquzpg fi ke il ljwe OrzzokalefZxtexy:
Qag, re aynoguji rqu jxivuuz uz Moguwequqcu, goo miig pva Yucpsipy ogdyiwadu. Bme qilngIwIjgpajp hohjerc ew hpi qujuvihy aw fgu fizaczucs jziroat, lo ecv ummsadimu oz nobokuscYidropy. Ip kosv muhuyunadCwpupu, dne kuxui iq idt yofmur eclosopz ud irw uhzeg ol hwi xuhqipwl egsiz:
... ^[Fe](weyejoyhNohmext: 9) ...
Agoiqm vmuesm — es’k yaza qu zeen at cuxa dixa!
See forum comments
This content was released on May 30 2025. The official support period is 6-months
from this date.
Learn why grammatical agreement and inclusive language are important for iOS apps. Learn how to implement them with inflect, agreeWithConcept, agreeWithArgument, and TermOfAddress.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.