gettext.html 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036
  1. <html lang="en">
  2. <head>
  3. <title>GNU `gettext' utilities</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="description" content="GNU `gettext' utilities">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="top" href="#Top">
  8. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  9. <meta http-equiv="Content-Style-Type" content="text/css">
  10. <style type="text/css"><!--
  11. pre.display { font-family:inherit }
  12. pre.format { font-family:inherit }
  13. pre.smalldisplay { font-family:inherit; font-size:smaller }
  14. pre.smallformat { font-family:inherit; font-size:smaller }
  15. pre.smallexample { font-size:smaller }
  16. pre.smalllisp { font-size:smaller }
  17. span.sc { font-variant:small-caps }
  18. span.roman { font-family:serif; font-weight:normal; }
  19. span.sansserif { font-family:sans-serif; font-weight:normal; }
  20. --></style>
  21. </head>
  22. <body>
  23. <h1 class="settitle">GNU `gettext' utilities</h1>
  24. <div class="contents">
  25. <h2>Table of Contents</h2>
  26. <ul>
  27. <li><a name="toc_Top" href="#Top">GNU <code>gettext</code> utilities</a>
  28. <li><a name="toc_Introduction" href="#Introduction">1 Introduction</a>
  29. <ul>
  30. <li><a href="#Why">1.1 The Purpose of GNU <code>gettext</code></a>
  31. <li><a href="#Concepts">1.2 I18n, L10n, and Such</a>
  32. <li><a href="#Aspects">1.3 Aspects in Native Language Support</a>
  33. <li><a href="#Files">1.4 Files Conveying Translations</a>
  34. <li><a href="#Overview">1.5 Overview of GNU <code>gettext</code></a>
  35. </li></ul>
  36. <li><a name="toc_Users" href="#Users">2 The User's View</a>
  37. <ul>
  38. <li><a href="#System-Installation">2.1 Operating System Installation</a>
  39. <li><a href="#Setting-the-GUI-Locale">2.2 Setting the Locale Used by GUI Programs</a>
  40. <li><a href="#Setting-the-POSIX-Locale">2.3 Setting the Locale through Environment Variables</a>
  41. <ul>
  42. <li><a href="#Locale-Names">2.3.1 Locale Names</a>
  43. <li><a href="#Locale-Environment-Variables">2.3.2 Locale Environment Variables</a>
  44. <li><a href="#The-LANGUAGE-variable">2.3.3 Specifying a Priority List of Languages</a>
  45. </li></ul>
  46. <li><a href="#Installing-Localizations">2.4 Installing Translations for Particular Programs</a>
  47. </li></ul>
  48. <li><a name="toc_PO-Files" href="#PO-Files">3 The Format of PO Files</a>
  49. <li><a name="toc_Sources" href="#Sources">4 Preparing Program Sources</a>
  50. <ul>
  51. <li><a href="#Importing">4.1 Importing the <code>gettext</code> declaration</a>
  52. <li><a href="#Triggering">4.2 Triggering <code>gettext</code> Operations</a>
  53. <li><a href="#Preparing-Strings">4.3 Preparing Translatable Strings</a>
  54. <li><a href="#Mark-Keywords">4.4 How Marks Appear in Sources</a>
  55. <li><a href="#Marking">4.5 Marking Translatable Strings</a>
  56. <li><a href="#c_002dformat-Flag">4.6 Special Comments preceding Keywords</a>
  57. <li><a href="#Special-cases">4.7 Special Cases of Translatable Strings</a>
  58. <li><a href="#Bug-Report-Address">4.8 Letting Users Report Translation Bugs</a>
  59. <li><a href="#Names">4.9 Marking Proper Names for Translation</a>
  60. <li><a href="#Libraries">4.10 Preparing Library Sources</a>
  61. </li></ul>
  62. <li><a name="toc_Template" href="#Template">5 Making the PO Template File</a>
  63. <ul>
  64. <li><a href="#xgettext-Invocation">5.1 Invoking the <code>xgettext</code> Program</a>
  65. <ul>
  66. <li><a href="#xgettext-Invocation">5.1.1 Input file location</a>
  67. <li><a href="#xgettext-Invocation">5.1.2 Output file location</a>
  68. <li><a href="#xgettext-Invocation">5.1.3 Choice of input file language</a>
  69. <li><a href="#xgettext-Invocation">5.1.4 Input file interpretation</a>
  70. <li><a href="#xgettext-Invocation">5.1.5 Operation mode</a>
  71. <li><a href="#xgettext-Invocation">5.1.6 Language specific options</a>
  72. <li><a href="#xgettext-Invocation">5.1.7 Output details</a>
  73. <li><a href="#xgettext-Invocation">5.1.8 Informative output</a>
  74. </li></ul>
  75. </li></ul>
  76. <li><a name="toc_Creating" href="#Creating">6 Creating a New PO File</a>
  77. <ul>
  78. <li><a href="#msginit-Invocation">6.1 Invoking the <code>msginit</code> Program</a>
  79. <ul>
  80. <li><a href="#msginit-Invocation">6.1.1 Input file location</a>
  81. <li><a href="#msginit-Invocation">6.1.2 Output file location</a>
  82. <li><a href="#msginit-Invocation">6.1.3 Input file syntax</a>
  83. <li><a href="#msginit-Invocation">6.1.4 Output details</a>
  84. <li><a href="#msginit-Invocation">6.1.5 Informative output</a>
  85. </li></ul>
  86. <li><a href="#Header-Entry">6.2 Filling in the Header Entry</a>
  87. </li></ul>
  88. <li><a name="toc_Updating" href="#Updating">7 Updating Existing PO Files</a>
  89. <ul>
  90. <li><a href="#msgmerge-Invocation">7.1 Invoking the <code>msgmerge</code> Program</a>
  91. <ul>
  92. <li><a href="#msgmerge-Invocation">7.1.1 Input file location</a>
  93. <li><a href="#msgmerge-Invocation">7.1.2 Operation mode</a>
  94. <li><a href="#msgmerge-Invocation">7.1.3 Output file location</a>
  95. <li><a href="#msgmerge-Invocation">7.1.4 Output file location in update mode</a>
  96. <li><a href="#msgmerge-Invocation">7.1.5 Operation modifiers</a>
  97. <li><a href="#msgmerge-Invocation">7.1.6 Input file syntax</a>
  98. <li><a href="#msgmerge-Invocation">7.1.7 Output details</a>
  99. <li><a href="#msgmerge-Invocation">7.1.8 Informative output</a>
  100. </li></ul>
  101. </li></ul>
  102. <li><a name="toc_Editing" href="#Editing">8 Editing PO Files</a>
  103. <ul>
  104. <li><a href="#KBabel">8.1 KDE's PO File Editor</a>
  105. <li><a href="#Gtranslator">8.2 GNOME's PO File Editor</a>
  106. <li><a href="#PO-Mode">8.3 Emacs's PO File Editor</a>
  107. <ul>
  108. <li><a href="#Installation">8.3.1 Completing GNU <code>gettext</code> Installation</a>
  109. <li><a href="#Main-PO-Commands">8.3.2 Main PO mode Commands</a>
  110. <li><a href="#Entry-Positioning">8.3.3 Entry Positioning</a>
  111. <li><a href="#Normalizing">8.3.4 Normalizing Strings in Entries</a>
  112. <li><a href="#Translated-Entries">8.3.5 Translated Entries</a>
  113. <li><a href="#Fuzzy-Entries">8.3.6 Fuzzy Entries</a>
  114. <li><a href="#Untranslated-Entries">8.3.7 Untranslated Entries</a>
  115. <li><a href="#Obsolete-Entries">8.3.8 Obsolete Entries</a>
  116. <li><a href="#Modifying-Translations">8.3.9 Modifying Translations</a>
  117. <li><a href="#Modifying-Comments">8.3.10 Modifying Comments</a>
  118. <li><a href="#Subedit">8.3.11 Details of Sub Edition</a>
  119. <li><a href="#C-Sources-Context">8.3.12 C Sources Context</a>
  120. <li><a href="#Auxiliary">8.3.13 Consulting Auxiliary PO Files</a>
  121. </li></ul>
  122. <li><a href="#Compendium">8.4 Using Translation Compendia</a>
  123. <ul>
  124. <li><a href="#Creating-Compendia">8.4.1 Creating Compendia</a>
  125. <ul>
  126. <li><a href="#Creating-Compendia">8.4.1.1 Concatenate PO Files</a>
  127. <li><a href="#Creating-Compendia">8.4.1.2 Extract a Message Subset from a PO File</a>
  128. </li></ul>
  129. <li><a href="#Using-Compendia">8.4.2 Using Compendia</a>
  130. <ul>
  131. <li><a href="#Using-Compendia">8.4.2.1 Initialize a New Translation File</a>
  132. <li><a href="#Using-Compendia">8.4.2.2 Update an Existing Translation File</a>
  133. </li></ul>
  134. </li></ul>
  135. </li></ul>
  136. <li><a name="toc_Manipulating" href="#Manipulating">9 Manipulating PO Files</a>
  137. <ul>
  138. <li><a href="#msgcat-Invocation">9.1 Invoking the <code>msgcat</code> Program</a>
  139. <ul>
  140. <li><a href="#msgcat-Invocation">9.1.1 Input file location</a>
  141. <li><a href="#msgcat-Invocation">9.1.2 Output file location</a>
  142. <li><a href="#msgcat-Invocation">9.1.3 Message selection</a>
  143. <li><a href="#msgcat-Invocation">9.1.4 Input file syntax</a>
  144. <li><a href="#msgcat-Invocation">9.1.5 Output details</a>
  145. <li><a href="#msgcat-Invocation">9.1.6 Informative output</a>
  146. </li></ul>
  147. <li><a href="#msgconv-Invocation">9.2 Invoking the <code>msgconv</code> Program</a>
  148. <ul>
  149. <li><a href="#msgconv-Invocation">9.2.1 Input file location</a>
  150. <li><a href="#msgconv-Invocation">9.2.2 Output file location</a>
  151. <li><a href="#msgconv-Invocation">9.2.3 Conversion target</a>
  152. <li><a href="#msgconv-Invocation">9.2.4 Input file syntax</a>
  153. <li><a href="#msgconv-Invocation">9.2.5 Output details</a>
  154. <li><a href="#msgconv-Invocation">9.2.6 Informative output</a>
  155. </li></ul>
  156. <li><a href="#msggrep-Invocation">9.3 Invoking the <code>msggrep</code> Program</a>
  157. <ul>
  158. <li><a href="#msggrep-Invocation">9.3.1 Input file location</a>
  159. <li><a href="#msggrep-Invocation">9.3.2 Output file location</a>
  160. <li><a href="#msggrep-Invocation">9.3.3 Message selection</a>
  161. <li><a href="#msggrep-Invocation">9.3.4 Input file syntax</a>
  162. <li><a href="#msggrep-Invocation">9.3.5 Output details</a>
  163. <li><a href="#msggrep-Invocation">9.3.6 Informative output</a>
  164. <li><a href="#msggrep-Invocation">9.3.7 Examples</a>
  165. </li></ul>
  166. <li><a href="#msgfilter-Invocation">9.4 Invoking the <code>msgfilter</code> Program</a>
  167. <ul>
  168. <li><a href="#msgfilter-Invocation">9.4.1 Input file location</a>
  169. <li><a href="#msgfilter-Invocation">9.4.2 Output file location</a>
  170. <li><a href="#msgfilter-Invocation">9.4.3 The filter</a>
  171. <li><a href="#msgfilter-Invocation">9.4.4 Useful <var>filter-option</var>s when the <var>filter</var> is &lsquo;<samp><span class="samp">sed</span></samp>&rsquo;</a>
  172. <li><a href="#msgfilter-Invocation">9.4.5 Built-in <var>filter</var>s</a>
  173. <li><a href="#msgfilter-Invocation">9.4.6 Input file syntax</a>
  174. <li><a href="#msgfilter-Invocation">9.4.7 Output details</a>
  175. <li><a href="#msgfilter-Invocation">9.4.8 Informative output</a>
  176. <li><a href="#msgfilter-Invocation">9.4.9 Examples</a>
  177. </li></ul>
  178. <li><a href="#msguniq-Invocation">9.5 Invoking the <code>msguniq</code> Program</a>
  179. <ul>
  180. <li><a href="#msguniq-Invocation">9.5.1 Input file location</a>
  181. <li><a href="#msguniq-Invocation">9.5.2 Output file location</a>
  182. <li><a href="#msguniq-Invocation">9.5.3 Message selection</a>
  183. <li><a href="#msguniq-Invocation">9.5.4 Input file syntax</a>
  184. <li><a href="#msguniq-Invocation">9.5.5 Output details</a>
  185. <li><a href="#msguniq-Invocation">9.5.6 Informative output</a>
  186. </li></ul>
  187. <li><a href="#msgcomm-Invocation">9.6 Invoking the <code>msgcomm</code> Program</a>
  188. <ul>
  189. <li><a href="#msgcomm-Invocation">9.6.1 Input file location</a>
  190. <li><a href="#msgcomm-Invocation">9.6.2 Output file location</a>
  191. <li><a href="#msgcomm-Invocation">9.6.3 Message selection</a>
  192. <li><a href="#msgcomm-Invocation">9.6.4 Input file syntax</a>
  193. <li><a href="#msgcomm-Invocation">9.6.5 Output details</a>
  194. <li><a href="#msgcomm-Invocation">9.6.6 Informative output</a>
  195. </li></ul>
  196. <li><a href="#msgcmp-Invocation">9.7 Invoking the <code>msgcmp</code> Program</a>
  197. <ul>
  198. <li><a href="#msgcmp-Invocation">9.7.1 Input file location</a>
  199. <li><a href="#msgcmp-Invocation">9.7.2 Operation modifiers</a>
  200. <li><a href="#msgcmp-Invocation">9.7.3 Input file syntax</a>
  201. <li><a href="#msgcmp-Invocation">9.7.4 Informative output</a>
  202. </li></ul>
  203. <li><a href="#msgattrib-Invocation">9.8 Invoking the <code>msgattrib</code> Program</a>
  204. <ul>
  205. <li><a href="#msgattrib-Invocation">9.8.1 Input file location</a>
  206. <li><a href="#msgattrib-Invocation">9.8.2 Output file location</a>
  207. <li><a href="#msgattrib-Invocation">9.8.3 Message selection</a>
  208. <li><a href="#msgattrib-Invocation">9.8.4 Attribute manipulation</a>
  209. <li><a href="#msgattrib-Invocation">9.8.5 Input file syntax</a>
  210. <li><a href="#msgattrib-Invocation">9.8.6 Output details</a>
  211. <li><a href="#msgattrib-Invocation">9.8.7 Informative output</a>
  212. </li></ul>
  213. <li><a href="#msgen-Invocation">9.9 Invoking the <code>msgen</code> Program</a>
  214. <ul>
  215. <li><a href="#msgen-Invocation">9.9.1 Input file location</a>
  216. <li><a href="#msgen-Invocation">9.9.2 Output file location</a>
  217. <li><a href="#msgen-Invocation">9.9.3 Input file syntax</a>
  218. <li><a href="#msgen-Invocation">9.9.4 Output details</a>
  219. <li><a href="#msgen-Invocation">9.9.5 Informative output</a>
  220. </li></ul>
  221. <li><a href="#msgexec-Invocation">9.10 Invoking the <code>msgexec</code> Program</a>
  222. <ul>
  223. <li><a href="#msgexec-Invocation">9.10.1 Input file location</a>
  224. <li><a href="#msgexec-Invocation">9.10.2 Input file syntax</a>
  225. <li><a href="#msgexec-Invocation">9.10.3 Informative output</a>
  226. </li></ul>
  227. <li><a href="#Colorizing">9.11 Highlighting parts of PO files</a>
  228. <ul>
  229. <li><a href="#The-_002d_002dcolor-option">9.11.1 The <code>--color</code> option</a>
  230. <li><a href="#The-TERM-variable">9.11.2 The environment variable <code>TERM</code></a>
  231. <li><a href="#The-_002d_002dstyle-option">9.11.3 The <code>--style</code> option</a>
  232. <li><a href="#Style-rules">9.11.4 Style rules for PO files</a>
  233. <li><a href="#Customizing-less">9.11.5 Customizing <code>less</code> for viewing PO files</a>
  234. </li></ul>
  235. <li><a href="#libgettextpo">9.12 Writing your own programs that process PO files</a>
  236. </li></ul>
  237. <li><a name="toc_Binaries" href="#Binaries">10 Producing Binary MO Files</a>
  238. <ul>
  239. <li><a href="#msgfmt-Invocation">10.1 Invoking the <code>msgfmt</code> Program</a>
  240. <ul>
  241. <li><a href="#msgfmt-Invocation">10.1.1 Input file location</a>
  242. <li><a href="#msgfmt-Invocation">10.1.2 Operation mode</a>
  243. <li><a href="#msgfmt-Invocation">10.1.3 Output file location</a>
  244. <li><a href="#msgfmt-Invocation">10.1.4 Output file location in Java mode</a>
  245. <li><a href="#msgfmt-Invocation">10.1.5 Output file location in C# mode</a>
  246. <li><a href="#msgfmt-Invocation">10.1.6 Output file location in Tcl mode</a>
  247. <li><a href="#msgfmt-Invocation">10.1.7 Input file syntax</a>
  248. <li><a href="#msgfmt-Invocation">10.1.8 Input file interpretation</a>
  249. <li><a href="#msgfmt-Invocation">10.1.9 Output details</a>
  250. <li><a href="#msgfmt-Invocation">10.1.10 Informative output</a>
  251. </li></ul>
  252. <li><a href="#msgunfmt-Invocation">10.2 Invoking the <code>msgunfmt</code> Program</a>
  253. <ul>
  254. <li><a href="#msgunfmt-Invocation">10.2.1 Operation mode</a>
  255. <li><a href="#msgunfmt-Invocation">10.2.2 Input file location</a>
  256. <li><a href="#msgunfmt-Invocation">10.2.3 Input file location in Java mode</a>
  257. <li><a href="#msgunfmt-Invocation">10.2.4 Input file location in C# mode</a>
  258. <li><a href="#msgunfmt-Invocation">10.2.5 Input file location in Tcl mode</a>
  259. <li><a href="#msgunfmt-Invocation">10.2.6 Output file location</a>
  260. <li><a href="#msgunfmt-Invocation">10.2.7 Output details</a>
  261. <li><a href="#msgunfmt-Invocation">10.2.8 Informative output</a>
  262. </li></ul>
  263. <li><a href="#MO-Files">10.3 The Format of GNU MO Files</a>
  264. </li></ul>
  265. <li><a name="toc_Programmers" href="#Programmers">11 The Programmer's View</a>
  266. <ul>
  267. <li><a href="#catgets">11.1 About <code>catgets</code></a>
  268. <ul>
  269. <li><a href="#Interface-to-catgets">11.1.1 The Interface</a>
  270. <li><a href="#Problems-with-catgets">11.1.2 Problems with the <code>catgets</code> Interface?!</a>
  271. </li></ul>
  272. <li><a href="#gettext">11.2 About <code>gettext</code></a>
  273. <ul>
  274. <li><a href="#Interface-to-gettext">11.2.1 The Interface</a>
  275. <li><a href="#Ambiguities">11.2.2 Solving Ambiguities</a>
  276. <li><a href="#Locating-Catalogs">11.2.3 Locating Message Catalog Files</a>
  277. <li><a href="#Charset-conversion">11.2.4 How to specify the output character set <code>gettext</code> uses</a>
  278. <li><a href="#Contexts">11.2.5 Using contexts for solving ambiguities</a>
  279. <li><a href="#Plural-forms">11.2.6 Additional functions for plural forms</a>
  280. <li><a href="#Optimized-gettext">11.2.7 Optimization of the *gettext functions</a>
  281. </li></ul>
  282. <li><a href="#Comparison">11.3 Comparing the Two Interfaces</a>
  283. <li><a href="#Using-libintl_002ea">11.4 Using libintl.a in own programs</a>
  284. <li><a href="#gettext-grok">11.5 Being a <code>gettext</code> grok</a>
  285. <li><a href="#Temp-Programmers">11.6 Temporary Notes for the Programmers Chapter</a>
  286. <ul>
  287. <li><a href="#Temp-Implementations">11.6.1 Temporary - Two Possible Implementations</a>
  288. <li><a href="#Temp-catgets">11.6.2 Temporary - About <code>catgets</code></a>
  289. <li><a href="#Temp-WSI">11.6.3 Temporary - Why a single implementation</a>
  290. <li><a href="#Temp-Notes">11.6.4 Temporary - Notes</a>
  291. </li></ul>
  292. </li></ul>
  293. <li><a name="toc_Translators" href="#Translators">12 The Translator's View</a>
  294. <ul>
  295. <li><a href="#Trans-Intro-0">12.1 Introduction 0</a>
  296. <li><a href="#Trans-Intro-1">12.2 Introduction 1</a>
  297. <li><a href="#Discussions">12.3 Discussions</a>
  298. <li><a href="#Organization">12.4 Organization</a>
  299. <ul>
  300. <li><a href="#Central-Coordination">12.4.1 Central Coordination</a>
  301. <li><a href="#National-Teams">12.4.2 National Teams</a>
  302. <ul>
  303. <li><a href="#Sub_002dCultures">12.4.2.1 Sub-Cultures</a>
  304. <li><a href="#Organizational-Ideas">12.4.2.2 Organizational Ideas</a>
  305. </li></ul>
  306. <li><a href="#Mailing-Lists">12.4.3 Mailing Lists</a>
  307. </li></ul>
  308. <li><a href="#Information-Flow">12.5 Information Flow</a>
  309. <li><a href="#Translating-plural-forms">12.6 Translating plural forms</a>
  310. <li><a href="#Prioritizing-messages">12.7 Prioritizing messages: How to determine which messages to translate first</a>
  311. </li></ul>
  312. <li><a name="toc_Maintainers" href="#Maintainers">13 The Maintainer's View</a>
  313. <ul>
  314. <li><a href="#Flat-and-Non_002dFlat">13.1 Flat or Non-Flat Directory Structures</a>
  315. <li><a href="#Prerequisites">13.2 Prerequisite Works</a>
  316. <li><a href="#gettextize-Invocation">13.3 Invoking the <code>gettextize</code> Program</a>
  317. <li><a href="#Adjusting-Files">13.4 Files You Must Create or Alter</a>
  318. <ul>
  319. <li><a href="#po_002fPOTFILES_002ein">13.4.1 <samp><span class="file">POTFILES.in</span></samp> in <samp><span class="file">po/</span></samp></a>
  320. <li><a href="#po_002fLINGUAS">13.4.2 <samp><span class="file">LINGUAS</span></samp> in <samp><span class="file">po/</span></samp></a>
  321. <li><a href="#po_002fMakevars">13.4.3 <samp><span class="file">Makevars</span></samp> in <samp><span class="file">po/</span></samp></a>
  322. <li><a href="#po_002fRules_002d_002a">13.4.4 Extending <samp><span class="file">Makefile</span></samp> in <samp><span class="file">po/</span></samp></a>
  323. <li><a href="#configure_002eac">13.4.5 <samp><span class="file">configure.ac</span></samp> at top level</a>
  324. <li><a href="#config_002eguess">13.4.6 <samp><span class="file">config.guess</span></samp>, <samp><span class="file">config.sub</span></samp> at top level</a>
  325. <li><a href="#mkinstalldirs">13.4.7 <samp><span class="file">mkinstalldirs</span></samp> at top level</a>
  326. <li><a href="#aclocal">13.4.8 <samp><span class="file">aclocal.m4</span></samp> at top level</a>
  327. <li><a href="#acconfig">13.4.9 <samp><span class="file">acconfig.h</span></samp> at top level</a>
  328. <li><a href="#config_002eh_002ein">13.4.10 <samp><span class="file">config.h.in</span></samp> at top level</a>
  329. <li><a href="#Makefile">13.4.11 <samp><span class="file">Makefile.in</span></samp> at top level</a>
  330. <li><a href="#src_002fMakefile">13.4.12 <samp><span class="file">Makefile.in</span></samp> in <samp><span class="file">src/</span></samp></a>
  331. <li><a href="#lib_002fgettext_002eh">13.4.13 <samp><span class="file">gettext.h</span></samp> in <samp><span class="file">lib/</span></samp></a>
  332. </li></ul>
  333. <li><a href="#autoconf-macros">13.5 Autoconf macros for use in <samp><span class="file">configure.ac</span></samp></a>
  334. <ul>
  335. <li><a href="#AM_005fGNU_005fGETTEXT">13.5.1 AM_GNU_GETTEXT in <samp><span class="file">gettext.m4</span></samp></a>
  336. <li><a href="#AM_005fGNU_005fGETTEXT_005fVERSION">13.5.2 AM_GNU_GETTEXT_VERSION in <samp><span class="file">gettext.m4</span></samp></a>
  337. <li><a href="#AM_005fGNU_005fGETTEXT_005fNEED">13.5.3 AM_GNU_GETTEXT_NEED in <samp><span class="file">gettext.m4</span></samp></a>
  338. <li><a href="#AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR">13.5.4 AM_GNU_GETTEXT_INTL_SUBDIR in <samp><span class="file">intldir.m4</span></samp></a>
  339. <li><a href="#AM_005fPO_005fSUBDIRS">13.5.5 AM_PO_SUBDIRS in <samp><span class="file">po.m4</span></samp></a>
  340. <li><a href="#AM_005fXGETTEXT_005fOPTION">13.5.6 AM_XGETTEXT_OPTION in <samp><span class="file">po.m4</span></samp></a>
  341. <li><a href="#AM_005fICONV">13.5.7 AM_ICONV in <samp><span class="file">iconv.m4</span></samp></a>
  342. </li></ul>
  343. <li><a href="#CVS-Issues">13.6 Integrating with CVS</a>
  344. <ul>
  345. <li><a href="#Distributed-CVS">13.6.1 Avoiding version mismatch in distributed development</a>
  346. <li><a href="#Files-under-CVS">13.6.2 Files to put under CVS version control</a>
  347. <li><a href="#autopoint-Invocation">13.6.3 Invoking the <code>autopoint</code> Program</a>
  348. <ul>
  349. <li><a href="#autopoint-Invocation">13.6.3.1 Options</a>
  350. <li><a href="#autopoint-Invocation">13.6.3.2 Informative output</a>
  351. </li></ul>
  352. </li></ul>
  353. <li><a href="#Release-Management">13.7 Creating a Distribution Tarball</a>
  354. </li></ul>
  355. <li><a name="toc_Installers" href="#Installers">14 The Installer's and Distributor's View</a>
  356. <li><a name="toc_Programming-Languages" href="#Programming-Languages">15 Other Programming Languages</a>
  357. <ul>
  358. <li><a href="#Language-Implementors">15.1 The Language Implementor's View</a>
  359. <li><a href="#Programmers-for-other-Languages">15.2 The Programmer's View</a>
  360. <li><a href="#Translators-for-other-Languages">15.3 The Translator's View</a>
  361. <ul>
  362. <li><a href="#c_002dformat">15.3.1 C Format Strings</a>
  363. <li><a href="#objc_002dformat">15.3.2 Objective C Format Strings</a>
  364. <li><a href="#sh_002dformat">15.3.3 Shell Format Strings</a>
  365. <li><a href="#python_002dformat">15.3.4 Python Format Strings</a>
  366. <li><a href="#lisp_002dformat">15.3.5 Lisp Format Strings</a>
  367. <li><a href="#elisp_002dformat">15.3.6 Emacs Lisp Format Strings</a>
  368. <li><a href="#librep_002dformat">15.3.7 librep Format Strings</a>
  369. <li><a href="#scheme_002dformat">15.3.8 Scheme Format Strings</a>
  370. <li><a href="#smalltalk_002dformat">15.3.9 Smalltalk Format Strings</a>
  371. <li><a href="#java_002dformat">15.3.10 Java Format Strings</a>
  372. <li><a href="#csharp_002dformat">15.3.11 C# Format Strings</a>
  373. <li><a href="#awk_002dformat">15.3.12 awk Format Strings</a>
  374. <li><a href="#object_002dpascal_002dformat">15.3.13 Object Pascal Format Strings</a>
  375. <li><a href="#ycp_002dformat">15.3.14 YCP Format Strings</a>
  376. <li><a href="#tcl_002dformat">15.3.15 Tcl Format Strings</a>
  377. <li><a href="#perl_002dformat">15.3.16 Perl Format Strings</a>
  378. <li><a href="#php_002dformat">15.3.17 PHP Format Strings</a>
  379. <li><a href="#gcc_002dinternal_002dformat">15.3.18 GCC internal Format Strings</a>
  380. <li><a href="#gfc_002dinternal_002dformat">15.3.19 GFC internal Format Strings</a>
  381. <li><a href="#qt_002dformat">15.3.20 Qt Format Strings</a>
  382. <li><a href="#qt_002dplural_002dformat">15.3.21 Qt Format Strings</a>
  383. <li><a href="#kde_002dformat">15.3.22 KDE Format Strings</a>
  384. <li><a href="#boost_002dformat">15.3.23 Boost Format Strings</a>
  385. </li></ul>
  386. <li><a href="#Maintainers-for-other-Languages">15.4 The Maintainer's View</a>
  387. <li><a href="#List-of-Programming-Languages">15.5 Individual Programming Languages</a>
  388. <ul>
  389. <li><a href="#C">15.5.1 C, C++, Objective C</a>
  390. <li><a href="#sh">15.5.2 sh - Shell Script</a>
  391. <ul>
  392. <li><a href="#Preparing-Shell-Scripts">15.5.2.1 Preparing Shell Scripts for Internationalization</a>
  393. <li><a href="#gettext_002esh">15.5.2.2 Contents of <code>gettext.sh</code></a>
  394. <li><a href="#gettext-Invocation">15.5.2.3 Invoking the <code>gettext</code> program</a>
  395. <li><a href="#ngettext-Invocation">15.5.2.4 Invoking the <code>ngettext</code> program</a>
  396. <li><a href="#envsubst-Invocation">15.5.2.5 Invoking the <code>envsubst</code> program</a>
  397. <li><a href="#eval_005fgettext-Invocation">15.5.2.6 Invoking the <code>eval_gettext</code> function</a>
  398. <li><a href="#eval_005fngettext-Invocation">15.5.2.7 Invoking the <code>eval_ngettext</code> function</a>
  399. </li></ul>
  400. <li><a href="#bash">15.5.3 bash - Bourne-Again Shell Script</a>
  401. <li><a href="#Python">15.5.4 Python</a>
  402. <li><a href="#Common-Lisp">15.5.5 GNU clisp - Common Lisp</a>
  403. <li><a href="#clisp-C">15.5.6 GNU clisp C sources</a>
  404. <li><a href="#Emacs-Lisp">15.5.7 Emacs Lisp</a>
  405. <li><a href="#librep">15.5.8 librep</a>
  406. <li><a href="#Scheme">15.5.9 GNU guile - Scheme</a>
  407. <li><a href="#Smalltalk">15.5.10 GNU Smalltalk</a>
  408. <li><a href="#Java">15.5.11 Java</a>
  409. <li><a href="#C_0023">15.5.12 C#</a>
  410. <li><a href="#gawk">15.5.13 GNU awk</a>
  411. <li><a href="#Pascal">15.5.14 Pascal - Free Pascal Compiler</a>
  412. <li><a href="#wxWidgets">15.5.15 wxWidgets library</a>
  413. <li><a href="#YCP">15.5.16 YCP - YaST2 scripting language</a>
  414. <li><a href="#Tcl">15.5.17 Tcl - Tk's scripting language</a>
  415. <li><a href="#Perl">15.5.18 Perl</a>
  416. <ul>
  417. <li><a href="#General-Problems">15.5.18.1 General Problems Parsing Perl Code</a>
  418. <li><a href="#Default-Keywords">15.5.18.2 Which keywords will xgettext look for?</a>
  419. <li><a href="#Special-Keywords">15.5.18.3 How to Extract Hash Keys</a>
  420. <li><a href="#Quote_002dlike-Expressions">15.5.18.4 What are Strings And Quote-like Expressions?</a>
  421. <li><a href="#Interpolation-I">15.5.18.5 Invalid Uses Of String Interpolation</a>
  422. <li><a href="#Interpolation-II">15.5.18.6 Valid Uses Of String Interpolation</a>
  423. <li><a href="#Parentheses">15.5.18.7 When To Use Parentheses</a>
  424. <li><a href="#Long-Lines">15.5.18.8 How To Grok with Long Lines</a>
  425. <li><a href="#Perl-Pitfalls">15.5.18.9 Bugs, Pitfalls, And Things That Do Not Work</a>
  426. </li></ul>
  427. <li><a href="#PHP">15.5.19 PHP Hypertext Preprocessor</a>
  428. <li><a href="#Pike">15.5.20 Pike</a>
  429. <li><a href="#GCC_002dsource">15.5.21 GNU Compiler Collection sources</a>
  430. </li></ul>
  431. <li><a href="#List-of-Data-Formats">15.6 Internationalizable Data</a>
  432. <ul>
  433. <li><a href="#POT">15.6.1 POT - Portable Object Template</a>
  434. <li><a href="#RST">15.6.2 Resource String Table</a>
  435. <li><a href="#Glade">15.6.3 Glade - GNOME user interface description</a>
  436. </li></ul>
  437. </li></ul>
  438. <li><a name="toc_Conclusion" href="#Conclusion">16 Concluding Remarks</a>
  439. <ul>
  440. <li><a href="#History">16.1 History of GNU <code>gettext</code></a>
  441. <li><a href="#References">16.2 Related Readings</a>
  442. </li></ul>
  443. <li><a name="toc_Language-Codes" href="#Language-Codes">Appendix A Language Codes</a>
  444. <ul>
  445. <li><a href="#Usual-Language-Codes">A.1 Usual Language Codes</a>
  446. <li><a href="#Rare-Language-Codes">A.2 Rare Language Codes</a>
  447. </li></ul>
  448. <li><a name="toc_Country-Codes" href="#Country-Codes">Appendix B Country Codes</a>
  449. <li><a name="toc_Licenses" href="#Licenses">Appendix C Licenses</a>
  450. <ul>
  451. <li><a href="#GNU-GPL">C.1 GNU GENERAL PUBLIC LICENSE</a>
  452. <ul>
  453. <li><a href="#GNU-GPL">Preamble</a>
  454. <li><a href="#GNU-GPL">Appendix: How to Apply These Terms to Your New Programs</a>
  455. </li></ul>
  456. <li><a href="#GNU-LGPL">C.2 GNU LESSER GENERAL PUBLIC LICENSE</a>
  457. <ul>
  458. <li><a href="#GNU-LGPL">Preamble</a>
  459. <li><a href="#GNU-LGPL">How to Apply These Terms to Your New Libraries</a>
  460. </li></ul>
  461. <li><a href="#GNU-FDL">C.3 GNU Free Documentation License</a>
  462. <ul>
  463. <li><a href="#GNU-FDL">ADDENDUM: How to use this License for your documents</a>
  464. </li></ul>
  465. </li></ul>
  466. <li><a name="toc_Program-Index" href="#Program-Index">Program Index</a>
  467. <li><a name="toc_Option-Index" href="#Option-Index">Option Index</a>
  468. <li><a name="toc_Variable-Index" href="#Variable-Index">Variable Index</a>
  469. <li><a name="toc_PO-Mode-Index" href="#PO-Mode-Index">PO Mode Index</a>
  470. <li><a name="toc_Autoconf-Macro-Index" href="#Autoconf-Macro-Index">Autoconf Macro Index</a>
  471. <li><a name="toc_Index" href="#Index">General Index</a>
  472. </li></ul>
  473. </div>
  474. <div class="node">
  475. <a name="Top"></a>
  476. <p><hr>
  477. Next:&nbsp;<a rel="next" accesskey="n" href="#Introduction">Introduction</a>,
  478. Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
  479. Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
  480. </div>
  481. <h2 class="unnumbered">GNU <code>gettext</code> utilities</h2>
  482. <p>This manual documents the GNU gettext tools and the GNU libintl library,
  483. version 0.18.
  484. <ul class="menu">
  485. <li><a accesskey="1" href="#Introduction">Introduction</a>: Introduction
  486. <li><a accesskey="2" href="#Users">Users</a>: The User's View
  487. <li><a accesskey="3" href="#PO-Files">PO Files</a>: The Format of PO Files
  488. <li><a accesskey="4" href="#Sources">Sources</a>: Preparing Program Sources
  489. <li><a accesskey="5" href="#Template">Template</a>: Making the PO Template File
  490. <li><a accesskey="6" href="#Creating">Creating</a>: Creating a New PO File
  491. <li><a accesskey="7" href="#Updating">Updating</a>: Updating Existing PO Files
  492. <li><a accesskey="8" href="#Editing">Editing</a>: Editing PO Files
  493. <li><a accesskey="9" href="#Manipulating">Manipulating</a>: Manipulating PO Files
  494. <li><a href="#Binaries">Binaries</a>: Producing Binary MO Files
  495. <li><a href="#Programmers">Programmers</a>: The Programmer's View
  496. <li><a href="#Translators">Translators</a>: The Translator's View
  497. <li><a href="#Maintainers">Maintainers</a>: The Maintainer's View
  498. <li><a href="#Installers">Installers</a>: The Installer's and Distributor's View
  499. <li><a href="#Programming-Languages">Programming Languages</a>: Other Programming Languages
  500. <li><a href="#Conclusion">Conclusion</a>: Concluding Remarks
  501. <li><a href="#Language-Codes">Language Codes</a>: ISO 639 language codes
  502. <li><a href="#Country-Codes">Country Codes</a>: ISO 3166 country codes
  503. <li><a href="#Licenses">Licenses</a>: Licenses
  504. <li><a href="#Program-Index">Program Index</a>: Index of Programs
  505. <li><a href="#Option-Index">Option Index</a>: Index of Command-Line Options
  506. <li><a href="#Variable-Index">Variable Index</a>: Index of Environment Variables
  507. <li><a href="#PO-Mode-Index">PO Mode Index</a>: Index of Emacs PO Mode Commands
  508. <li><a href="#Autoconf-Macro-Index">Autoconf Macro Index</a>: Index of Autoconf Macros
  509. <li><a href="#Index">Index</a>: General Index
  510. </li></ul>
  511. <p>--- The Detailed Node Listing ---
  512. <p>Introduction
  513. </p>
  514. <ul class="menu">
  515. <li><a href="#Why">Why</a>: The Purpose of GNU <code>gettext</code>
  516. <li><a href="#Concepts">Concepts</a>: I18n, L10n, and Such
  517. <li><a href="#Aspects">Aspects</a>: Aspects in Native Language Support
  518. <li><a href="#Files">Files</a>: Files Conveying Translations
  519. <li><a href="#Overview">Overview</a>: Overview of GNU <code>gettext</code>
  520. </li></ul>
  521. <p>The User's View
  522. </p>
  523. <ul class="menu">
  524. <li><a href="#System-Installation">System Installation</a>: Questions During Operating System Installation
  525. <li><a href="#Setting-the-GUI-Locale">Setting the GUI Locale</a>: How to Specify the Locale Used by GUI Programs
  526. <li><a href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>: How to Specify the Locale According to POSIX
  527. <li><a href="#Installing-Localizations">Installing Localizations</a>: How to Install Additional Translations
  528. </li></ul>
  529. <p>Setting the POSIX Locale
  530. </p>
  531. <ul class="menu">
  532. <li><a href="#Locale-Names">Locale Names</a>: How a Locale Specification Looks Like
  533. <li><a href="#Locale-Environment-Variables">Locale Environment Variables</a>: Which Environment Variable Specfies What
  534. <li><a href="#The-LANGUAGE-variable">The LANGUAGE variable</a>: How to Specify a Priority List of Languages
  535. </li></ul>
  536. <p>Preparing Program Sources
  537. </p>
  538. <ul class="menu">
  539. <li><a href="#Importing">Importing</a>: Importing the <code>gettext</code> declaration
  540. <li><a href="#Triggering">Triggering</a>: Triggering <code>gettext</code> Operations
  541. <li><a href="#Preparing-Strings">Preparing Strings</a>: Preparing Translatable Strings
  542. <li><a href="#Mark-Keywords">Mark Keywords</a>: How Marks Appear in Sources
  543. <li><a href="#Marking">Marking</a>: Marking Translatable Strings
  544. <li><a href="#c_002dformat-Flag">c-format Flag</a>: Telling something about the following string
  545. <li><a href="#Special-cases">Special cases</a>: Special Cases of Translatable Strings
  546. <li><a href="#Bug-Report-Address">Bug Report Address</a>: Letting Users Report Translation Bugs
  547. <li><a href="#Names">Names</a>: Marking Proper Names for Translation
  548. <li><a href="#Libraries">Libraries</a>: Preparing Library Sources
  549. </li></ul>
  550. <p>Making the PO Template File
  551. </p>
  552. <ul class="menu">
  553. <li><a href="#xgettext-Invocation">xgettext Invocation</a>: Invoking the <code>xgettext</code> Program
  554. </li></ul>
  555. <p>Creating a New PO File
  556. </p>
  557. <ul class="menu">
  558. <li><a href="#msginit-Invocation">msginit Invocation</a>: Invoking the <code>msginit</code> Program
  559. <li><a href="#Header-Entry">Header Entry</a>: Filling in the Header Entry
  560. </li></ul>
  561. <p>Updating Existing PO Files
  562. </p>
  563. <ul class="menu">
  564. <li><a href="#msgmerge-Invocation">msgmerge Invocation</a>: Invoking the <code>msgmerge</code> Program
  565. </li></ul>
  566. <p>Editing PO Files
  567. </p>
  568. <ul class="menu">
  569. <li><a href="#KBabel">KBabel</a>: KDE's PO File Editor
  570. <li><a href="#Gtranslator">Gtranslator</a>: GNOME's PO File Editor
  571. <li><a href="#PO-Mode">PO Mode</a>: Emacs's PO File Editor
  572. <li><a href="#Compendium">Compendium</a>: Using Translation Compendia
  573. </li></ul>
  574. <p>Emacs's PO File Editor
  575. </p>
  576. <ul class="menu">
  577. <li><a href="#Installation">Installation</a>: Completing GNU <code>gettext</code> Installation
  578. <li><a href="#Main-PO-Commands">Main PO Commands</a>: Main Commands
  579. <li><a href="#Entry-Positioning">Entry Positioning</a>: Entry Positioning
  580. <li><a href="#Normalizing">Normalizing</a>: Normalizing Strings in Entries
  581. <li><a href="#Translated-Entries">Translated Entries</a>: Translated Entries
  582. <li><a href="#Fuzzy-Entries">Fuzzy Entries</a>: Fuzzy Entries
  583. <li><a href="#Untranslated-Entries">Untranslated Entries</a>: Untranslated Entries
  584. <li><a href="#Obsolete-Entries">Obsolete Entries</a>: Obsolete Entries
  585. <li><a href="#Modifying-Translations">Modifying Translations</a>: Modifying Translations
  586. <li><a href="#Modifying-Comments">Modifying Comments</a>: Modifying Comments
  587. <li><a href="#Subedit">Subedit</a>: Mode for Editing Translations
  588. <li><a href="#C-Sources-Context">C Sources Context</a>: C Sources Context
  589. <li><a href="#Auxiliary">Auxiliary</a>: Consulting Auxiliary PO Files
  590. </li></ul>
  591. <p>Using Translation Compendia
  592. </p>
  593. <ul class="menu">
  594. <li><a href="#Creating-Compendia">Creating Compendia</a>: Merging translations for later use
  595. <li><a href="#Using-Compendia">Using Compendia</a>: Using older translations if they fit
  596. </li></ul>
  597. <p>Manipulating PO Files
  598. </p>
  599. <ul class="menu">
  600. <li><a href="#msgcat-Invocation">msgcat Invocation</a>: Invoking the <code>msgcat</code> Program
  601. <li><a href="#msgconv-Invocation">msgconv Invocation</a>: Invoking the <code>msgconv</code> Program
  602. <li><a href="#msggrep-Invocation">msggrep Invocation</a>: Invoking the <code>msggrep</code> Program
  603. <li><a href="#msgfilter-Invocation">msgfilter Invocation</a>: Invoking the <code>msgfilter</code> Program
  604. <li><a href="#msguniq-Invocation">msguniq Invocation</a>: Invoking the <code>msguniq</code> Program
  605. <li><a href="#msgcomm-Invocation">msgcomm Invocation</a>: Invoking the <code>msgcomm</code> Program
  606. <li><a href="#msgcmp-Invocation">msgcmp Invocation</a>: Invoking the <code>msgcmp</code> Program
  607. <li><a href="#msgattrib-Invocation">msgattrib Invocation</a>: Invoking the <code>msgattrib</code> Program
  608. <li><a href="#msgen-Invocation">msgen Invocation</a>: Invoking the <code>msgen</code> Program
  609. <li><a href="#msgexec-Invocation">msgexec Invocation</a>: Invoking the <code>msgexec</code> Program
  610. <li><a href="#Colorizing">Colorizing</a>: Highlighting parts of PO files
  611. <li><a href="#libgettextpo">libgettextpo</a>: Writing your own programs that process PO files
  612. </li></ul>
  613. <p>Highlighting parts of PO files
  614. </p>
  615. <ul class="menu">
  616. <li><a href="#The-_002d_002dcolor-option">The --color option</a>: Triggering colorized output
  617. <li><a href="#The-TERM-variable">The TERM variable</a>: The environment variable <code>TERM</code>
  618. <li><a href="#The-_002d_002dstyle-option">The --style option</a>: The <code>--style</code> option
  619. <li><a href="#Style-rules">Style rules</a>: Style rules for PO files
  620. <li><a href="#Customizing-less">Customizing less</a>: Customizing <code>less</code> for viewing PO files
  621. </li></ul>
  622. <p>Producing Binary MO Files
  623. </p>
  624. <ul class="menu">
  625. <li><a href="#msgfmt-Invocation">msgfmt Invocation</a>: Invoking the <code>msgfmt</code> Program
  626. <li><a href="#msgunfmt-Invocation">msgunfmt Invocation</a>: Invoking the <code>msgunfmt</code> Program
  627. <li><a href="#MO-Files">MO Files</a>: The Format of GNU MO Files
  628. </li></ul>
  629. <p>The Programmer's View
  630. </p>
  631. <ul class="menu">
  632. <li><a href="#catgets">catgets</a>: About <code>catgets</code>
  633. <li><a href="#gettext">gettext</a>: About <code>gettext</code>
  634. <li><a href="#Comparison">Comparison</a>: Comparing the two interfaces
  635. <li><a href="#Using-libintl_002ea">Using libintl.a</a>: Using libintl.a in own programs
  636. <li><a href="#gettext-grok">gettext grok</a>: Being a <code>gettext</code> grok
  637. <li><a href="#Temp-Programmers">Temp Programmers</a>: Temporary Notes for the Programmers Chapter
  638. </li></ul>
  639. <p>About <code>catgets</code>
  640. </p>
  641. <ul class="menu">
  642. <li><a href="#Interface-to-catgets">Interface to catgets</a>: The interface
  643. <li><a href="#Problems-with-catgets">Problems with catgets</a>: Problems with the <code>catgets</code> interface?!
  644. </li></ul>
  645. <p>About <code>gettext</code>
  646. </p>
  647. <ul class="menu">
  648. <li><a href="#Interface-to-gettext">Interface to gettext</a>: The interface
  649. <li><a href="#Ambiguities">Ambiguities</a>: Solving ambiguities
  650. <li><a href="#Locating-Catalogs">Locating Catalogs</a>: Locating message catalog files
  651. <li><a href="#Charset-conversion">Charset conversion</a>: How to request conversion to Unicode
  652. <li><a href="#Contexts">Contexts</a>: Solving ambiguities in GUI programs
  653. <li><a href="#Plural-forms">Plural forms</a>: Additional functions for handling plurals
  654. <li><a href="#Optimized-gettext">Optimized gettext</a>: Optimization of the *gettext functions
  655. </li></ul>
  656. <p>Temporary Notes for the Programmers Chapter
  657. </p>
  658. <ul class="menu">
  659. <li><a href="#Temp-Implementations">Temp Implementations</a>: Temporary - Two Possible Implementations
  660. <li><a href="#Temp-catgets">Temp catgets</a>: Temporary - About <code>catgets</code>
  661. <li><a href="#Temp-WSI">Temp WSI</a>: Temporary - Why a single implementation
  662. <li><a href="#Temp-Notes">Temp Notes</a>: Temporary - Notes
  663. </li></ul>
  664. <p>The Translator's View
  665. </p>
  666. <ul class="menu">
  667. <li><a href="#Trans-Intro-0">Trans Intro 0</a>: Introduction 0
  668. <li><a href="#Trans-Intro-1">Trans Intro 1</a>: Introduction 1
  669. <li><a href="#Discussions">Discussions</a>: Discussions
  670. <li><a href="#Organization">Organization</a>: Organization
  671. <li><a href="#Information-Flow">Information Flow</a>: Information Flow
  672. <li><a href="#Translating-plural-forms">Translating plural forms</a>: How to fill in <code>msgstr[0]</code>, <code>msgstr[1]</code>
  673. <li><a href="#Prioritizing-messages">Prioritizing messages</a>: How to find which messages to translate first
  674. </li></ul>
  675. <p>Organization
  676. </p>
  677. <ul class="menu">
  678. <li><a href="#Central-Coordination">Central Coordination</a>: Central Coordination
  679. <li><a href="#National-Teams">National Teams</a>: National Teams
  680. <li><a href="#Mailing-Lists">Mailing Lists</a>: Mailing Lists
  681. </li></ul>
  682. <p>National Teams
  683. </p>
  684. <ul class="menu">
  685. <li><a href="#Sub_002dCultures">Sub-Cultures</a>: Sub-Cultures
  686. <li><a href="#Organizational-Ideas">Organizational Ideas</a>: Organizational Ideas
  687. </li></ul>
  688. <p>The Maintainer's View
  689. </p>
  690. <ul class="menu">
  691. <li><a href="#Flat-and-Non_002dFlat">Flat and Non-Flat</a>: Flat or Non-Flat Directory Structures
  692. <li><a href="#Prerequisites">Prerequisites</a>: Prerequisite Works
  693. <li><a href="#gettextize-Invocation">gettextize Invocation</a>: Invoking the <code>gettextize</code> Program
  694. <li><a href="#Adjusting-Files">Adjusting Files</a>: Files You Must Create or Alter
  695. <li><a href="#autoconf-macros">autoconf macros</a>: Autoconf macros for use in <samp><span class="file">configure.ac</span></samp>
  696. <li><a href="#CVS-Issues">CVS Issues</a>: Integrating with CVS
  697. <li><a href="#Release-Management">Release Management</a>: Creating a Distribution Tarball
  698. </li></ul>
  699. <p>Files You Must Create or Alter
  700. </p>
  701. <ul class="menu">
  702. <li><a href="#po_002fPOTFILES_002ein">po/POTFILES.in</a>: <samp><span class="file">POTFILES.in</span></samp> in <samp><span class="file">po/</span></samp>
  703. <li><a href="#po_002fLINGUAS">po/LINGUAS</a>: <samp><span class="file">LINGUAS</span></samp> in <samp><span class="file">po/</span></samp>
  704. <li><a href="#po_002fMakevars">po/Makevars</a>: <samp><span class="file">Makevars</span></samp> in <samp><span class="file">po/</span></samp>
  705. <li><a href="#po_002fRules_002d_002a">po/Rules-*</a>: Extending <samp><span class="file">Makefile</span></samp> in <samp><span class="file">po/</span></samp>
  706. <li><a href="#configure_002eac">configure.ac</a>: <samp><span class="file">configure.ac</span></samp> at top level
  707. <li><a href="#config_002eguess">config.guess</a>: <samp><span class="file">config.guess</span></samp>, <samp><span class="file">config.sub</span></samp> at top level
  708. <li><a href="#mkinstalldirs">mkinstalldirs</a>: <samp><span class="file">mkinstalldirs</span></samp> at top level
  709. <li><a href="#aclocal">aclocal</a>: <samp><span class="file">aclocal.m4</span></samp> at top level
  710. <li><a href="#acconfig">acconfig</a>: <samp><span class="file">acconfig.h</span></samp> at top level
  711. <li><a href="#config_002eh_002ein">config.h.in</a>: <samp><span class="file">config.h.in</span></samp> at top level
  712. <li><a href="#Makefile">Makefile</a>: <samp><span class="file">Makefile.in</span></samp> at top level
  713. <li><a href="#src_002fMakefile">src/Makefile</a>: <samp><span class="file">Makefile.in</span></samp> in <samp><span class="file">src/</span></samp>
  714. <li><a href="#lib_002fgettext_002eh">lib/gettext.h</a>: <samp><span class="file">gettext.h</span></samp> in <samp><span class="file">lib/</span></samp>
  715. </li></ul>
  716. <p>Autoconf macros for use in <samp><span class="file">configure.ac</span></samp>
  717. </p>
  718. <ul class="menu">
  719. <li><a href="#AM_005fGNU_005fGETTEXT">AM_GNU_GETTEXT</a>: AM_GNU_GETTEXT in <samp><span class="file">gettext.m4</span></samp>
  720. <li><a href="#AM_005fGNU_005fGETTEXT_005fVERSION">AM_GNU_GETTEXT_VERSION</a>: AM_GNU_GETTEXT_VERSION in <samp><span class="file">gettext.m4</span></samp>
  721. <li><a href="#AM_005fGNU_005fGETTEXT_005fNEED">AM_GNU_GETTEXT_NEED</a>: AM_GNU_GETTEXT_NEED in <samp><span class="file">gettext.m4</span></samp>
  722. <li><a href="#AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR">AM_GNU_GETTEXT_INTL_SUBDIR</a>: AM_GNU_GETTEXT_INTL_SUBDIR in <samp><span class="file">intldir.m4</span></samp>
  723. <li><a href="#AM_005fPO_005fSUBDIRS">AM_PO_SUBDIRS</a>: AM_PO_SUBDIRS in <samp><span class="file">po.m4</span></samp>
  724. <li><a href="#AM_005fICONV">AM_ICONV</a>: AM_ICONV in <samp><span class="file">iconv.m4</span></samp>
  725. </li></ul>
  726. <p>Integrating with CVS
  727. </p>
  728. <ul class="menu">
  729. <li><a href="#Distributed-CVS">Distributed CVS</a>: Avoiding version mismatch in distributed development
  730. <li><a href="#Files-under-CVS">Files under CVS</a>: Files to put under CVS version control
  731. <li><a href="#autopoint-Invocation">autopoint Invocation</a>: Invoking the <code>autopoint</code> Program
  732. </li></ul>
  733. <p>Other Programming Languages
  734. </p>
  735. <ul class="menu">
  736. <li><a href="#Language-Implementors">Language Implementors</a>: The Language Implementor's View
  737. <li><a href="#Programmers-for-other-Languages">Programmers for other Languages</a>: The Programmer's View
  738. <li><a href="#Translators-for-other-Languages">Translators for other Languages</a>: The Translator's View
  739. <li><a href="#Maintainers-for-other-Languages">Maintainers for other Languages</a>: The Maintainer's View
  740. <li><a href="#List-of-Programming-Languages">List of Programming Languages</a>: Individual Programming Languages
  741. <li><a href="#List-of-Data-Formats">List of Data Formats</a>: Internationalizable Data
  742. </li></ul>
  743. <p>The Translator's View
  744. </p>
  745. <ul class="menu">
  746. <li><a href="#c_002dformat">c-format</a>: C Format Strings
  747. <li><a href="#objc_002dformat">objc-format</a>: Objective C Format Strings
  748. <li><a href="#sh_002dformat">sh-format</a>: Shell Format Strings
  749. <li><a href="#python_002dformat">python-format</a>: Python Format Strings
  750. <li><a href="#lisp_002dformat">lisp-format</a>: Lisp Format Strings
  751. <li><a href="#elisp_002dformat">elisp-format</a>: Emacs Lisp Format Strings
  752. <li><a href="#librep_002dformat">librep-format</a>: librep Format Strings
  753. <li><a href="#scheme_002dformat">scheme-format</a>: Scheme Format Strings
  754. <li><a href="#smalltalk_002dformat">smalltalk-format</a>: Smalltalk Format Strings
  755. <li><a href="#java_002dformat">java-format</a>: Java Format Strings
  756. <li><a href="#csharp_002dformat">csharp-format</a>: C# Format Strings
  757. <li><a href="#awk_002dformat">awk-format</a>: awk Format Strings
  758. <li><a href="#object_002dpascal_002dformat">object-pascal-format</a>: Object Pascal Format Strings
  759. <li><a href="#ycp_002dformat">ycp-format</a>: YCP Format Strings
  760. <li><a href="#tcl_002dformat">tcl-format</a>: Tcl Format Strings
  761. <li><a href="#perl_002dformat">perl-format</a>: Perl Format Strings
  762. <li><a href="#php_002dformat">php-format</a>: PHP Format Strings
  763. <li><a href="#gcc_002dinternal_002dformat">gcc-internal-format</a>: GCC internal Format Strings
  764. <li><a href="#gfc_002dinternal_002dformat">gfc-internal-format</a>: GFC internal Format Strings
  765. <li><a href="#qt_002dformat">qt-format</a>: Qt Format Strings
  766. <li><a href="#qt_002dplural_002dformat">qt-plural-format</a>: Qt Plural Format Strings
  767. <li><a href="#kde_002dformat">kde-format</a>: KDE Format Strings
  768. <li><a href="#boost_002dformat">boost-format</a>: Boost Format Strings
  769. </li></ul>
  770. <p>Individual Programming Languages
  771. </p>
  772. <ul class="menu">
  773. <li><a href="#C">C</a>: C, C++, Objective C
  774. <li><a href="#sh">sh</a>: sh - Shell Script
  775. <li><a href="#bash">bash</a>: bash - Bourne-Again Shell Script
  776. <li><a href="#Python">Python</a>: Python
  777. <li><a href="#Common-Lisp">Common Lisp</a>: GNU clisp - Common Lisp
  778. <li><a href="#clisp-C">clisp C</a>: GNU clisp C sources
  779. <li><a href="#Emacs-Lisp">Emacs Lisp</a>: Emacs Lisp
  780. <li><a href="#librep">librep</a>: librep
  781. <li><a href="#Scheme">Scheme</a>: GNU guile - Scheme
  782. <li><a href="#Smalltalk">Smalltalk</a>: GNU Smalltalk
  783. <li><a href="#Java">Java</a>: Java
  784. <li><a href="#C_0023">C#</a>: C#
  785. <li><a href="#gawk">gawk</a>: GNU awk
  786. <li><a href="#Pascal">Pascal</a>: Pascal - Free Pascal Compiler
  787. <li><a href="#wxWidgets">wxWidgets</a>: wxWidgets library
  788. <li><a href="#YCP">YCP</a>: YCP - YaST2 scripting language
  789. <li><a href="#Tcl">Tcl</a>: Tcl - Tk's scripting language
  790. <li><a href="#Perl">Perl</a>: Perl
  791. <li><a href="#PHP">PHP</a>: PHP Hypertext Preprocessor
  792. <li><a href="#Pike">Pike</a>: Pike
  793. <li><a href="#GCC_002dsource">GCC-source</a>: GNU Compiler Collection sources
  794. </li></ul>
  795. <p>sh - Shell Script
  796. </p>
  797. <ul class="menu">
  798. <li><a href="#Preparing-Shell-Scripts">Preparing Shell Scripts</a>: Preparing Shell Scripts for Internationalization
  799. <li><a href="#gettext_002esh">gettext.sh</a>: Contents of <code>gettext.sh</code>
  800. <li><a href="#gettext-Invocation">gettext Invocation</a>: Invoking the <code>gettext</code> program
  801. <li><a href="#ngettext-Invocation">ngettext Invocation</a>: Invoking the <code>ngettext</code> program
  802. <li><a href="#envsubst-Invocation">envsubst Invocation</a>: Invoking the <code>envsubst</code> program
  803. <li><a href="#eval_005fgettext-Invocation">eval_gettext Invocation</a>: Invoking the <code>eval_gettext</code> function
  804. <li><a href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a>: Invoking the <code>eval_ngettext</code> function
  805. </li></ul>
  806. <p>Perl
  807. </p>
  808. <ul class="menu">
  809. <li><a href="#General-Problems">General Problems</a>: General Problems Parsing Perl Code
  810. <li><a href="#Default-Keywords">Default Keywords</a>: Which Keywords Will xgettext Look For?
  811. <li><a href="#Special-Keywords">Special Keywords</a>: How to Extract Hash Keys
  812. <li><a href="#Quote_002dlike-Expressions">Quote-like Expressions</a>: What are Strings And Quote-like Expressions?
  813. <li><a href="#Interpolation-I">Interpolation I</a>: Invalid String Interpolation
  814. <li><a href="#Interpolation-II">Interpolation II</a>: Valid String Interpolation
  815. <li><a href="#Parentheses">Parentheses</a>: When To Use Parentheses
  816. <li><a href="#Long-Lines">Long Lines</a>: How To Grok with Long Lines
  817. <li><a href="#Perl-Pitfalls">Perl Pitfalls</a>: Bugs, Pitfalls, and Things That Do Not Work
  818. </li></ul>
  819. <p>Internationalizable Data
  820. </p>
  821. <ul class="menu">
  822. <li><a href="#POT">POT</a>: POT - Portable Object Template
  823. <li><a href="#RST">RST</a>: Resource String Table
  824. <li><a href="#Glade">Glade</a>: Glade - GNOME user interface description
  825. </li></ul>
  826. <p>Concluding Remarks
  827. </p>
  828. <ul class="menu">
  829. <li><a href="#History">History</a>: History of GNU <code>gettext</code>
  830. <li><a href="#References">References</a>: Related Readings
  831. </li></ul>
  832. <p>Language Codes
  833. </p>
  834. <ul class="menu">
  835. <li><a href="#Usual-Language-Codes">Usual Language Codes</a>: Two-letter ISO 639 language codes
  836. <li><a href="#Rare-Language-Codes">Rare Language Codes</a>: Three-letter ISO 639 language codes
  837. </li></ul>
  838. <p>Licenses
  839. </p>
  840. <ul class="menu">
  841. <li><a href="#GNU-GPL">GNU GPL</a>: GNU General Public License
  842. <li><a href="#GNU-LGPL">GNU LGPL</a>: GNU Lesser General Public License
  843. <li><a href="#GNU-FDL">GNU FDL</a>: GNU Free Documentation License
  844. </ul>
  845. <div class="node">
  846. <a name="Introduction"></a>
  847. <p><hr>
  848. Next:&nbsp;<a rel="next" accesskey="n" href="#Users">Users</a>,
  849. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
  850. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  851. </div>
  852. <h2 class="chapter">1 Introduction</h2>
  853. <p>This chapter explains the goals sought in the creation
  854. of GNU <code>gettext</code> and the free Translation Project.
  855. Then, it explains a few broad concepts around
  856. Native Language Support, and positions message translation with regard
  857. to other aspects of national and cultural variance, as they apply
  858. to programs. It also surveys those files used to convey the
  859. translations. It explains how the various tools interact in the
  860. initial generation of these files, and later, how the maintenance
  861. cycle should usually operate.
  862. <p><a name="index-sex-1"></a><a name="index-he_002c-she_002c-and-they-2"></a><a name="index-she_002c-he_002c-and-they-3"></a>In this manual, we use <em>he</em> when speaking of the programmer or
  863. maintainer, <em>she</em> when speaking of the translator, and <em>they</em>
  864. when speaking of the installers or end users of the translated program.
  865. This is only a convenience for clarifying the documentation. It is
  866. <em>absolutely</em> not meant to imply that some roles are more appropriate
  867. to males or females. Besides, as you might guess, GNU <code>gettext</code>
  868. is meant to be useful for people using computers, whatever their sex,
  869. race, religion or nationality!
  870. <p><a name="index-bug-report-address-4"></a>Please send suggestions and corrections to:
  871. <pre class="example"> <span class="roman">Internet address:</span>
  872. bug-gnu-gettext@gnu.org
  873. </pre>
  874. <p class="noindent">Please include the manual's edition number and update date in your messages.
  875. <ul class="menu">
  876. <li><a accesskey="1" href="#Why">Why</a>: The Purpose of GNU <code>gettext</code>
  877. <li><a accesskey="2" href="#Concepts">Concepts</a>: I18n, L10n, and Such
  878. <li><a accesskey="3" href="#Aspects">Aspects</a>: Aspects in Native Language Support
  879. <li><a accesskey="4" href="#Files">Files</a>: Files Conveying Translations
  880. <li><a accesskey="5" href="#Overview">Overview</a>: Overview of GNU <code>gettext</code>
  881. </ul>
  882. <div class="node">
  883. <a name="Why"></a>
  884. <p><hr>
  885. Next:&nbsp;<a rel="next" accesskey="n" href="#Concepts">Concepts</a>,
  886. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
  887. Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
  888. </div>
  889. <h3 class="section">1.1 The Purpose of GNU <code>gettext</code></h3>
  890. <p>Usually, programs are written and documented in English, and use
  891. English at execution time to interact with users. This is true
  892. not only of GNU software, but also of a great deal of proprietary
  893. and free software. Using a common language is quite handy for
  894. communication between developers, maintainers and users from all
  895. countries. On the other hand, most people are less comfortable with
  896. English than with their own native language, and would prefer to
  897. use their mother tongue for day to day's work, as far as possible.
  898. Many would simply <em>love</em> to see their computer screen showing
  899. a lot less of English, and far more of their own language.
  900. <p><a name="index-Translation-Project-5"></a>However, to many people, this dream might appear so far fetched that
  901. they may believe it is not even worth spending time thinking about
  902. it. They have no confidence at all that the dream might ever
  903. become true. Yet some have not lost hope, and have organized themselves.
  904. The Translation Project is a formalization of this hope into a
  905. workable structure, which has a good chance to get all of us nearer
  906. the achievement of a truly multi-lingual set of programs.
  907. <p>GNU <code>gettext</code> is an important step for the Translation Project,
  908. as it is an asset on which we may build many other steps. This package
  909. offers to programmers, translators and even users, a well integrated
  910. set of tools and documentation. Specifically, the GNU <code>gettext</code>
  911. utilities are a set of tools that provides a framework within which
  912. other free packages may produce multi-lingual messages. These tools
  913. include
  914. <ul>
  915. <li>A set of conventions about how programs should be written to support
  916. message catalogs.
  917. <li>A directory and file naming organization for the message catalogs
  918. themselves.
  919. <li>A runtime library supporting the retrieval of translated messages.
  920. <li>A few stand-alone programs to massage in various ways the sets of
  921. translatable strings, or already translated strings.
  922. <li>A library supporting the parsing and creation of files containing
  923. translated messages.
  924. <li>A special mode for Emacs<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a> which helps preparing these sets
  925. and bringing them up to date.
  926. </ul>
  927. <p>GNU <code>gettext</code> is designed to minimize the impact of
  928. internationalization on program sources, keeping this impact as small
  929. and hardly noticeable as possible. Internationalization has better
  930. chances of succeeding if it is very light weighted, or at least,
  931. appear to be so, when looking at program sources.
  932. <p>The Translation Project also uses the GNU <code>gettext</code> distribution
  933. as a vehicle for documenting its structure and methods. This goes
  934. beyond the strict technicalities of documenting the GNU <code>gettext</code>
  935. proper. By so doing, translators will find in a single place, as
  936. far as possible, all they need to know for properly doing their
  937. translating work. Also, this supplemental documentation might also
  938. help programmers, and even curious users, in understanding how GNU
  939. <code>gettext</code> is related to the remainder of the Translation
  940. Project, and consequently, have a glimpse at the <em>big picture</em>.
  941. <div class="node">
  942. <a name="Concepts"></a>
  943. <p><hr>
  944. Next:&nbsp;<a rel="next" accesskey="n" href="#Aspects">Aspects</a>,
  945. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Why">Why</a>,
  946. Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
  947. </div>
  948. <h3 class="section">1.2 I18n, L10n, and Such</h3>
  949. <p><a name="index-i18n-6"></a><a name="index-l10n-7"></a>Two long words appear all the time when we discuss support of native
  950. language in programs, and these words have a precise meaning, worth
  951. being explained here, once and for all in this document. The words are
  952. <em>internationalization</em> and <em>localization</em>. Many people,
  953. tired of writing these long words over and over again, took the
  954. habit of writing <dfn>i18n</dfn> and <dfn>l10n</dfn> instead, quoting the first
  955. and last letter of each word, and replacing the run of intermediate
  956. letters by a number merely telling how many such letters there are.
  957. But in this manual, in the sake of clarity, we will patiently write
  958. the names in full, each time<small class="dots">...</small>
  959. <p><a name="index-internationalization-8"></a>By <dfn>internationalization</dfn>, one refers to the operation by which a
  960. program, or a set of programs turned into a package, is made aware of and
  961. able to support multiple languages. This is a generalization process,
  962. by which the programs are untied from calling only English strings or
  963. other English specific habits, and connected to generic ways of doing
  964. the same, instead. Program developers may use various techniques to
  965. internationalize their programs. Some of these have been standardized.
  966. GNU <code>gettext</code> offers one of these standards. See <a href="#Programmers">Programmers</a>.
  967. <p><a name="index-localization-9"></a>By <dfn>localization</dfn>, one means the operation by which, in a set
  968. of programs already internationalized, one gives the program all
  969. needed information so that it can adapt itself to handle its input
  970. and output in a fashion which is correct for some native language and
  971. cultural habits. This is a particularisation process, by which generic
  972. methods already implemented in an internationalized program are used
  973. in specific ways. The programming environment puts several functions
  974. to the programmers disposal which allow this runtime configuration.
  975. The formal description of specific set of cultural habits for some
  976. country, together with all associated translations targeted to the
  977. same native language, is called the <dfn>locale</dfn> for this language
  978. or country. Users achieve localization of programs by setting proper
  979. values to special environment variables, prior to executing those
  980. programs, identifying which locale should be used.
  981. <p>In fact, locale message support is only one component of the cultural
  982. data that makes up a particular locale. There are a whole host of
  983. routines and functions provided to aid programmers in developing
  984. internationalized software and which allow them to access the data
  985. stored in a particular locale. When someone presently refers to a
  986. particular locale, they are obviously referring to the data stored
  987. within that particular locale. Similarly, if a programmer is referring
  988. to &ldquo;accessing the locale routines&rdquo;, they are referring to the
  989. complete suite of routines that access all of the locale's information.
  990. <p><a name="index-NLS-10"></a><a name="index-Native-Language-Support-11"></a><a name="index-Natural-Language-Support-12"></a>One uses the expression <dfn>Native Language Support</dfn>, or merely NLS,
  991. for speaking of the overall activity or feature encompassing both
  992. internationalization and localization, allowing for multi-lingual
  993. interactions in a program. In a nutshell, one could say that
  994. internationalization is the operation by which further localizations
  995. are made possible.
  996. <p>Also, very roughly said, when it comes to multi-lingual messages,
  997. internationalization is usually taken care of by programmers, and
  998. localization is usually taken care of by translators.
  999. <div class="node">
  1000. <a name="Aspects"></a>
  1001. <p><hr>
  1002. Next:&nbsp;<a rel="next" accesskey="n" href="#Files">Files</a>,
  1003. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Concepts">Concepts</a>,
  1004. Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
  1005. </div>
  1006. <h3 class="section">1.3 Aspects in Native Language Support</h3>
  1007. <p><a name="index-translation-aspects-13"></a>For a totally multi-lingual distribution, there are many things to
  1008. translate beyond output messages.
  1009. <ul>
  1010. <li>As of today, GNU <code>gettext</code> offers a complete toolset for
  1011. translating messages output by C programs. Perl scripts and shell
  1012. scripts will also need to be translated. Even if there are today some hooks
  1013. by which this can be done, these hooks are not integrated as well as they
  1014. should be.
  1015. <li>Some programs, like <code>autoconf</code> or <code>bison</code>, are able
  1016. to produce other programs (or scripts). Even if the generating
  1017. programs themselves are internationalized, the generated programs they
  1018. produce may need internationalization on their own, and this indirect
  1019. internationalization could be automated right from the generating
  1020. program. In fact, quite usually, generating and generated programs
  1021. could be internationalized independently, as the effort needed is
  1022. fairly orthogonal.
  1023. <li>A few programs include textual tables which might need translation
  1024. themselves, independently of the strings contained in the program
  1025. itself. For example, RFC&nbsp;1345<!-- /@w --> gives an English description for each
  1026. character which the <code>recode</code> program is able to reconstruct at execution.
  1027. Since these descriptions are extracted from the RFC by mechanical means,
  1028. translating them properly would require a prior translation of the RFC
  1029. itself.
  1030. <li>Almost all programs accept options, which are often worded out so to
  1031. be descriptive for the English readers; one might want to consider
  1032. offering translated versions for program options as well.
  1033. <li>Many programs read, interpret, compile, or are somewhat driven by
  1034. input files which are texts containing keywords, identifiers, or
  1035. replies which are inherently translatable. For example, one may want
  1036. <code>gcc</code> to allow diacriticized characters in identifiers or use
  1037. translated keywords; &lsquo;<samp><span class="samp">rm -i</span></samp>&rsquo; might accept something else than
  1038. &lsquo;<samp><span class="samp">y</span></samp>&rsquo; or &lsquo;<samp><span class="samp">n</span></samp>&rsquo; for replies, etc. Even if the program will
  1039. eventually make most of its output in the foreign languages, one has
  1040. to decide whether the input syntax, option values, etc., are to be
  1041. localized or not.
  1042. <li>The manual accompanying a package, as well as all documentation files
  1043. in the distribution, could surely be translated, too. Translating a
  1044. manual, with the intent of later keeping up with updates, is a major
  1045. undertaking in itself, generally.
  1046. </ul>
  1047. <p>As we already stressed, translation is only one aspect of locales.
  1048. Other internationalization aspects are system services and are handled
  1049. in GNU <code>libc</code>. There
  1050. are many attributes that are needed to define a country's cultural
  1051. conventions. These attributes include beside the country's native
  1052. language, the formatting of the date and time, the representation of
  1053. numbers, the symbols for currency, etc. These local <dfn>rules</dfn> are
  1054. termed the country's locale. The locale represents the knowledge
  1055. needed to support the country's native attributes.
  1056. <p><a name="index-locale-categories-14"></a>There are a few major areas which may vary between countries and
  1057. hence, define what a locale must describe. The following list helps
  1058. putting multi-lingual messages into the proper context of other tasks
  1059. related to locales. See the GNU <code>libc</code> manual for details.
  1060. <dl>
  1061. <dt><em>Characters and Codesets</em><dd><a name="index-codeset-15"></a><a name="index-encoding-16"></a><a name="index-character-encoding-17"></a><a name="index-locale-category_002c-LC_005fCTYPE-18"></a>
  1062. The codeset most commonly used through out the USA and most English
  1063. speaking parts of the world is the ASCII codeset. However, there are
  1064. many characters needed by various locales that are not found within
  1065. this codeset. The 8-bit ISO&nbsp;8859-1<!-- /@w --> code set has most of the special
  1066. characters needed to handle the major European languages. However, in
  1067. many cases, choosing ISO&nbsp;8859-1<!-- /@w --> is nevertheless not adequate: it
  1068. doesn't even handle the major European currency. Hence each locale
  1069. will need to specify which codeset they need to use and will need
  1070. to have the appropriate character handling routines to cope with
  1071. the codeset.
  1072. <br><dt><em>Currency</em><dd><a name="index-currency-symbols-19"></a><a name="index-locale-category_002c-LC_005fMONETARY-20"></a>
  1073. The symbols used vary from country to country as does the position
  1074. used by the symbol. Software needs to be able to transparently
  1075. display currency figures in the native mode for each locale.
  1076. <br><dt><em>Dates</em><dd><a name="index-date-format-21"></a><a name="index-locale-category_002c-LC_005fTIME-22"></a>
  1077. The format of date varies between locales. For example, Christmas day
  1078. in 1994 is written as 12/25/94 in the USA and as 25/12/94 in Australia.
  1079. Other countries might use ISO&nbsp;8601<!-- /@w --> dates, etc.
  1080. <p>Time of the day may be noted as <var>hh</var>:<var>mm</var>, <var>hh</var>.<var>mm</var>,
  1081. or otherwise. Some locales require time to be specified in 24-hour
  1082. mode rather than as AM or PM. Further, the nature and yearly extent
  1083. of the Daylight Saving correction vary widely between countries.
  1084. <br><dt><em>Numbers</em><dd><a name="index-number-format-23"></a><a name="index-locale-category_002c-LC_005fNUMERIC-24"></a>
  1085. Numbers can be represented differently in different locales.
  1086. For example, the following numbers are all written correctly for
  1087. their respective locales:
  1088. <pre class="example"> 12,345.67 English
  1089. 12.345,67 German
  1090. 12345,67 French
  1091. 1,2345.67 Asia
  1092. </pre>
  1093. <p>Some programs could go further and use different unit systems, like
  1094. English units or Metric units, or even take into account variants
  1095. about how numbers are spelled in full.
  1096. <br><dt><em>Messages</em><dd><a name="index-messages-25"></a><a name="index-locale-category_002c-LC_005fMESSAGES-26"></a>
  1097. The most obvious area is the language support within a locale. This is
  1098. where GNU <code>gettext</code> provides the means for developers and users to
  1099. easily change the language that the software uses to communicate to
  1100. the user.
  1101. </dl>
  1102. <p><a name="index-locale-categories-27"></a>These areas of cultural conventions are called <em>locale categories</em>.
  1103. It is an unfortunate term; <em>locale aspects</em> or <em>locale feature
  1104. categories</em> would be a better term, because each &ldquo;locale category&rdquo;
  1105. describes an area or task that requires localization. The concrete data
  1106. that describes the cultural conventions for such an area and for a particular
  1107. culture is also called a <em>locale category</em>. In this sense, a locale
  1108. is composed of several locale categories: the locale category describing
  1109. the codeset, the locale category describing the formatting of numbers,
  1110. the locale category containing the translated messages, and so on.
  1111. <p><a name="index-Linux-28"></a>Components of locale outside of message handling are standardized in
  1112. the ISO C standard and the POSIX:2001 standard (also known as the SUSV3
  1113. specification). GNU <code>libc</code>
  1114. fully implements this, and most other modern systems provide a more
  1115. or less reasonable support for at least some of the missing components.
  1116. <div class="node">
  1117. <a name="Files"></a>
  1118. <p><hr>
  1119. Next:&nbsp;<a rel="next" accesskey="n" href="#Overview">Overview</a>,
  1120. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Aspects">Aspects</a>,
  1121. Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
  1122. </div>
  1123. <h3 class="section">1.4 Files Conveying Translations</h3>
  1124. <p><a name="index-files_002c-_0040file_007b_002epo_007d-and-_0040file_007b_002emo_007d-29"></a>The letters PO in <samp><span class="file">.po</span></samp> files means Portable Object, to
  1125. distinguish it from <samp><span class="file">.mo</span></samp> files, where MO stands for Machine
  1126. Object. This paradigm, as well as the PO file format, is inspired
  1127. by the NLS standard developed by Uniforum, and first implemented by
  1128. Sun in their Solaris system.
  1129. <p>PO files are meant to be read and edited by humans, and associate each
  1130. original, translatable string of a given package with its translation
  1131. in a particular target language. A single PO file is dedicated to
  1132. a single target language. If a package supports many languages,
  1133. there is one such PO file per language supported, and each package
  1134. has its own set of PO files. These PO files are best created by
  1135. the <code>xgettext</code> program, and later updated or refreshed through
  1136. the <code>msgmerge</code> program. Program <code>xgettext</code> extracts all
  1137. marked messages from a set of C files and initializes a PO file with
  1138. empty translations. Program <code>msgmerge</code> takes care of adjusting
  1139. PO files between releases of the corresponding sources, commenting
  1140. obsolete entries, initializing new ones, and updating all source
  1141. line references. Files ending with <samp><span class="file">.pot</span></samp> are kind of base
  1142. translation files found in distributions, in PO file format.
  1143. <p>MO files are meant to be read by programs, and are binary in nature.
  1144. A few systems already offer tools for creating and handling MO files
  1145. as part of the Native Language Support coming with the system, but the
  1146. format of these MO files is often different from system to system,
  1147. and non-portable. The tools already provided with these systems don't
  1148. support all the features of GNU <code>gettext</code>. Therefore GNU
  1149. <code>gettext</code> uses its own format for MO files. Files ending with
  1150. <samp><span class="file">.gmo</span></samp> are really MO files, when it is known that these files use
  1151. the GNU format.
  1152. <div class="node">
  1153. <a name="Overview"></a>
  1154. <p><hr>
  1155. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Files">Files</a>,
  1156. Up:&nbsp;<a rel="up" accesskey="u" href="#Introduction">Introduction</a>
  1157. </div>
  1158. <h3 class="section">1.5 Overview of GNU <code>gettext</code></h3>
  1159. <p><a name="index-overview-of-_0040code_007bgettext_007d-30"></a><a name="index-big-picture-31"></a><a name="index-tutorial-of-_0040code_007bgettext_007d-usage-32"></a>The following diagram summarizes the relation between the files
  1160. handled by GNU <code>gettext</code> and the tools acting on these files.
  1161. It is followed by somewhat detailed explanations, which you should
  1162. read while keeping an eye on the diagram. Having a clear understanding
  1163. of these interrelations will surely help programmers, translators
  1164. and maintainers.
  1165. <pre class="example"> Original C Sources ───&gt; Preparation ───&gt; Marked C Sources ───╮
  1166. ╭─────────&lt;─── GNU gettext Library │
  1167. ╭─── make &lt;───┤ │
  1168. │ ╰─────────&lt;────────────────────┬───────────────╯
  1169. │ │
  1170. │ ╭─────&lt;─── PACKAGE.pot &lt;─── xgettext &lt;───╯ ╭───&lt;─── PO Compendium
  1171. │ │ │ ↑
  1172. │ │ ╰───╮ │
  1173. │ ╰───╮ ├───&gt; PO editor ───╮
  1174. │ ├────&gt; msgmerge ──────&gt; LANG.po ────&gt;────────╯ │
  1175. │ ╭───╯ │
  1176. │ │ │
  1177. │ ╰─────────────&lt;───────────────╮ │
  1178. │ ├─── New LANG.po &lt;────────────────────╯
  1179. │ ╭─── LANG.gmo &lt;─── msgfmt &lt;───╯
  1180. │ │
  1181. │ ╰───&gt; install ───&gt; /.../LANG/PACKAGE.mo ───╮
  1182. │ ├───&gt; "Hello world!"
  1183. ╰───────&gt; install ───&gt; /.../bin/PROGRAM ───────╯
  1184. </pre>
  1185. <p><a name="index-marking-translatable-strings-33"></a>As a programmer, the first step to bringing GNU <code>gettext</code>
  1186. into your package is identifying, right in the C sources, those strings
  1187. which are meant to be translatable, and those which are untranslatable.
  1188. This tedious job can be done a little more comfortably using emacs PO
  1189. mode, but you can use any means familiar to you for modifying your
  1190. C sources. Beside this some other simple, standard changes are needed to
  1191. properly initialize the translation library. See <a href="#Sources">Sources</a>, for
  1192. more information about all this.
  1193. <p>For newly written software the strings of course can and should be
  1194. marked while writing it. The <code>gettext</code> approach makes this
  1195. very easy. Simply put the following lines at the beginning of each file
  1196. or in a central header file:
  1197. <pre class="example"> #define _(String) (String)
  1198. #define N_(String) String
  1199. #define textdomain(Domain)
  1200. #define bindtextdomain(Package, Directory)
  1201. </pre>
  1202. <p class="noindent">Doing this allows you to prepare the sources for internationalization.
  1203. Later when you feel ready for the step to use the <code>gettext</code> library
  1204. simply replace these definitions by the following:
  1205. <p><a name="index-include-file-_0040file_007blibintl_002eh_007d-34"></a>
  1206. <pre class="example"> #include &lt;libintl.h&gt;
  1207. #define _(String) gettext (String)
  1208. #define gettext_noop(String) String
  1209. #define N_(String) gettext_noop (String)
  1210. </pre>
  1211. <p><a name="index-link-with-_0040file_007blibintl_007d-35"></a><a name="index-Linux-36"></a>and link against <samp><span class="file">libintl.a</span></samp> or <samp><span class="file">libintl.so</span></samp>. Note that on
  1212. GNU systems, you don't need to link with <code>libintl</code> because the
  1213. <code>gettext</code> library functions are already contained in GNU libc.
  1214. That is all you have to change.
  1215. <p><a name="index-template-PO-file-37"></a><a name="index-files_002c-_0040file_007b_002epot_007d-38"></a>Once the C sources have been modified, the <code>xgettext</code> program
  1216. is used to find and extract all translatable strings, and create a
  1217. PO template file out of all these. This <samp><var>package</var><span class="file">.pot</span></samp> file
  1218. contains all original program strings. It has sets of pointers to
  1219. exactly where in C sources each string is used. All translations
  1220. are set to empty. The letter <code>t</code> in <samp><span class="file">.pot</span></samp> marks this as
  1221. a Template PO file, not yet oriented towards any particular language.
  1222. See <a href="#xgettext-Invocation">xgettext Invocation</a>, for more details about how one calls the
  1223. <code>xgettext</code> program. If you are <em>really</em> lazy, you might
  1224. be interested at working a lot more right away, and preparing the
  1225. whole distribution setup (see <a href="#Maintainers">Maintainers</a>). By doing so, you
  1226. spare yourself typing the <code>xgettext</code> command, as <code>make</code>
  1227. should now generate the proper things automatically for you!
  1228. <p>The first time through, there is no <samp><var>lang</var><span class="file">.po</span></samp> yet, so the
  1229. <code>msgmerge</code> step may be skipped and replaced by a mere copy of
  1230. <samp><var>package</var><span class="file">.pot</span></samp> to <samp><var>lang</var><span class="file">.po</span></samp>, where <var>lang</var>
  1231. represents the target language. See <a href="#Creating">Creating</a> for details.
  1232. <p>Then comes the initial translation of messages. Translation in
  1233. itself is a whole matter, still exclusively meant for humans,
  1234. and whose complexity far overwhelms the level of this manual.
  1235. Nevertheless, a few hints are given in some other chapter of this
  1236. manual (see <a href="#Translators">Translators</a>). You will also find there indications
  1237. about how to contact translating teams, or becoming part of them,
  1238. for sharing your translating concerns with others who target the same
  1239. native language.
  1240. <p>While adding the translated messages into the <samp><var>lang</var><span class="file">.po</span></samp>
  1241. PO file, if you are not using one of the dedicated PO file editors
  1242. (see <a href="#Editing">Editing</a>), you are on your own
  1243. for ensuring that your efforts fully respect the PO file format, and quoting
  1244. conventions (see <a href="#PO-Files">PO Files</a>). This is surely not an impossible task,
  1245. as this is the way many people have handled PO files around 1995.
  1246. On the other hand, by using a PO file editor, most details
  1247. of PO file format are taken care of for you, but you have to acquire
  1248. some familiarity with PO file editor itself.
  1249. <p>If some common translations have already been saved into a compendium
  1250. PO file, translators may use PO mode for initializing untranslated
  1251. entries from the compendium, and also save selected translations into
  1252. the compendium, updating it (see <a href="#Compendium">Compendium</a>). Compendium files
  1253. are meant to be exchanged between members of a given translation team.
  1254. <p>Programs, or packages of programs, are dynamic in nature: users write
  1255. bug reports and suggestion for improvements, maintainers react by
  1256. modifying programs in various ways. The fact that a package has
  1257. already been internationalized should not make maintainers shy
  1258. of adding new strings, or modifying strings already translated.
  1259. They just do their job the best they can. For the Translation
  1260. Project to work smoothly, it is important that maintainers do not
  1261. carry translation concerns on their already loaded shoulders, and that
  1262. translators be kept as free as possible of programming concerns.
  1263. <p>The only concern maintainers should have is carefully marking new
  1264. strings as translatable, when they should be, and do not otherwise
  1265. worry about them being translated, as this will come in proper time.
  1266. Consequently, when programs and their strings are adjusted in various
  1267. ways by maintainers, and for matters usually unrelated to translation,
  1268. <code>xgettext</code> would construct <samp><var>package</var><span class="file">.pot</span></samp> files which are
  1269. evolving over time, so the translations carried by <samp><var>lang</var><span class="file">.po</span></samp>
  1270. are slowly fading out of date.
  1271. <p><a name="index-evolution-of-packages-39"></a>It is important for translators (and even maintainers) to understand
  1272. that package translation is a continuous process in the lifetime of a
  1273. package, and not something which is done once and for all at the start.
  1274. After an initial burst of translation activity for a given package,
  1275. interventions are needed once in a while, because here and there,
  1276. translated entries become obsolete, and new untranslated entries
  1277. appear, needing translation.
  1278. <p>The <code>msgmerge</code> program has the purpose of refreshing an already
  1279. existing <samp><var>lang</var><span class="file">.po</span></samp> file, by comparing it with a newer
  1280. <samp><var>package</var><span class="file">.pot</span></samp> template file, extracted by <code>xgettext</code>
  1281. out of recent C sources. The refreshing operation adjusts all
  1282. references to C source locations for strings, since these strings
  1283. move as programs are modified. Also, <code>msgmerge</code> comments out as
  1284. obsolete, in <samp><var>lang</var><span class="file">.po</span></samp>, those already translated entries
  1285. which are no longer used in the program sources (see <a href="#Obsolete-Entries">Obsolete Entries</a>). It finally discovers new strings and inserts them in
  1286. the resulting PO file as untranslated entries (see <a href="#Untranslated-Entries">Untranslated Entries</a>). See <a href="#msgmerge-Invocation">msgmerge Invocation</a>, for more information about what
  1287. <code>msgmerge</code> really does.
  1288. <p>Whatever route or means taken, the goal is to obtain an updated
  1289. <samp><var>lang</var><span class="file">.po</span></samp> file offering translations for all strings.
  1290. <p>The temporal mobility, or fluidity of PO files, is an integral part of
  1291. the translation game, and should be well understood, and accepted.
  1292. People resisting it will have a hard time participating in the
  1293. Translation Project, or will give a hard time to other participants! In
  1294. particular, maintainers should relax and include all available official
  1295. PO files in their distributions, even if these have not recently been
  1296. updated, without exerting pressure on the translator teams to get the
  1297. job done. The pressure should rather come
  1298. from the community of users speaking a particular language, and
  1299. maintainers should consider themselves fairly relieved of any concern
  1300. about the adequacy of translation files. On the other hand, translators
  1301. should reasonably try updating the PO files they are responsible for,
  1302. while the package is undergoing pretest, prior to an official
  1303. distribution.
  1304. <p>Once the PO file is complete and dependable, the <code>msgfmt</code> program
  1305. is used for turning the PO file into a machine-oriented format, which
  1306. may yield efficient retrieval of translations by the programs of the
  1307. package, whenever needed at runtime (see <a href="#MO-Files">MO Files</a>). See <a href="#msgfmt-Invocation">msgfmt Invocation</a>, for more information about all modes of execution
  1308. for the <code>msgfmt</code> program.
  1309. <p>Finally, the modified and marked C sources are compiled and linked
  1310. with the GNU <code>gettext</code> library, usually through the operation of
  1311. <code>make</code>, given a suitable <samp><span class="file">Makefile</span></samp> exists for the project,
  1312. and the resulting executable is installed somewhere users will find it.
  1313. The MO files themselves should also be properly installed. Given the
  1314. appropriate environment variables are set (see <a href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>),
  1315. the program should localize itself automatically, whenever it executes.
  1316. <p>The remainder of this manual has the purpose of explaining in depth the various
  1317. steps outlined above.
  1318. <div class="node">
  1319. <a name="Users"></a>
  1320. <p><hr>
  1321. Next:&nbsp;<a rel="next" accesskey="n" href="#PO-Files">PO Files</a>,
  1322. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Introduction">Introduction</a>,
  1323. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  1324. </div>
  1325. <h2 class="chapter">2 The User's View</h2>
  1326. <p>Nowadays, when users log into a computer, they usually find that all
  1327. their programs show messages in their native language &ndash; at least for
  1328. users of languages with an active free software community, like French or
  1329. German; to a lesser extent for languages with a smaller participation in
  1330. free software and the GNU project, like Hindi and Filipino.
  1331. <p>How does this work? How can the user influence the language that is used
  1332. by the programs? This chapter will answer it.
  1333. <ul class="menu">
  1334. <li><a accesskey="1" href="#System-Installation">System Installation</a>: Questions During Operating System Installation
  1335. <li><a accesskey="2" href="#Setting-the-GUI-Locale">Setting the GUI Locale</a>: How to Specify the Locale Used by GUI Programs
  1336. <li><a accesskey="3" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>: How to Specify the Locale According to POSIX
  1337. <li><a accesskey="4" href="#Installing-Localizations">Installing Localizations</a>: How to Install Additional Translations
  1338. </ul>
  1339. <div class="node">
  1340. <a name="System-Installation"></a>
  1341. <p><hr>
  1342. Next:&nbsp;<a rel="next" accesskey="n" href="#Setting-the-GUI-Locale">Setting the GUI Locale</a>,
  1343. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Users">Users</a>,
  1344. Up:&nbsp;<a rel="up" accesskey="u" href="#Users">Users</a>
  1345. </div>
  1346. <h3 class="section">2.1 Operating System Installation</h3>
  1347. <p>The default language is often already specified during operating system
  1348. installation. When the operating system is installed, the installer
  1349. typically asks for the language used for the installation process and,
  1350. separately, for the language to use in the installed system. Some OS
  1351. installers only ask for the language once.
  1352. <p>This determines the system-wide default language for all users. But the
  1353. installers often give the possibility to install extra localizations for
  1354. additional languages. For example, the localizations of KDE (the K
  1355. Desktop Environment) and OpenOffice.org are often bundled separately,
  1356. as one installable package per language.
  1357. <p>At this point it is good to consider the intended use of the machine: If
  1358. it is a machine designated for personal use, additional localizations are
  1359. probably not necessary. If, however, the machine is in use in an
  1360. organization or company that has international relationships, one can
  1361. consider the needs of guest users. If you have a guest from abroad, for
  1362. a week, what could be his preferred locales? It may be worth installing
  1363. these additional localizations ahead of time, since they cost only a bit
  1364. of disk space at this point.
  1365. <p>The system-wide default language is the locale configuration that is used
  1366. when a new user account is created. But the user can have his own locale
  1367. configuration that is different from the one of the other users of the
  1368. same machine. He can specify it, typically after the first login, as
  1369. described in the next section.
  1370. <div class="node">
  1371. <a name="Setting-the-GUI-Locale"></a>
  1372. <p><hr>
  1373. Next:&nbsp;<a rel="next" accesskey="n" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>,
  1374. Previous:&nbsp;<a rel="previous" accesskey="p" href="#System-Installation">System Installation</a>,
  1375. Up:&nbsp;<a rel="up" accesskey="u" href="#Users">Users</a>
  1376. </div>
  1377. <h3 class="section">2.2 Setting the Locale Used by GUI Programs</h3>
  1378. <p>The immediately available programs in a user's desktop come from a group
  1379. of programs called a &ldquo;desktop environment&rdquo;; it usually includes the window
  1380. manager, a web browser, a text editor, and more. The most common free
  1381. desktop environments are KDE, GNOME, and Xfce.
  1382. <p>The locale used by GUI programs of the desktop environment can be specified
  1383. in a configuration screen called &ldquo;control center&rdquo;, &ldquo;language settings&rdquo;
  1384. or &ldquo;country settings&rdquo;.
  1385. <p>Individual GUI programs that are not part of the desktop environment can
  1386. have their locale specified either in a settings panel, or through environment
  1387. variables.
  1388. <p>For some programs, it is possible to specify the locale through environment
  1389. variables, possibly even to a different locale than the desktop's locale.
  1390. This means, instead of starting a program through a menu or from the file
  1391. system, you can start it from the command-line, after having set some
  1392. environment variables. The environment variables can be those specified
  1393. in the next section (<a href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>); for some versions of
  1394. KDE, however, the locale is specified through a variable <code>KDE_LANG</code>,
  1395. rather than <code>LANG</code> or <code>LC_ALL</code>.
  1396. <div class="node">
  1397. <a name="Setting-the-POSIX-Locale"></a>
  1398. <p><hr>
  1399. Next:&nbsp;<a rel="next" accesskey="n" href="#Installing-Localizations">Installing Localizations</a>,
  1400. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Setting-the-GUI-Locale">Setting the GUI Locale</a>,
  1401. Up:&nbsp;<a rel="up" accesskey="u" href="#Users">Users</a>
  1402. </div>
  1403. <h3 class="section">2.3 Setting the Locale through Environment Variables</h3>
  1404. <p>As a user, if your language has been installed for this package, in the
  1405. simplest case, you only have to set the <code>LANG</code> environment variable
  1406. to the appropriate &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo; combination. For example,
  1407. let's suppose that you speak German and live in Germany. At the shell
  1408. prompt, merely execute
  1409. &lsquo;<samp><span class="samp">setenv&nbsp;LANG&nbsp;de_DE</span></samp>&rsquo;<!-- /@w --> (in <code>csh</code>),
  1410. &lsquo;<samp><span class="samp">export&nbsp;LANG;&nbsp;LANG=de_DE</span></samp>&rsquo;<!-- /@w --> (in <code>sh</code>) or
  1411. &lsquo;<samp><span class="samp">export&nbsp;LANG=de_DE</span></samp>&rsquo;<!-- /@w --> (in <code>bash</code>). This can be done from your
  1412. <samp><span class="file">.login</span></samp> or <samp><span class="file">.profile</span></samp> file, once and for all.
  1413. <ul class="menu">
  1414. <li><a accesskey="1" href="#Locale-Names">Locale Names</a>: How a Locale Specification Looks Like
  1415. <li><a accesskey="2" href="#Locale-Environment-Variables">Locale Environment Variables</a>: Which Environment Variable Specfies What
  1416. <li><a accesskey="3" href="#The-LANGUAGE-variable">The LANGUAGE variable</a>: How to Specify a Priority List of Languages
  1417. </ul>
  1418. <div class="node">
  1419. <a name="Locale-Names"></a>
  1420. <p><hr>
  1421. Next:&nbsp;<a rel="next" accesskey="n" href="#Locale-Environment-Variables">Locale Environment Variables</a>,
  1422. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>,
  1423. Up:&nbsp;<a rel="up" accesskey="u" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>
  1424. </div>
  1425. <h4 class="subsection">2.3.1 Locale Names</h4>
  1426. <p>A locale name usually has the form &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo;. Here
  1427. &lsquo;<samp><var>ll</var></samp>&rsquo; is an ISO&nbsp;639<!-- /@w --> two-letter language code, and
  1428. &lsquo;<samp><var>CC</var></samp>&rsquo; is an ISO&nbsp;3166<!-- /@w --> two-letter country code. For example,
  1429. for German in Germany, <var>ll</var> is <code>de</code>, and <var>CC</var> is <code>DE</code>.
  1430. You find a list of the language codes in appendix <a href="#Language-Codes">Language Codes</a> and
  1431. a list of the country codes in appendix <a href="#Country-Codes">Country Codes</a>.
  1432. <p>You might think that the country code specification is redundant. But in
  1433. fact, some languages have dialects in different countries. For example,
  1434. &lsquo;<samp><span class="samp">de_AT</span></samp>&rsquo; is used for Austria, and &lsquo;<samp><span class="samp">pt_BR</span></samp>&rsquo; for Brazil. The country
  1435. code serves to distinguish the dialects.
  1436. <p>Many locale names have an extended syntax
  1437. &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var><span class="samp">.</span><var>encoding</var></samp>&rsquo; that also specifies the character
  1438. encoding. These are in use because between 2000 and 2005, most users have
  1439. switched to locales in UTF-8 encoding. For example, the German locale on
  1440. glibc systems is nowadays &lsquo;<samp><span class="samp">de_DE.UTF-8</span></samp>&rsquo;. The older name &lsquo;<samp><span class="samp">de_DE</span></samp>&rsquo;
  1441. still refers to the German locale as of 2000 that stores characters in
  1442. ISO-8859-1 encoding &ndash; a text encoding that cannot even accomodate the Euro
  1443. currency sign.
  1444. <p>Some locale names use &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var><span class="samp">.@</span><var>variant</var></samp>&rsquo; instead of
  1445. &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo;. The &lsquo;<samp><span class="samp">@</span><var>variant</var></samp>&rsquo; can denote any kind of
  1446. characteristics that is not already implied by the language <var>ll</var> and
  1447. the country <var>CC</var>. It can denote a particular monetary unit. For example,
  1448. on glibc systems, &lsquo;<samp><span class="samp">de_DE@euro</span></samp>&rsquo; denotes the locale that uses the Euro
  1449. currency, in contrast to the older locale &lsquo;<samp><span class="samp">de_DE</span></samp>&rsquo; which implies the use
  1450. of the currency before 2002. It can also denote a dialect of the language,
  1451. or the script used to write text (for example, &lsquo;<samp><span class="samp">sr_RS@latin</span></samp>&rsquo; uses the
  1452. Latin script, whereas &lsquo;<samp><span class="samp">sr_RS</span></samp>&rsquo; uses the Cyrillic script to write Serbian),
  1453. or the orthography rules, or similar.
  1454. <p>On other systems, some variations of this scheme are used, such as
  1455. &lsquo;<samp><var>ll</var></samp>&rsquo;. You can get the list of locales supported by your system
  1456. for your language by running the command &lsquo;<samp><span class="samp">locale -a | grep '^</span><var>ll</var><span class="samp">'</span></samp>&rsquo;.
  1457. <p>There is also a special locale, called &lsquo;<samp><span class="samp">C</span></samp>&rsquo;.
  1458. <!-- Don't mention that this locale also has the name "POSIX". When we talk about -->
  1459. <!-- the "POSIX locale", we mean the "locale as specified in the POSIX way", and -->
  1460. <!-- mentioning a locale called "POSIX" would bring total confusion. -->
  1461. When it is used, it disables all localization: in this locale, all programs
  1462. standardized by POSIX use English messages and an unspecified character
  1463. encoding (often US-ASCII, but sometimes also ISO-8859-1 or UTF-8, depending on
  1464. the operating system).
  1465. <div class="node">
  1466. <a name="Locale-Environment-Variables"></a>
  1467. <p><hr>
  1468. Next:&nbsp;<a rel="next" accesskey="n" href="#The-LANGUAGE-variable">The LANGUAGE variable</a>,
  1469. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Locale-Names">Locale Names</a>,
  1470. Up:&nbsp;<a rel="up" accesskey="u" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>
  1471. </div>
  1472. <h4 class="subsection">2.3.2 Locale Environment Variables</h4>
  1473. <p><a name="index-setting-up-_0040code_007bgettext_007d-at-run-time-40"></a><a name="index-selecting-message-language-41"></a><a name="index-language-selection-42"></a>
  1474. A locale is composed of several <em>locale categories</em>, see <a href="#Aspects">Aspects</a>.
  1475. When a program looks up locale dependent values, it does this according to
  1476. the following environment variables, in priority order:
  1477. <ol type=1 start=1>
  1478. <a name="index-LANGUAGE_0040r_007b_002c-environment-variable_007d-43"></a><li><code>LANGUAGE</code>
  1479. <a name="index-LC_005fALL_0040r_007b_002c-environment-variable_007d-44"></a><li><code>LC_ALL</code>
  1480. <a name="index-LC_005fCTYPE_0040r_007b_002c-environment-variable_007d-45"></a><a name="index-LC_005fNUMERIC_0040r_007b_002c-environment-variable_007d-46"></a><a name="index-LC_005fTIME_0040r_007b_002c-environment-variable_007d-47"></a><a name="index-LC_005fCOLLATE_0040r_007b_002c-environment-variable_007d-48"></a><a name="index-LC_005fMONETARY_0040r_007b_002c-environment-variable_007d-49"></a><a name="index-LC_005fMESSAGES_0040r_007b_002c-environment-variable_007d-50"></a><li><code>LC_xxx</code>, according to selected locale category:
  1481. <code>LC_CTYPE</code>, <code>LC_NUMERIC</code>, <code>LC_TIME</code>, <code>LC_COLLATE</code>,
  1482. <code>LC_MONETARY</code>, <code>LC_MESSAGES</code>, ...
  1483. <a name="index-LANG_0040r_007b_002c-environment-variable_007d-51"></a><li><code>LANG</code>
  1484. </ol>
  1485. <p>Variables whose value is set but is empty are ignored in this lookup.
  1486. <p><code>LANG</code> is the normal environment variable for specifying a locale.
  1487. As a user, you normally set this variable (unless some of the other variables
  1488. have already been set by the system, in <samp><span class="file">/etc/profile</span></samp> or similar
  1489. initialization files).
  1490. <p><code>LC_CTYPE</code>, <code>LC_NUMERIC</code>, <code>LC_TIME</code>, <code>LC_COLLATE</code>,
  1491. <code>LC_MONETARY</code>, <code>LC_MESSAGES</code>, and so on, are the environment
  1492. variables meant to override <code>LANG</code> and affecting a single locale
  1493. category only. For example, assume you are a Swedish user in Spain, and you
  1494. want your programs to handle numbers and dates according to Spanish
  1495. conventions, and only the messages should be in Swedish. Then you could
  1496. create a locale named &lsquo;<samp><span class="samp">sv_ES</span></samp>&rsquo; or &lsquo;<samp><span class="samp">sv_ES.UTF-8</span></samp>&rsquo; by use of the
  1497. <code>localedef</code> program. But it is simpler, and achieves the same effect,
  1498. to set the <code>LANG</code> variable to <code>es_ES.UTF-8</code> and the
  1499. <code>LC_MESSAGES</code> variable to <code>sv_SE.UTF-8</code>; these two locales come
  1500. already preinstalled with the operating system.
  1501. <p><code>LC_ALL</code> is an environment variable that overrides all of these.
  1502. It is typically used in scripts that run particular programs. For example,
  1503. <code>configure</code> scripts generated by GNU autoconf use <code>LC_ALL</code> to make
  1504. sure that the configuration tests don't operate in locale dependent ways.
  1505. <p>Some systems, unfortunately, set <code>LC_ALL</code> in <samp><span class="file">/etc/profile</span></samp> or in
  1506. similar initialization files. As a user, you therefore have to unset this
  1507. variable if you want to set <code>LANG</code> and optionally some of the other
  1508. <code>LC_xxx</code> variables.
  1509. <p>The <code>LANGUAGE</code> variable is described in the next subsection.
  1510. <div class="node">
  1511. <a name="The-LANGUAGE-variable"></a>
  1512. <p><hr>
  1513. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Locale-Environment-Variables">Locale Environment Variables</a>,
  1514. Up:&nbsp;<a rel="up" accesskey="u" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>
  1515. </div>
  1516. <h4 class="subsection">2.3.3 Specifying a Priority List of Languages</h4>
  1517. <p>Not all programs have translations for all languages. By default, an
  1518. English message is shown in place of a nonexistent translation. If you
  1519. understand other languages, you can set up a priority list of languages.
  1520. This is done through a different environment variable, called
  1521. <code>LANGUAGE</code>. GNU <code>gettext</code> gives preference to <code>LANGUAGE</code>
  1522. over <code>LC_ALL</code> and <code>LANG</code> for the purpose of message handling,
  1523. but you still need to have <code>LANG</code> (or <code>LC_ALL</code>) set to the primary
  1524. language; this is required by other parts of the system libraries.
  1525. For example, some Swedish users who would rather read translations in
  1526. German than English for when Swedish is not available, set <code>LANGUAGE</code>
  1527. to &lsquo;<samp><span class="samp">sv:de</span></samp>&rsquo; while leaving <code>LANG</code> to &lsquo;<samp><span class="samp">sv_SE</span></samp>&rsquo;.
  1528. <p>Special advice for Norwegian users: The language code for Norwegian
  1529. bokma*l changed from &lsquo;<samp><span class="samp">no</span></samp>&rsquo; to &lsquo;<samp><span class="samp">nb</span></samp>&rsquo; recently (in 2003).
  1530. During the transition period, while some message catalogs for this language
  1531. are installed under &lsquo;<samp><span class="samp">nb</span></samp>&rsquo; and some older ones under &lsquo;<samp><span class="samp">no</span></samp>&rsquo;, it is
  1532. recommended for Norwegian users to set <code>LANGUAGE</code> to &lsquo;<samp><span class="samp">nb:no</span></samp>&rsquo; so that
  1533. both newer and older translations are used.
  1534. <p>In the <code>LANGUAGE</code> environment variable, but not in the other
  1535. environment variables, &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo; combinations can be
  1536. abbreviated as &lsquo;<samp><var>ll</var></samp>&rsquo; to denote the language's main dialect.
  1537. For example, &lsquo;<samp><span class="samp">de</span></samp>&rsquo; is equivalent to &lsquo;<samp><span class="samp">de_DE</span></samp>&rsquo; (German as spoken in
  1538. Germany), and &lsquo;<samp><span class="samp">pt</span></samp>&rsquo; to &lsquo;<samp><span class="samp">pt_PT</span></samp>&rsquo; (Portuguese as spoken in Portugal)
  1539. in this context.
  1540. <p>Note: The variable <code>LANGUAGE</code> is ignored if the locale is set to
  1541. &lsquo;<samp><span class="samp">C</span></samp>&rsquo;. In other words, you have to first enable localization, by setting
  1542. <code>LANG</code> (or <code>LC_ALL</code>) to a value other than &lsquo;<samp><span class="samp">C</span></samp>&rsquo;, before you can
  1543. use a language priority list through the <code>LANGUAGE</code> variable.
  1544. <div class="node">
  1545. <a name="Installing-Localizations"></a>
  1546. <p><hr>
  1547. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Setting-the-POSIX-Locale">Setting the POSIX Locale</a>,
  1548. Up:&nbsp;<a rel="up" accesskey="u" href="#Users">Users</a>
  1549. </div>
  1550. <h3 class="section">2.4 Installing Translations for Particular Programs</h3>
  1551. <p><a name="index-Translation-Matrix-52"></a><a name="index-available-translations-53"></a>
  1552. Languages are not equally well supported in all packages using GNU
  1553. <code>gettext</code>, and more translations are added over time. Usually, you
  1554. use the translations that are shipped with the operating system
  1555. or with particular packages that you install afterwards. But you can also
  1556. install newer localizations directly. For doing this, you will need an
  1557. understanding where each localization file is stored on the file system.
  1558. <p><a name="index-g_t_0040file_007bABOUT_002dNLS_007d-file-54"></a>For programs that participate in the Translation Project, you can start
  1559. looking for translations here:
  1560. <a href="http://translationproject.org/team/index.html">http://translationproject.org/team/index.html</a>.
  1561. A snapshot of this information is also found in the <samp><span class="file">ABOUT-NLS</span></samp> file
  1562. that is shipped with GNU gettext.
  1563. <p>For programs that are part of the KDE project, the starting point is:
  1564. <a href="http://i18n.kde.org/">http://i18n.kde.org/</a>.
  1565. <p>For programs that are part of the GNOME project, the starting point is:
  1566. <a href="http://www.gnome.org/i18n/">http://www.gnome.org/i18n/</a>.
  1567. <p>For other programs, you may check whether the program's source code package
  1568. contains some <samp><var>ll</var><span class="file">.po</span></samp> files; often they are kept together in a
  1569. directory called <samp><span class="file">po/</span></samp>. Each <samp><var>ll</var><span class="file">.po</span></samp> file contains the
  1570. message translations for the language whose abbreviation of <var>ll</var>.
  1571. <div class="node">
  1572. <a name="PO-Files"></a>
  1573. <p><hr>
  1574. Next:&nbsp;<a rel="next" accesskey="n" href="#Sources">Sources</a>,
  1575. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Users">Users</a>,
  1576. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  1577. </div>
  1578. <h2 class="chapter">3 The Format of PO Files</h2>
  1579. <p><a name="index-PO-files_0027-format-55"></a><a name="index-file-format_002c-_0040file_007b_002epo_007d-56"></a>
  1580. The GNU <code>gettext</code> toolset helps programmers and translators
  1581. at producing, updating and using translation files, mainly those
  1582. PO files which are textual, editable files. This chapter explains
  1583. the format of PO files.
  1584. <p>A PO file is made up of many entries, each entry holding the relation
  1585. between an original untranslated string and its corresponding
  1586. translation. All entries in a given PO file usually pertain
  1587. to a single project, and all translations are expressed in a single
  1588. target language. One PO file <dfn>entry</dfn> has the following schematic
  1589. structure:
  1590. <pre class="example"> <var>white-space</var>
  1591. # <var>translator-comments</var>
  1592. #. <var>extracted-comments</var>
  1593. #: <var>reference</var>...
  1594. #, <var>flag</var>...
  1595. #| msgid <var>previous-untranslated-string</var>
  1596. msgid <var>untranslated-string</var>
  1597. msgstr <var>translated-string</var>
  1598. </pre>
  1599. <p>The general structure of a PO file should be well understood by
  1600. the translator. When using PO mode, very little has to be known
  1601. about the format details, as PO mode takes care of them for her.
  1602. <p>A simple entry can look like this:
  1603. <pre class="example"> #: lib/error.c:116
  1604. msgid "Unknown system error"
  1605. msgstr "Error desconegut del sistema"
  1606. </pre>
  1607. <p><a name="index-comments_002c-translator-57"></a><a name="index-comments_002c-automatic-58"></a><a name="index-comments_002c-extracted-59"></a>Entries begin with some optional white space. Usually, when generated
  1608. through GNU <code>gettext</code> tools, there is exactly one blank line
  1609. between entries. Then comments follow, on lines all starting with the
  1610. character <code>#</code>. There are two kinds of comments: those which have
  1611. some white space immediately following the <code>#</code> - the <var>translator
  1612. comments</var> -, which comments are created and maintained exclusively by the
  1613. translator, and those which have some non-white character just after the
  1614. <code>#</code> - the <var>automatic comments</var> -, which comments are created and
  1615. maintained automatically by GNU <code>gettext</code> tools. Comment lines
  1616. starting with <code>#.</code> contain comments given by the programmer, directed
  1617. at the translator; these comments are called <var>extracted comments</var>
  1618. because the <code>xgettext</code> program extracts them from the program's
  1619. source code. Comment lines starting with <code>#:</code> contain references to
  1620. the program's source code. Comment lines starting with <code>#,</code> contain
  1621. flags; more about these below. Comment lines starting with <code>#|</code>
  1622. contain the previous untranslated string for which the translator gave
  1623. a translation.
  1624. <p>All comments, of either kind, are optional.
  1625. <p><a name="index-msgid-60"></a><a name="index-msgstr-61"></a>After white space and comments, entries show two strings, namely
  1626. first the untranslated string as it appears in the original program
  1627. sources, and then, the translation of this string. The original
  1628. string is introduced by the keyword <code>msgid</code>, and the translation,
  1629. by <code>msgstr</code>. The two strings, untranslated and translated,
  1630. are quoted in various ways in the PO file, using <code>"</code>
  1631. delimiters and <code>\</code> escapes, but the translator does not really
  1632. have to pay attention to the precise quoting format, as PO mode fully
  1633. takes care of quoting for her.
  1634. <p>The <code>msgid</code> strings, as well as automatic comments, are produced
  1635. and managed by other GNU <code>gettext</code> tools, and PO mode does not
  1636. provide means for the translator to alter these. The most she can
  1637. do is merely deleting them, and only by deleting the whole entry.
  1638. On the other hand, the <code>msgstr</code> string, as well as translator
  1639. comments, are really meant for the translator, and PO mode gives her
  1640. the full control she needs.
  1641. <p>The comment lines beginning with <code>#,</code> are special because they are
  1642. not completely ignored by the programs as comments generally are. The
  1643. comma separated list of <var>flag</var>s is used by the <code>msgfmt</code>
  1644. program to give the user some better diagnostic messages. Currently
  1645. there are two forms of flags defined:
  1646. <dl>
  1647. <dt><code>fuzzy</code><dd><a name="index-fuzzy_0040r_007b-flag_007d-62"></a>This flag can be generated by the <code>msgmerge</code> program or it can be
  1648. inserted by the translator herself. It shows that the <code>msgstr</code>
  1649. string might not be a correct translation (anymore). Only the translator
  1650. can judge if the translation requires further modification, or is
  1651. acceptable as is. Once satisfied with the translation, she then removes
  1652. this <code>fuzzy</code> attribute. The <code>msgmerge</code> program inserts this
  1653. when it combined the <code>msgid</code> and <code>msgstr</code> entries after fuzzy
  1654. search only. See <a href="#Fuzzy-Entries">Fuzzy Entries</a>.
  1655. <br><dt><code>c-format</code><dd><a name="index-c_002dformat_0040r_007b-flag_007d-63"></a><dt><code>no-c-format</code><dd><a name="index-no_002dc_002dformat_0040r_007b-flag_007d-64"></a>These flags should not be added by a human. Instead only the
  1656. <code>xgettext</code> program adds them. In an automated PO file processing
  1657. system as proposed here, the user's changes would be thrown away again as
  1658. soon as the <code>xgettext</code> program generates a new template file.
  1659. <p>The <code>c-format</code> flag indicates that the untranslated string and the
  1660. translation are supposed to be C format strings. The <code>no-c-format</code>
  1661. flag indicates that they are not C format strings, even though the untranslated
  1662. string happens to look like a C format string (with &lsquo;<samp><span class="samp">%</span></samp>&rsquo; directives).
  1663. <p>When the <code>c-format</code> flag is given for a string the <code>msgfmt</code>
  1664. program does some more tests to check the validity of the translation.
  1665. See <a href="#msgfmt-Invocation">msgfmt Invocation</a>, <a href="#c_002dformat-Flag">c-format Flag</a> and <a href="#c_002dformat">c-format</a>.
  1666. <br><dt><code>objc-format</code><dd><a name="index-objc_002dformat_0040r_007b-flag_007d-65"></a><dt><code>no-objc-format</code><dd><a name="index-no_002dobjc_002dformat_0040r_007b-flag_007d-66"></a>Likewise for Objective C, see <a href="#objc_002dformat">objc-format</a>.
  1667. <br><dt><code>sh-format</code><dd><a name="index-sh_002dformat_0040r_007b-flag_007d-67"></a><dt><code>no-sh-format</code><dd><a name="index-no_002dsh_002dformat_0040r_007b-flag_007d-68"></a>Likewise for Shell, see <a href="#sh_002dformat">sh-format</a>.
  1668. <br><dt><code>python-format</code><dd><a name="index-python_002dformat_0040r_007b-flag_007d-69"></a><dt><code>no-python-format</code><dd><a name="index-no_002dpython_002dformat_0040r_007b-flag_007d-70"></a>Likewise for Python, see <a href="#python_002dformat">python-format</a>.
  1669. <br><dt><code>lisp-format</code><dd><a name="index-lisp_002dformat_0040r_007b-flag_007d-71"></a><dt><code>no-lisp-format</code><dd><a name="index-no_002dlisp_002dformat_0040r_007b-flag_007d-72"></a>Likewise for Lisp, see <a href="#lisp_002dformat">lisp-format</a>.
  1670. <br><dt><code>elisp-format</code><dd><a name="index-elisp_002dformat_0040r_007b-flag_007d-73"></a><dt><code>no-elisp-format</code><dd><a name="index-no_002delisp_002dformat_0040r_007b-flag_007d-74"></a>Likewise for Emacs Lisp, see <a href="#elisp_002dformat">elisp-format</a>.
  1671. <br><dt><code>librep-format</code><dd><a name="index-librep_002dformat_0040r_007b-flag_007d-75"></a><dt><code>no-librep-format</code><dd><a name="index-no_002dlibrep_002dformat_0040r_007b-flag_007d-76"></a>Likewise for librep, see <a href="#librep_002dformat">librep-format</a>.
  1672. <br><dt><code>scheme-format</code><dd><a name="index-scheme_002dformat_0040r_007b-flag_007d-77"></a><dt><code>no-scheme-format</code><dd><a name="index-no_002dscheme_002dformat_0040r_007b-flag_007d-78"></a>Likewise for Scheme, see <a href="#scheme_002dformat">scheme-format</a>.
  1673. <br><dt><code>smalltalk-format</code><dd><a name="index-smalltalk_002dformat_0040r_007b-flag_007d-79"></a><dt><code>no-smalltalk-format</code><dd><a name="index-no_002dsmalltalk_002dformat_0040r_007b-flag_007d-80"></a>Likewise for Smalltalk, see <a href="#smalltalk_002dformat">smalltalk-format</a>.
  1674. <br><dt><code>java-format</code><dd><a name="index-java_002dformat_0040r_007b-flag_007d-81"></a><dt><code>no-java-format</code><dd><a name="index-no_002djava_002dformat_0040r_007b-flag_007d-82"></a>Likewise for Java, see <a href="#java_002dformat">java-format</a>.
  1675. <br><dt><code>csharp-format</code><dd><a name="index-csharp_002dformat_0040r_007b-flag_007d-83"></a><dt><code>no-csharp-format</code><dd><a name="index-no_002dcsharp_002dformat_0040r_007b-flag_007d-84"></a>Likewise for C#, see <a href="#csharp_002dformat">csharp-format</a>.
  1676. <br><dt><code>awk-format</code><dd><a name="index-awk_002dformat_0040r_007b-flag_007d-85"></a><dt><code>no-awk-format</code><dd><a name="index-no_002dawk_002dformat_0040r_007b-flag_007d-86"></a>Likewise for awk, see <a href="#awk_002dformat">awk-format</a>.
  1677. <br><dt><code>object-pascal-format</code><dd><a name="index-object_002dpascal_002dformat_0040r_007b-flag_007d-87"></a><dt><code>no-object-pascal-format</code><dd><a name="index-no_002dobject_002dpascal_002dformat_0040r_007b-flag_007d-88"></a>Likewise for Object Pascal, see <a href="#object_002dpascal_002dformat">object-pascal-format</a>.
  1678. <br><dt><code>ycp-format</code><dd><a name="index-ycp_002dformat_0040r_007b-flag_007d-89"></a><dt><code>no-ycp-format</code><dd><a name="index-no_002dycp_002dformat_0040r_007b-flag_007d-90"></a>Likewise for YCP, see <a href="#ycp_002dformat">ycp-format</a>.
  1679. <br><dt><code>tcl-format</code><dd><a name="index-tcl_002dformat_0040r_007b-flag_007d-91"></a><dt><code>no-tcl-format</code><dd><a name="index-no_002dtcl_002dformat_0040r_007b-flag_007d-92"></a>Likewise for Tcl, see <a href="#tcl_002dformat">tcl-format</a>.
  1680. <br><dt><code>perl-format</code><dd><a name="index-perl_002dformat_0040r_007b-flag_007d-93"></a><dt><code>no-perl-format</code><dd><a name="index-no_002dperl_002dformat_0040r_007b-flag_007d-94"></a>Likewise for Perl, see <a href="#perl_002dformat">perl-format</a>.
  1681. <br><dt><code>perl-brace-format</code><dd><a name="index-perl_002dbrace_002dformat_0040r_007b-flag_007d-95"></a><dt><code>no-perl-brace-format</code><dd><a name="index-no_002dperl_002dbrace_002dformat_0040r_007b-flag_007d-96"></a>Likewise for Perl brace, see <a href="#perl_002dformat">perl-format</a>.
  1682. <br><dt><code>php-format</code><dd><a name="index-php_002dformat_0040r_007b-flag_007d-97"></a><dt><code>no-php-format</code><dd><a name="index-no_002dphp_002dformat_0040r_007b-flag_007d-98"></a>Likewise for PHP, see <a href="#php_002dformat">php-format</a>.
  1683. <br><dt><code>gcc-internal-format</code><dd><a name="index-gcc_002dinternal_002dformat_0040r_007b-flag_007d-99"></a><dt><code>no-gcc-internal-format</code><dd><a name="index-no_002dgcc_002dinternal_002dformat_0040r_007b-flag_007d-100"></a>Likewise for the GCC sources, see <a href="#gcc_002dinternal_002dformat">gcc-internal-format</a>.
  1684. <br><dt><code>gfc-internal-format</code><dd><a name="index-gfc_002dinternal_002dformat_0040r_007b-flag_007d-101"></a><dt><code>no-gfc-internal-format</code><dd><a name="index-no_002dgfc_002dinternal_002dformat_0040r_007b-flag_007d-102"></a>Likewise for the GNU Fortran Compiler sources, see <a href="#gfc_002dinternal_002dformat">gfc-internal-format</a>.
  1685. <br><dt><code>qt-format</code><dd><a name="index-qt_002dformat_0040r_007b-flag_007d-103"></a><dt><code>no-qt-format</code><dd><a name="index-no_002dqt_002dformat_0040r_007b-flag_007d-104"></a>Likewise for Qt, see <a href="#qt_002dformat">qt-format</a>.
  1686. <br><dt><code>qt-plural-format</code><dd><a name="index-qt_002dplural_002dformat_0040r_007b-flag_007d-105"></a><dt><code>no-qt-plural-format</code><dd><a name="index-no_002dqt_002dplural_002dformat_0040r_007b-flag_007d-106"></a>Likewise for Qt plural forms, see <a href="#qt_002dplural_002dformat">qt-plural-format</a>.
  1687. <br><dt><code>kde-format</code><dd><a name="index-kde_002dformat_0040r_007b-flag_007d-107"></a><dt><code>no-kde-format</code><dd><a name="index-no_002dkde_002dformat_0040r_007b-flag_007d-108"></a>Likewise for KDE, see <a href="#kde_002dformat">kde-format</a>.
  1688. <br><dt><code>boost-format</code><dd><a name="index-boost_002dformat_0040r_007b-flag_007d-109"></a><dt><code>no-boost-format</code><dd><a name="index-no_002dboost_002dformat_0040r_007b-flag_007d-110"></a>Likewise for Boost, see <a href="#boost_002dformat">boost-format</a>.
  1689. </dl>
  1690. <p><a name="index-msgctxt-111"></a><a name="index-context_002c-in-PO-files-112"></a>It is also possible to have entries with a context specifier. They look like
  1691. this:
  1692. <pre class="example"> <var>white-space</var>
  1693. # <var>translator-comments</var>
  1694. #. <var>extracted-comments</var>
  1695. #: <var>reference</var>...
  1696. #, <var>flag</var>...
  1697. #| msgctxt <var>previous-context</var>
  1698. #| msgid <var>previous-untranslated-string</var>
  1699. msgctxt <var>context</var>
  1700. msgid <var>untranslated-string</var>
  1701. msgstr <var>translated-string</var>
  1702. </pre>
  1703. <p>The context serves to disambiguate messages with the same
  1704. <var>untranslated-string</var>. It is possible to have several entries with
  1705. the same <var>untranslated-string</var> in a PO file, provided that they each
  1706. have a different <var>context</var>. Note that an empty <var>context</var> string
  1707. and an absent <code>msgctxt</code> line do not mean the same thing.
  1708. <p><a name="index-msgid_005fplural-113"></a><a name="index-plural-forms_002c-in-PO-files-114"></a>A different kind of entries is used for translations which involve
  1709. plural forms.
  1710. <pre class="example"> <var>white-space</var>
  1711. # <var>translator-comments</var>
  1712. #. <var>extracted-comments</var>
  1713. #: <var>reference</var>...
  1714. #, <var>flag</var>...
  1715. #| msgid <var>previous-untranslated-string-singular</var>
  1716. #| msgid_plural <var>previous-untranslated-string-plural</var>
  1717. msgid <var>untranslated-string-singular</var>
  1718. msgid_plural <var>untranslated-string-plural</var>
  1719. msgstr[0] <var>translated-string-case-0</var>
  1720. ...
  1721. msgstr[N] <var>translated-string-case-n</var>
  1722. </pre>
  1723. <p>Such an entry can look like this:
  1724. <pre class="example"> #: src/msgcmp.c:338 src/po-lex.c:699
  1725. #, c-format
  1726. msgid "found %d fatal error"
  1727. msgid_plural "found %d fatal errors"
  1728. msgstr[0] "s'ha trobat %d error fatal"
  1729. msgstr[1] "s'han trobat %d errors fatals"
  1730. </pre>
  1731. <p>Here also, a <code>msgctxt</code> context can be specified before <code>msgid</code>,
  1732. like above.
  1733. <p>Here, additional kinds of flags can be used:
  1734. <dl>
  1735. <dt><code>range:</code><dd><a name="index-range_003a_0040r_007b-flag_007d-115"></a>This flag is followed by a range of non-negative numbers, using the syntax
  1736. <code>range: </code><var>minimum-value</var><code>..</code><var>maximum-value</var>. It designates the
  1737. possible values that the numeric parameter of the message can take. In some
  1738. languages, translators may produce slightly better translations if they know
  1739. that the value can only take on values between 0 and 10, for example.
  1740. </dl>
  1741. <p>The <var>previous-untranslated-string</var> is optionally inserted by the
  1742. <code>msgmerge</code> program, at the same time when it marks a message fuzzy.
  1743. It helps the translator to see which changes were done by the developers
  1744. on the <var>untranslated-string</var>.
  1745. <p>It happens that some lines, usually whitespace or comments, follow the
  1746. very last entry of a PO file. Such lines are not part of any entry,
  1747. and will be dropped when the PO file is processed by the tools, or may
  1748. disturb some PO file editors.
  1749. <p>The remainder of this section may be safely skipped by those using
  1750. a PO file editor, yet it may be interesting for everybody to have a better
  1751. idea of the precise format of a PO file. On the other hand, those
  1752. wishing to modify PO files by hand should carefully continue reading on.
  1753. <p>Each of <var>untranslated-string</var> and <var>translated-string</var> respects
  1754. the C syntax for a character string, including the surrounding quotes
  1755. and embedded backslashed escape sequences. When the time comes
  1756. to write multi-line strings, one should not use escaped newlines.
  1757. Instead, a closing quote should follow the last character on the
  1758. line to be continued, and an opening quote should resume the string
  1759. at the beginning of the following PO file line. For example:
  1760. <pre class="example"> msgid ""
  1761. "Here is an example of how one might continue a very long string\n"
  1762. "for the common case the string represents multi-line output.\n"
  1763. </pre>
  1764. <p class="noindent">In this example, the empty string is used on the first line, to
  1765. allow better alignment of the <code>H</code> from the word &lsquo;<samp><span class="samp">Here</span></samp>&rsquo;
  1766. over the <code>f</code> from the word &lsquo;<samp><span class="samp">for</span></samp>&rsquo;. In this example, the
  1767. <code>msgid</code> keyword is followed by three strings, which are meant
  1768. to be concatenated. Concatenating the empty string does not change
  1769. the resulting overall string, but it is a way for us to comply with
  1770. the necessity of <code>msgid</code> to be followed by a string on the same
  1771. line, while keeping the multi-line presentation left-justified, as
  1772. we find this to be a cleaner disposition. The empty string could have
  1773. been omitted, but only if the string starting with &lsquo;<samp><span class="samp">Here</span></samp>&rsquo; was
  1774. promoted on the first line, right after <code>msgid</code>.<a rel="footnote" href="#fn-2" name="fnd-2"><sup>2</sup></a> It was not really necessary
  1775. either to switch between the two last quoted strings immediately after
  1776. the newline &lsquo;<samp><span class="samp">\n</span></samp>&rsquo;, the switch could have occurred after <em>any</em>
  1777. other character, we just did it this way because it is neater.
  1778. <p><a name="index-newlines-in-PO-files-116"></a>One should carefully distinguish between end of lines marked as
  1779. &lsquo;<samp><span class="samp">\n</span></samp>&rsquo; <em>inside</em> quotes, which are part of the represented
  1780. string, and end of lines in the PO file itself, outside string quotes,
  1781. which have no incidence on the represented string.
  1782. <p><a name="index-comments-in-PO-files-117"></a>Outside strings, white lines and comments may be used freely.
  1783. Comments start at the beginning of a line with &lsquo;<samp><span class="samp">#</span></samp>&rsquo; and extend
  1784. until the end of the PO file line. Comments written by translators
  1785. should have the initial &lsquo;<samp><span class="samp">#</span></samp>&rsquo; immediately followed by some white
  1786. space. If the &lsquo;<samp><span class="samp">#</span></samp>&rsquo; is not immediately followed by white space,
  1787. this comment is most likely generated and managed by specialized GNU
  1788. tools, and might disappear or be replaced unexpectedly when the PO
  1789. file is given to <code>msgmerge</code>.
  1790. <div class="node">
  1791. <a name="Sources"></a>
  1792. <p><hr>
  1793. Next:&nbsp;<a rel="next" accesskey="n" href="#Template">Template</a>,
  1794. Previous:&nbsp;<a rel="previous" accesskey="p" href="#PO-Files">PO Files</a>,
  1795. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  1796. </div>
  1797. <h2 class="chapter">4 Preparing Program Sources</h2>
  1798. <p><a name="index-preparing-programs-for-translation-118"></a>
  1799. <!-- FIXME: Rewrite (the whole chapter). -->
  1800. <p>For the programmer, changes to the C source code fall into three
  1801. categories. First, you have to make the localization functions
  1802. known to all modules needing message translation. Second, you should
  1803. properly trigger the operation of GNU <code>gettext</code> when the program
  1804. initializes, usually from the <code>main</code> function. Last, you should
  1805. identify, adjust and mark all constant strings in your program
  1806. needing translation.
  1807. <ul class="menu">
  1808. <li><a accesskey="1" href="#Importing">Importing</a>: Importing the <code>gettext</code> declaration
  1809. <li><a accesskey="2" href="#Triggering">Triggering</a>: Triggering <code>gettext</code> Operations
  1810. <li><a accesskey="3" href="#Preparing-Strings">Preparing Strings</a>: Preparing Translatable Strings
  1811. <li><a accesskey="4" href="#Mark-Keywords">Mark Keywords</a>: How Marks Appear in Sources
  1812. <li><a accesskey="5" href="#Marking">Marking</a>: Marking Translatable Strings
  1813. <li><a accesskey="6" href="#c_002dformat-Flag">c-format Flag</a>: Telling something about the following string
  1814. <li><a accesskey="7" href="#Special-cases">Special cases</a>: Special Cases of Translatable Strings
  1815. <li><a accesskey="8" href="#Bug-Report-Address">Bug Report Address</a>: Letting Users Report Translation Bugs
  1816. <li><a accesskey="9" href="#Names">Names</a>: Marking Proper Names for Translation
  1817. <li><a href="#Libraries">Libraries</a>: Preparing Library Sources
  1818. </ul>
  1819. <div class="node">
  1820. <a name="Importing"></a>
  1821. <p><hr>
  1822. Next:&nbsp;<a rel="next" accesskey="n" href="#Triggering">Triggering</a>,
  1823. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Sources">Sources</a>,
  1824. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  1825. </div>
  1826. <h3 class="section">4.1 Importing the <code>gettext</code> declaration</h3>
  1827. <p>Presuming that your set of programs, or package, has been adjusted
  1828. so all needed GNU <code>gettext</code> files are available, and your
  1829. <samp><span class="file">Makefile</span></samp> files are adjusted (see <a href="#Maintainers">Maintainers</a>), each C module
  1830. having translated C strings should contain the line:
  1831. <p><a name="index-include-file-_0040file_007blibintl_002eh_007d-119"></a>
  1832. <pre class="example"> #include &lt;libintl.h&gt;
  1833. </pre>
  1834. <p>Similarly, each C module containing <code>printf()</code>/<code>fprintf()</code>/...
  1835. calls with a format string that could be a translated C string (even if
  1836. the C string comes from a different C module) should contain the line:
  1837. <pre class="example"> #include &lt;libintl.h&gt;
  1838. </pre>
  1839. <div class="node">
  1840. <a name="Triggering"></a>
  1841. <p><hr>
  1842. Next:&nbsp;<a rel="next" accesskey="n" href="#Preparing-Strings">Preparing Strings</a>,
  1843. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Importing">Importing</a>,
  1844. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  1845. </div>
  1846. <h3 class="section">4.2 Triggering <code>gettext</code> Operations</h3>
  1847. <p><a name="index-initialization-120"></a>The initialization of locale data should be done with more or less
  1848. the same code in every program, as demonstrated below:
  1849. <pre class="example"> int
  1850. main (int argc, char *argv[])
  1851. {
  1852. ...
  1853. setlocale (LC_ALL, "");
  1854. bindtextdomain (PACKAGE, LOCALEDIR);
  1855. textdomain (PACKAGE);
  1856. ...
  1857. }
  1858. </pre>
  1859. <p><var>PACKAGE</var> and <var>LOCALEDIR</var> should be provided either by
  1860. <samp><span class="file">config.h</span></samp> or by the Makefile. For now consult the <code>gettext</code>
  1861. or <code>hello</code> sources for more information.
  1862. <p><a name="index-locale-category_002c-LC_005fALL-121"></a><a name="index-locale-category_002c-LC_005fCTYPE-122"></a>The use of <code>LC_ALL</code> might not be appropriate for you.
  1863. <code>LC_ALL</code> includes all locale categories and especially
  1864. <code>LC_CTYPE</code>. This latter category is responsible for determining
  1865. character classes with the <code>isalnum</code> etc. functions from
  1866. <samp><span class="file">ctype.h</span></samp> which could especially for programs, which process some
  1867. kind of input language, be wrong. For example this would mean that a
  1868. source code using the &ccedil; (c-cedilla character) is runnable in
  1869. France but not in the U.S.
  1870. <p>Some systems also have problems with parsing numbers using the
  1871. <code>scanf</code> functions if an other but the <code>LC_ALL</code> locale category is
  1872. used. The standards say that additional formats but the one known in the
  1873. <code>"C"</code> locale might be recognized. But some systems seem to reject
  1874. numbers in the <code>"C"</code> locale format. In some situation, it might
  1875. also be a problem with the notation itself which makes it impossible to
  1876. recognize whether the number is in the <code>"C"</code> locale or the local
  1877. format. This can happen if thousands separator characters are used.
  1878. Some locales define this character according to the national
  1879. conventions to <code>'.'</code> which is the same character used in the
  1880. <code>"C"</code> locale to denote the decimal point.
  1881. <p>So it is sometimes necessary to replace the <code>LC_ALL</code> line in the
  1882. code above by a sequence of <code>setlocale</code> lines
  1883. <pre class="example"> {
  1884. ...
  1885. setlocale (LC_CTYPE, "");
  1886. setlocale (LC_MESSAGES, "");
  1887. ...
  1888. }
  1889. </pre>
  1890. <p><a name="index-locale-category_002c-LC_005fCTYPE-123"></a><a name="index-locale-category_002c-LC_005fCOLLATE-124"></a><a name="index-locale-category_002c-LC_005fMONETARY-125"></a><a name="index-locale-category_002c-LC_005fNUMERIC-126"></a><a name="index-locale-category_002c-LC_005fTIME-127"></a><a name="index-locale-category_002c-LC_005fMESSAGES-128"></a><a name="index-locale-category_002c-LC_005fRESPONSES-129"></a>On all POSIX conformant systems the locale categories <code>LC_CTYPE</code>,
  1891. <code>LC_MESSAGES</code>, <code>LC_COLLATE</code>, <code>LC_MONETARY</code>,
  1892. <code>LC_NUMERIC</code>, and <code>LC_TIME</code> are available. On some systems
  1893. which are only ISO C compliant, <code>LC_MESSAGES</code> is missing, but
  1894. a substitute for it is defined in GNU gettext's <code>&lt;libintl.h&gt;</code> and
  1895. in GNU gnulib's <code>&lt;locale.h&gt;</code>.
  1896. <p>Note that changing the <code>LC_CTYPE</code> also affects the functions
  1897. declared in the <code>&lt;ctype.h&gt;</code> standard header and some functions
  1898. declared in the <code>&lt;string.h&gt;</code> and <code>&lt;stdlib.h&gt;</code> standard headers.
  1899. If this is not
  1900. desirable in your application (for example in a compiler's parser),
  1901. you can use a set of substitute functions which hardwire the C locale,
  1902. such as found in the modules &lsquo;<samp><span class="samp">c-ctype</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c-strcase</span></samp>&rsquo;,
  1903. &lsquo;<samp><span class="samp">c-strcasestr</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c-strtod</span></samp>&rsquo;, &lsquo;<samp><span class="samp">c-strtold</span></samp>&rsquo; in the GNU gnulib
  1904. source distribution.
  1905. <p>It is also possible to switch the locale forth and back between the
  1906. environment dependent locale and the C locale, but this approach is
  1907. normally avoided because a <code>setlocale</code> call is expensive,
  1908. because it is tedious to determine the places where a locale switch
  1909. is needed in a large program's source, and because switching a locale
  1910. is not multithread-safe.
  1911. <div class="node">
  1912. <a name="Preparing-Strings"></a>
  1913. <p><hr>
  1914. Next:&nbsp;<a rel="next" accesskey="n" href="#Mark-Keywords">Mark Keywords</a>,
  1915. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Triggering">Triggering</a>,
  1916. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  1917. </div>
  1918. <h3 class="section">4.3 Preparing Translatable Strings</h3>
  1919. <p><a name="index-marking-strings_002c-preparations-130"></a>Before strings can be marked for translations, they sometimes need to
  1920. be adjusted. Usually preparing a string for translation is done right
  1921. before marking it, during the marking phase which is described in the
  1922. next sections. What you have to keep in mind while doing that is the
  1923. following.
  1924. <ul>
  1925. <li>Decent English style.
  1926. <li>Entire sentences.
  1927. <li>Split at paragraphs.
  1928. <li>Use format strings instead of string concatenation.
  1929. <li>Avoid unusual markup and unusual control characters.
  1930. </ul>
  1931. <p class="noindent">Let's look at some examples of these guidelines.
  1932. <p><a name="index-style-131"></a>Translatable strings should be in good English style. If slang language
  1933. with abbreviations and shortcuts is used, often translators will not
  1934. understand the message and will produce very inappropriate translations.
  1935. <pre class="example"> "%s: is parameter\n"
  1936. </pre>
  1937. <p class="noindent">This is nearly untranslatable: Is the displayed item <em>a</em> parameter or
  1938. <em>the</em> parameter?
  1939. <pre class="example"> "No match"
  1940. </pre>
  1941. <p class="noindent">The ambiguity in this message makes it unintelligible: Is the program
  1942. attempting to set something on fire? Does it mean "The given object does
  1943. not match the template"? Does it mean "The template does not fit for any
  1944. of the objects"?
  1945. <p><a name="index-ambiguities-132"></a>In both cases, adding more words to the message will help both the
  1946. translator and the English speaking user.
  1947. <p><a name="index-sentences-133"></a>Translatable strings should be entire sentences. It is often not possible
  1948. to translate single verbs or adjectives in a substitutable way.
  1949. <pre class="example"> printf ("File %s is %s protected", filename, rw ? "write" : "read");
  1950. </pre>
  1951. <p class="noindent">Most translators will not look at the source and will thus only see the
  1952. string <code>"File %s is %s protected"</code>, which is unintelligible. Change
  1953. this to
  1954. <pre class="example"> printf (rw ? "File %s is write protected" : "File %s is read protected",
  1955. filename);
  1956. </pre>
  1957. <p class="noindent">This way the translator will not only understand the message, she will
  1958. also be able to find the appropriate grammatical construction. A French
  1959. translator for example translates "write protected" like "protected
  1960. against writing".
  1961. <p>Entire sentences are also important because in many languages, the
  1962. declination of some word in a sentence depends on the gender or the
  1963. number (singular/plural) of another part of the sentence. There are
  1964. usually more interdependencies between words than in English. The
  1965. consequence is that asking a translator to translate two half-sentences
  1966. and then combining these two half-sentences through dumb string concatenation
  1967. will not work, for many languages, even though it would work for English.
  1968. That's why translators need to handle entire sentences.
  1969. <p>Often sentences don't fit into a single line. If a sentence is output
  1970. using two subsequent <code>printf</code> statements, like this
  1971. <pre class="example"> printf ("Locale charset \"%s\" is different from\n", lcharset);
  1972. printf ("input file charset \"%s\".\n", fcharset);
  1973. </pre>
  1974. <p class="noindent">the translator would have to translate two half sentences, but nothing
  1975. in the POT file would tell her that the two half sentences belong together.
  1976. It is necessary to merge the two <code>printf</code> statements so that the
  1977. translator can handle the entire sentence at once and decide at which
  1978. place to insert a line break in the translation (if at all):
  1979. <pre class="example"> printf ("Locale charset \"%s\" is different from\n\
  1980. input file charset \"%s\".\n", lcharset, fcharset);
  1981. </pre>
  1982. <p>You may now ask: how about two or more adjacent sentences? Like in this case:
  1983. <pre class="example"> puts ("Apollo 13 scenario: Stack overflow handling failed.");
  1984. puts ("On the next stack overflow we will crash!!!");
  1985. </pre>
  1986. <p class="noindent">Should these two statements merged into a single one? I would recommend to
  1987. merge them if the two sentences are related to each other, because then it
  1988. makes it easier for the translator to understand and translate both. On
  1989. the other hand, if one of the two messages is a stereotypic one, occurring
  1990. in other places as well, you will do a favour to the translator by not
  1991. merging the two. (Identical messages occurring in several places are
  1992. combined by xgettext, so the translator has to handle them once only.)
  1993. <p><a name="index-paragraphs-134"></a>Translatable strings should be limited to one paragraph; don't let a
  1994. single message be longer than ten lines. The reason is that when the
  1995. translatable string changes, the translator is faced with the task of
  1996. updating the entire translated string. Maybe only a single word will
  1997. have changed in the English string, but the translator doesn't see that
  1998. (with the current translation tools), therefore she has to proofread
  1999. the entire message.
  2000. <p><a name="index-help-option-135"></a>Many GNU programs have a &lsquo;<samp><span class="samp">--help</span></samp>&rsquo; output that extends over several
  2001. screen pages. It is a courtesy towards the translators to split such a
  2002. message into several ones of five to ten lines each. While doing that,
  2003. you can also attempt to split the documented options into groups,
  2004. such as the input options, the output options, and the informative
  2005. output options. This will help every user to find the option he is
  2006. looking for.
  2007. <p><a name="index-string-concatenation-136"></a><a name="index-concatenation-of-strings-137"></a>Hardcoded string concatenation is sometimes used to construct English
  2008. strings:
  2009. <pre class="example"> strcpy (s, "Replace ");
  2010. strcat (s, object1);
  2011. strcat (s, " with ");
  2012. strcat (s, object2);
  2013. strcat (s, "?");
  2014. </pre>
  2015. <p class="noindent">In order to present to the translator only entire sentences, and also
  2016. because in some languages the translator might want to swap the order
  2017. of <code>object1</code> and <code>object2</code>, it is necessary to change this
  2018. to use a format string:
  2019. <pre class="example"> sprintf (s, "Replace %s with %s?", object1, object2);
  2020. </pre>
  2021. <p><a name="index-g_t_0040code_007binttypes_002eh_007d-138"></a>A similar case is compile time concatenation of strings. The ISO C 99
  2022. include file <code>&lt;inttypes.h&gt;</code> contains a macro <code>PRId64</code> that
  2023. can be used as a formatting directive for outputting an &lsquo;<samp><span class="samp">int64_t</span></samp>&rsquo;
  2024. integer through <code>printf</code>. It expands to a constant string, usually
  2025. "d" or "ld" or "lld" or something like this, depending on the platform.
  2026. Assume you have code like
  2027. <pre class="example"> printf ("The amount is %0" PRId64 "\n", number);
  2028. </pre>
  2029. <p class="noindent">The <code>gettext</code> tools and library have special support for these
  2030. <code>&lt;inttypes.h&gt;</code> macros. You can therefore simply write
  2031. <pre class="example"> printf (gettext ("The amount is %0" PRId64 "\n"), number);
  2032. </pre>
  2033. <p class="noindent">The PO file will contain the string "The amount is %0&lt;PRId64&gt;\n".
  2034. The translators will provide a translation containing "%0&lt;PRId64&gt;"
  2035. as well, and at runtime the <code>gettext</code> function's result will
  2036. contain the appropriate constant string, "d" or "ld" or "lld".
  2037. <p>This works only for the predefined <code>&lt;inttypes.h&gt;</code> macros. If
  2038. you have defined your own similar macros, let's say &lsquo;<samp><span class="samp">MYPRId64</span></samp>&rsquo;,
  2039. that are not known to <code>xgettext</code>, the solution for this problem
  2040. is to change the code like this:
  2041. <pre class="example"> char buf1[100];
  2042. sprintf (buf1, "%0" MYPRId64, number);
  2043. printf (gettext ("The amount is %s\n"), buf1);
  2044. </pre>
  2045. <p>This means, you put the platform dependent code in one statement, and the
  2046. internationalization code in a different statement. Note that a buffer length
  2047. of 100 is safe, because all available hardware integer types are limited to
  2048. 128 bits, and to print a 128 bit integer one needs at most 54 characters,
  2049. regardless whether in decimal, octal or hexadecimal.
  2050. <p><a name="index-Java_002c-string-concatenation-139"></a><a name="index-C_0023_002c-string-concatenation-140"></a>All this applies to other programming languages as well. For example, in
  2051. Java and C#, string concatenation is very frequently used, because it is a
  2052. compiler built-in operator. Like in C, in Java, you would change
  2053. <pre class="example"> System.out.println("Replace "+object1+" with "+object2+"?");
  2054. </pre>
  2055. <p class="noindent">into a statement involving a format string:
  2056. <pre class="example"> System.out.println(
  2057. MessageFormat.format("Replace {0} with {1}?",
  2058. new Object[] { object1, object2 }));
  2059. </pre>
  2060. <p class="noindent">Similarly, in C#, you would change
  2061. <pre class="example"> Console.WriteLine("Replace "+object1+" with "+object2+"?");
  2062. </pre>
  2063. <p class="noindent">into a statement involving a format string:
  2064. <pre class="example"> Console.WriteLine(
  2065. String.Format("Replace {0} with {1}?", object1, object2));
  2066. </pre>
  2067. <p><a name="index-markup-141"></a><a name="index-control-characters-142"></a>Unusual markup or control characters should not be used in translatable
  2068. strings. Translators will likely not understand the particular meaning
  2069. of the markup or control characters.
  2070. <p>For example, if you have a convention that &lsquo;<samp><span class="samp">|</span></samp>&rsquo; delimits the
  2071. left-hand and right-hand part of some GUI elements, translators will
  2072. often not understand it without specific comments. It might be
  2073. better to have the translator translate the left-hand and right-hand
  2074. part separately.
  2075. <p>Another example is the &lsquo;<samp><span class="samp">argp</span></samp>&rsquo; convention to use a single &lsquo;<samp><span class="samp">\v</span></samp>&rsquo;
  2076. (vertical tab) control character to delimit two sections inside a
  2077. string. This is flawed. Some translators may convert it to a simple
  2078. newline, some to blank lines. With some PO file editors it may not be
  2079. easy to even enter a vertical tab control character. So, you cannot
  2080. be sure that the translation will contain a &lsquo;<samp><span class="samp">\v</span></samp>&rsquo; character, at the
  2081. corresponding position. The solution is, again, to let the translator
  2082. translate two separate strings and combine at run-time the two translated
  2083. strings with the &lsquo;<samp><span class="samp">\v</span></samp>&rsquo; required by the convention.
  2084. <p>HTML markup, however, is common enough that it's probably ok to use in
  2085. translatable strings. But please bear in mind that the GNU gettext tools
  2086. don't verify that the translations are well-formed HTML.
  2087. <div class="node">
  2088. <a name="Mark-Keywords"></a>
  2089. <p><hr>
  2090. Next:&nbsp;<a rel="next" accesskey="n" href="#Marking">Marking</a>,
  2091. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Preparing-Strings">Preparing Strings</a>,
  2092. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2093. </div>
  2094. <h3 class="section">4.4 How Marks Appear in Sources</h3>
  2095. <p><a name="index-marking-strings-that-require-translation-143"></a>
  2096. All strings requiring translation should be marked in the C sources. Marking
  2097. is done in such a way that each translatable string appears to be
  2098. the sole argument of some function or preprocessor macro. There are
  2099. only a few such possible functions or macros meant for translation,
  2100. and their names are said to be marking keywords. The marking is
  2101. attached to strings themselves, rather than to what we do with them.
  2102. This approach has more uses. A blatant example is an error message
  2103. produced by formatting. The format string needs translation, as
  2104. well as some strings inserted through some &lsquo;<samp><span class="samp">%s</span></samp>&rsquo; specification
  2105. in the format, while the result from <code>sprintf</code> may have so many
  2106. different instances that it is impractical to list them all in some
  2107. &lsquo;<samp><span class="samp">error_string_out()</span></samp>&rsquo; routine, say.
  2108. <p>This marking operation has two goals. The first goal of marking
  2109. is for triggering the retrieval of the translation, at run time.
  2110. The keyword is possibly resolved into a routine able to dynamically
  2111. return the proper translation, as far as possible or wanted, for the
  2112. argument string. Most localizable strings are found in executable
  2113. positions, that is, attached to variables or given as parameters to
  2114. functions. But this is not universal usage, and some translatable
  2115. strings appear in structured initializations. See <a href="#Special-cases">Special cases</a>.
  2116. <p>The second goal of the marking operation is to help <code>xgettext</code>
  2117. at properly extracting all translatable strings when it scans a set
  2118. of program sources and produces PO file templates.
  2119. <p>The canonical keyword for marking translatable strings is
  2120. &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo;, it gave its name to the whole GNU <code>gettext</code>
  2121. package. For packages making only light use of the &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo;
  2122. keyword, macro or function, it is easily used <em>as is</em>. However,
  2123. for packages using the <code>gettext</code> interface more heavily, it
  2124. is usually more convenient to give the main keyword a shorter, less
  2125. obtrusive name. Indeed, the keyword might appear on a lot of strings
  2126. all over the package, and programmers usually do not want nor need
  2127. their program sources to remind them forcefully, all the time, that they
  2128. are internationalized. Further, a long keyword has the disadvantage
  2129. of using more horizontal space, forcing more indentation work on
  2130. sources for those trying to keep them within 79 or 80 columns.
  2131. <p><a name="index-g_t_0040code_007b_005f_007d_002c-a-macro-to-mark-strings-for-translation-144"></a>Many packages use &lsquo;<samp><span class="samp">_</span></samp>&rsquo; (a simple underline) as a keyword,
  2132. and write &lsquo;<samp><span class="samp">_("Translatable string")</span></samp>&rsquo; instead of &lsquo;<samp><span class="samp">gettext
  2133. ("Translatable string")</span></samp>&rsquo;. Further, the coding rule, from GNU standards,
  2134. wanting that there is a space between the keyword and the opening
  2135. parenthesis is relaxed, in practice, for this particular usage.
  2136. So, the textual overhead per translatable string is reduced to
  2137. only three characters: the underline and the two parentheses.
  2138. However, even if GNU <code>gettext</code> uses this convention internally,
  2139. it does not offer it officially. The real, genuine keyword is truly
  2140. &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; indeed. It is fairly easy for those wanting to use
  2141. &lsquo;<samp><span class="samp">_</span></samp>&rsquo; instead of &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; to declare:
  2142. <pre class="example"> #include &lt;libintl.h&gt;
  2143. #define _(String) gettext (String)
  2144. </pre>
  2145. <p class="noindent">instead of merely using &lsquo;<samp><span class="samp">#include &lt;libintl.h&gt;</span></samp>&rsquo;.
  2146. <p>The marking keywords &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; and &lsquo;<samp><span class="samp">_</span></samp>&rsquo; take the translatable
  2147. string as sole argument. It is also possible to define marking functions
  2148. that take it at another argument position. It is even possible to make
  2149. the marked argument position depend on the total number of arguments of
  2150. the function call; this is useful in C++. All this is achieved using
  2151. <code>xgettext</code>'s &lsquo;<samp><span class="samp">--keyword</span></samp>&rsquo; option. How to pass such an option
  2152. to <code>xgettext</code>, assuming that <code>gettextize</code> is used, is described
  2153. in <a href="#po_002fMakevars">po/Makevars</a> and <a href="#AM_005fXGETTEXT_005fOPTION">AM_XGETTEXT_OPTION</a>.
  2154. <p>Note also that long strings can be split across lines, into multiple
  2155. adjacent string tokens. Automatic string concatenation is performed
  2156. at compile time according to ISO C and ISO C++; <code>xgettext</code> also
  2157. supports this syntax.
  2158. <p>Later on, the maintenance is relatively easy. If, as a programmer,
  2159. you add or modify a string, you will have to ask yourself if the
  2160. new or altered string requires translation, and include it within
  2161. &lsquo;<samp><span class="samp">_()</span></samp>&rsquo; if you think it should be translated. For example, &lsquo;<samp><span class="samp">"%s"</span></samp>&rsquo;
  2162. is an example of string <em>not</em> requiring translation. But
  2163. &lsquo;<samp><span class="samp">"%s: %d"</span></samp>&rsquo; <em>does</em> require translation, because in French, unlike
  2164. in English, it's customary to put a space before a colon.
  2165. <div class="node">
  2166. <a name="Marking"></a>
  2167. <p><hr>
  2168. Next:&nbsp;<a rel="next" accesskey="n" href="#c_002dformat-Flag">c-format Flag</a>,
  2169. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Mark-Keywords">Mark Keywords</a>,
  2170. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2171. </div>
  2172. <h3 class="section">4.5 Marking Translatable Strings</h3>
  2173. <p><a name="index-marking-strings-for-translation-145"></a>
  2174. In PO mode, one set of features is meant more for the programmer than
  2175. for the translator, and allows him to interactively mark which strings,
  2176. in a set of program sources, are translatable, and which are not.
  2177. Even if it is a fairly easy job for a programmer to find and mark
  2178. such strings by other means, using any editor of his choice, PO mode
  2179. makes this work more comfortable. Further, this gives translators
  2180. who feel a little like programmers, or programmers who feel a little
  2181. like translators, a tool letting them work at marking translatable
  2182. strings in the program sources, while simultaneously producing a set of
  2183. translation in some language, for the package being internationalized.
  2184. <p><a name="index-g_t_0040code_007betags_007d_002c-using-for-marking-strings-146"></a>The set of program sources, targeted by the PO mode commands describe
  2185. here, should have an Emacs tags table constructed for your project,
  2186. prior to using these PO file commands. This is easy to do. In any
  2187. shell window, change the directory to the root of your project, then
  2188. execute a command resembling:
  2189. <pre class="example"> etags src/*.[hc] lib/*.[hc]
  2190. </pre>
  2191. <p class="noindent">presuming here you want to process all <samp><span class="file">.h</span></samp> and <samp><span class="file">.c</span></samp> files
  2192. from the <samp><span class="file">src/</span></samp> and <samp><span class="file">lib/</span></samp> directories. This command will
  2193. explore all said files and create a <samp><span class="file">TAGS</span></samp> file in your root
  2194. directory, somewhat summarizing the contents using a special file
  2195. format Emacs can understand.
  2196. <p><a name="index-g_t_0040file_007bTAGS_007d_002c-and-marking-translatable-strings-147"></a>For packages following the GNU coding standards, there is
  2197. a make goal <code>tags</code> or <code>TAGS</code> which constructs the tag files in
  2198. all directories and for all files containing source code.
  2199. <p>Once your <samp><span class="file">TAGS</span></samp> file is ready, the following commands assist
  2200. the programmer at marking translatable strings in his set of sources.
  2201. But these commands are necessarily driven from within a PO file
  2202. window, and it is likely that you do not even have such a PO file yet.
  2203. This is not a problem at all, as you may safely open a new, empty PO
  2204. file, mainly for using these commands. This empty PO file will slowly
  2205. fill in while you mark strings as translatable in your program sources.
  2206. <dl>
  2207. <dt><kbd>,</kbd><dd><a name="index-g_t_002c_0040r_007b_002c-PO-Mode-command_007d-148"></a>Search through program sources for a string which looks like a
  2208. candidate for translation (<code>po-tags-search</code>).
  2209. <br><dt><kbd>M-,</kbd><dd><a name="index-M_002d_002c_0040r_007b_002c-PO-Mode-command_007d-149"></a>Mark the last string found with &lsquo;<samp><span class="samp">_()</span></samp>&rsquo; (<code>po-mark-translatable</code>).
  2210. <br><dt><kbd>M-.</kbd><dd><a name="index-M_002d_002e_0040r_007b_002c-PO-Mode-command_007d-150"></a>Mark the last string found with a keyword taken from a set of possible
  2211. keywords. This command with a prefix allows some management of these
  2212. keywords (<code>po-select-mark-and-mark</code>).
  2213. </dl>
  2214. <p><a name="index-po_002dtags_002dsearch_0040r_007b_002c-PO-Mode-command_007d-151"></a>The <kbd>,</kbd> (<code>po-tags-search</code>) command searches for the next
  2215. occurrence of a string which looks like a possible candidate for
  2216. translation, and displays the program source in another Emacs window,
  2217. positioned in such a way that the string is near the top of this other
  2218. window. If the string is too big to fit whole in this window, it is
  2219. positioned so only its end is shown. In any case, the cursor
  2220. is left in the PO file window. If the shown string would be better
  2221. presented differently in different native languages, you may mark it
  2222. using <kbd>M-,</kbd> or <kbd>M-.</kbd>. Otherwise, you might rather ignore it
  2223. and skip to the next string by merely repeating the <kbd>,</kbd> command.
  2224. <p>A string is a good candidate for translation if it contains a sequence
  2225. of three or more letters. A string containing at most two letters in
  2226. a row will be considered as a candidate if it has more letters than
  2227. non-letters. The command disregards strings containing no letters,
  2228. or isolated letters only. It also disregards strings within comments,
  2229. or strings already marked with some keyword PO mode knows (see below).
  2230. <p>If you have never told Emacs about some <samp><span class="file">TAGS</span></samp> file to use, the
  2231. command will request that you specify one from the minibuffer, the
  2232. first time you use the command. You may later change your <samp><span class="file">TAGS</span></samp>
  2233. file by using the regular Emacs command <kbd>M-x&nbsp;visit-tags-table</kbd><!-- /@w -->,
  2234. which will ask you to name the precise <samp><span class="file">TAGS</span></samp> file you want
  2235. to use. See <a href="emacs.html#Tags">Tag Tables</a>.
  2236. <p>Each time you use the <kbd>,</kbd> command, the search resumes from where it was
  2237. left by the previous search, and goes through all program sources,
  2238. obeying the <samp><span class="file">TAGS</span></samp> file, until all sources have been processed.
  2239. However, by giving a prefix argument to the command (<kbd>C-u&nbsp;,</kbd>)<!-- /@w -->, you may request that the search be restarted all over again
  2240. from the first program source; but in this case, strings that you
  2241. recently marked as translatable will be automatically skipped.
  2242. <p>Using this <kbd>,</kbd> command does not prevent using of other regular
  2243. Emacs tags commands. For example, regular <code>tags-search</code> or
  2244. <code>tags-query-replace</code> commands may be used without disrupting the
  2245. independent <kbd>,</kbd> search sequence. However, as implemented, the
  2246. <em>initial</em> <kbd>,</kbd> command (or the <kbd>,</kbd> command is used with a
  2247. prefix) might also reinitialize the regular Emacs tags searching to the
  2248. first tags file, this reinitialization might be considered spurious.
  2249. <p><a name="index-po_002dmark_002dtranslatable_0040r_007b_002c-PO-Mode-command_007d-152"></a><a name="index-po_002dselect_002dmark_002dand_002dmark_0040r_007b_002c-PO-Mode-command_007d-153"></a>The <kbd>M-,</kbd> (<code>po-mark-translatable</code>) command will mark the
  2250. recently found string with the &lsquo;<samp><span class="samp">_</span></samp>&rsquo; keyword. The <kbd>M-.</kbd>
  2251. (<code>po-select-mark-and-mark</code>) command will request that you type
  2252. one keyword from the minibuffer and use that keyword for marking
  2253. the string. Both commands will automatically create a new PO file
  2254. untranslated entry for the string being marked, and make it the
  2255. current entry (making it easy for you to immediately proceed to its
  2256. translation, if you feel like doing it right away). It is possible
  2257. that the modifications made to the program source by <kbd>M-,</kbd> or
  2258. <kbd>M-.</kbd> render some source line longer than 80 columns, forcing you
  2259. to break and re-indent this line differently. You may use the <kbd>O</kbd>
  2260. command from PO mode, or any other window changing command from
  2261. Emacs, to break out into the program source window, and do any
  2262. needed adjustments. You will have to use some regular Emacs command
  2263. to return the cursor to the PO file window, if you want command
  2264. <kbd>,</kbd> for the next string, say.
  2265. <p>The <kbd>M-.</kbd> command has a few built-in speedups, so you do not
  2266. have to explicitly type all keywords all the time. The first such
  2267. speedup is that you are presented with a <em>preferred</em> keyword,
  2268. which you may accept by merely typing <kbd>&lt;RET&gt;</kbd> at the prompt.
  2269. The second speedup is that you may type any non-ambiguous prefix of the
  2270. keyword you really mean, and the command will complete it automatically
  2271. for you. This also means that PO mode has to <em>know</em> all
  2272. your possible keywords, and that it will not accept mistyped keywords.
  2273. <p>If you reply <kbd>?</kbd> to the keyword request, the command gives a
  2274. list of all known keywords, from which you may choose. When the
  2275. command is prefixed by an argument (<kbd>C-u&nbsp;M-.</kbd>)<!-- /@w -->, it inhibits
  2276. updating any program source or PO file buffer, and does some simple
  2277. keyword management instead. In this case, the command asks for a
  2278. keyword, written in full, which becomes a new allowed keyword for
  2279. later <kbd>M-.</kbd> commands. Moreover, this new keyword automatically
  2280. becomes the <em>preferred</em> keyword for later commands. By typing
  2281. an already known keyword in response to <kbd>C-u&nbsp;M-.</kbd><!-- /@w -->, one merely
  2282. changes the <em>preferred</em> keyword and does nothing more.
  2283. <p>All keywords known for <kbd>M-.</kbd> are recognized by the <kbd>,</kbd> command
  2284. when scanning for strings, and strings already marked by any of those
  2285. known keywords are automatically skipped. If many PO files are opened
  2286. simultaneously, each one has its own independent set of known keywords.
  2287. There is no provision in PO mode, currently, for deleting a known
  2288. keyword, you have to quit the file (maybe using <kbd>q</kbd>) and reopen
  2289. it afresh. When a PO file is newly brought up in an Emacs window, only
  2290. &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; and &lsquo;<samp><span class="samp">_</span></samp>&rsquo; are known as keywords, and &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo;
  2291. is preferred for the <kbd>M-.</kbd> command. In fact, this is not useful to
  2292. prefer &lsquo;<samp><span class="samp">_</span></samp>&rsquo;, as this one is already built in the <kbd>M-,</kbd> command.
  2293. <div class="node">
  2294. <a name="c-format-Flag"></a>
  2295. <a name="c_002dformat-Flag"></a>
  2296. <p><hr>
  2297. Next:&nbsp;<a rel="next" accesskey="n" href="#Special-cases">Special cases</a>,
  2298. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Marking">Marking</a>,
  2299. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2300. </div>
  2301. <h3 class="section">4.6 Special Comments preceding Keywords</h3>
  2302. <!-- FIXME document c-format and no-c-format. -->
  2303. <p><a name="index-format-strings-154"></a>In C programs strings are often used within calls of functions from the
  2304. <code>printf</code> family. The special thing about these format strings is
  2305. that they can contain format specifiers introduced with <kbd>%</kbd>. Assume
  2306. we have the code
  2307. <pre class="example"> printf (gettext ("String `%s' has %d characters\n"), s, strlen (s));
  2308. </pre>
  2309. <p class="noindent">A possible German translation for the above string might be:
  2310. <pre class="example"> "%d Zeichen lang ist die Zeichenkette `%s'"
  2311. </pre>
  2312. <p>A C programmer, even if he cannot speak German, will recognize that
  2313. there is something wrong here. The order of the two format specifiers
  2314. is changed but of course the arguments in the <code>printf</code> don't have.
  2315. This will most probably lead to problems because now the length of the
  2316. string is regarded as the address.
  2317. <p>To prevent errors at runtime caused by translations the <code>msgfmt</code>
  2318. tool can check statically whether the arguments in the original and the
  2319. translation string match in type and number. If this is not the case
  2320. and the &lsquo;<samp><span class="samp">-c</span></samp>&rsquo; option has been passed to <code>msgfmt</code>, <code>msgfmt</code>
  2321. will give an error and refuse to produce a MO file. Thus consequent
  2322. use of &lsquo;<samp><span class="samp">msgfmt -c</span></samp>&rsquo; will catch the error, so that it cannot cause
  2323. cause problems at runtime.
  2324. <p class="noindent">If the word order in the above German translation would be correct one
  2325. would have to write
  2326. <pre class="example"> "%2$d Zeichen lang ist die Zeichenkette `%1$s'"
  2327. </pre>
  2328. <p class="noindent">The routines in <code>msgfmt</code> know about this special notation.
  2329. <p>Because not all strings in a program must be format strings it is not
  2330. useful for <code>msgfmt</code> to test all the strings in the <samp><span class="file">.po</span></samp> file.
  2331. This might cause problems because the string might contain what looks
  2332. like a format specifier, but the string is not used in <code>printf</code>.
  2333. <p>Therefore the <code>xgettext</code> adds a special tag to those messages it
  2334. thinks might be a format string. There is no absolute rule for this,
  2335. only a heuristic. In the <samp><span class="file">.po</span></samp> file the entry is marked using the
  2336. <code>c-format</code> flag in the <code>#,</code> comment line (see <a href="#PO-Files">PO Files</a>).
  2337. <p><a name="index-c_002dformat_0040r_007b_002c-and-_0040code_007bxgettext_007d_007d-155"></a><a name="index-no_002dc_002dformat_0040r_007b_002c-and-_0040code_007bxgettext_007d_007d-156"></a>The careful reader now might say that this again can cause problems.
  2338. The heuristic might guess it wrong. This is true and therefore
  2339. <code>xgettext</code> knows about a special kind of comment which lets
  2340. the programmer take over the decision. If in the same line as or
  2341. the immediately preceding line to the <code>gettext</code> keyword
  2342. the <code>xgettext</code> program finds a comment containing the words
  2343. <code>xgettext:c-format</code>, it will mark the string in any case with
  2344. the <code>c-format</code> flag. This kind of comment should be used when
  2345. <code>xgettext</code> does not recognize the string as a format string but
  2346. it really is one and it should be tested. Please note that when the
  2347. comment is in the same line as the <code>gettext</code> keyword, it must be
  2348. before the string to be translated.
  2349. <p>This situation happens quite often. The <code>printf</code> function is often
  2350. called with strings which do not contain a format specifier. Of course
  2351. one would normally use <code>fputs</code> but it does happen. In this case
  2352. <code>xgettext</code> does not recognize this as a format string but what
  2353. happens if the translation introduces a valid format specifier? The
  2354. <code>printf</code> function will try to access one of the parameters but none
  2355. exists because the original code does not pass any parameters.
  2356. <p><code>xgettext</code> of course could make a wrong decision the other way
  2357. round, i.e. a string marked as a format string actually is not a format
  2358. string. In this case the <code>msgfmt</code> might give too many warnings and
  2359. would prevent translating the <samp><span class="file">.po</span></samp> file. The method to prevent
  2360. this wrong decision is similar to the one used above, only the comment
  2361. to use must contain the string <code>xgettext:no-c-format</code>.
  2362. <p>If a string is marked with <code>c-format</code> and this is not correct the
  2363. user can find out who is responsible for the decision. See
  2364. <a href="#xgettext-Invocation">xgettext Invocation</a> to see how the <code>--debug</code> option can be
  2365. used for solving this problem.
  2366. <div class="node">
  2367. <a name="Special-cases"></a>
  2368. <p><hr>
  2369. Next:&nbsp;<a rel="next" accesskey="n" href="#Bug-Report-Address">Bug Report Address</a>,
  2370. Previous:&nbsp;<a rel="previous" accesskey="p" href="#c_002dformat-Flag">c-format Flag</a>,
  2371. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2372. </div>
  2373. <h3 class="section">4.7 Special Cases of Translatable Strings</h3>
  2374. <p><a name="index-marking-string-initializers-157"></a>The attentive reader might now point out that it is not always possible
  2375. to mark translatable string with <code>gettext</code> or something like this.
  2376. Consider the following case:
  2377. <pre class="example"> {
  2378. static const char *messages[] = {
  2379. "some very meaningful message",
  2380. "and another one"
  2381. };
  2382. const char *string;
  2383. ...
  2384. string
  2385. = index &gt; 1 ? "a default message" : messages[index];
  2386. fputs (string);
  2387. ...
  2388. }
  2389. </pre>
  2390. <p>While it is no problem to mark the string <code>"a default message"</code> it
  2391. is not possible to mark the string initializers for <code>messages</code>.
  2392. What is to be done? We have to fulfill two tasks. First we have to mark the
  2393. strings so that the <code>xgettext</code> program (see <a href="#xgettext-Invocation">xgettext Invocation</a>)
  2394. can find them, and second we have to translate the string at runtime
  2395. before printing them.
  2396. <p>The first task can be fulfilled by creating a new keyword, which names a
  2397. no-op. For the second we have to mark all access points to a string
  2398. from the array. So one solution can look like this:
  2399. <pre class="example"> #define gettext_noop(String) String
  2400. {
  2401. static const char *messages[] = {
  2402. gettext_noop ("some very meaningful message"),
  2403. gettext_noop ("and another one")
  2404. };
  2405. const char *string;
  2406. ...
  2407. string
  2408. = index &gt; 1 ? gettext ("a default message") : gettext (messages[index]);
  2409. fputs (string);
  2410. ...
  2411. }
  2412. </pre>
  2413. <p>Please convince yourself that the string which is written by
  2414. <code>fputs</code> is translated in any case. How to get <code>xgettext</code> know
  2415. the additional keyword <code>gettext_noop</code> is explained in <a href="#xgettext-Invocation">xgettext Invocation</a>.
  2416. <p>The above is of course not the only solution. You could also come along
  2417. with the following one:
  2418. <pre class="example"> #define gettext_noop(String) String
  2419. {
  2420. static const char *messages[] = {
  2421. gettext_noop ("some very meaningful message",
  2422. gettext_noop ("and another one")
  2423. };
  2424. const char *string;
  2425. ...
  2426. string
  2427. = index &gt; 1 ? gettext_noop ("a default message") : messages[index];
  2428. fputs (gettext (string));
  2429. ...
  2430. }
  2431. </pre>
  2432. <p>But this has a drawback. The programmer has to take care that
  2433. he uses <code>gettext_noop</code> for the string <code>"a default message"</code>.
  2434. A use of <code>gettext</code> could have in rare cases unpredictable results.
  2435. <p>One advantage is that you need not make control flow analysis to make
  2436. sure the output is really translated in any case. But this analysis is
  2437. generally not very difficult. If it should be in any situation you can
  2438. use this second method in this situation.
  2439. <div class="node">
  2440. <a name="Bug-Report-Address"></a>
  2441. <p><hr>
  2442. Next:&nbsp;<a rel="next" accesskey="n" href="#Names">Names</a>,
  2443. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Special-cases">Special cases</a>,
  2444. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2445. </div>
  2446. <h3 class="section">4.8 Letting Users Report Translation Bugs</h3>
  2447. <p>Code sometimes has bugs, but translations sometimes have bugs too. The
  2448. users need to be able to report them. Reporting translation bugs to the
  2449. programmer or maintainer of a package is not very useful, since the
  2450. maintainer must never change a translation, except on behalf of the
  2451. translator. Hence the translation bugs must be reported to the
  2452. translators.
  2453. <p>Here is a way to organize this so that the maintainer does not need to
  2454. forward translation bug reports, nor even keep a list of the addresses of
  2455. the translators or their translation teams.
  2456. <p>Every program has a place where is shows the bug report address. For
  2457. GNU programs, it is the code which handles the &ldquo;&ndash;help&rdquo; option,
  2458. typically in a function called &ldquo;usage&rdquo;. In this place, instruct the
  2459. translator to add her own bug reporting address. For example, if that
  2460. code has a statement
  2461. <pre class="example"> printf (_("Report bugs to &lt;%s&gt;.\n"), PACKAGE_BUGREPORT);
  2462. </pre>
  2463. <p>you can add some translator instructions like this:
  2464. <pre class="example"> /* TRANSLATORS: The placeholder indicates the bug-reporting address
  2465. for this package. Please add _another line_ saying
  2466. "Report translation bugs to &lt;...&gt;\n" with the address for translation
  2467. bugs (typically your translation team's web or email address). */
  2468. printf (_("Report bugs to &lt;%s&gt;.\n"), PACKAGE_BUGREPORT);
  2469. </pre>
  2470. <p>These will be extracted by &lsquo;<samp><span class="samp">xgettext</span></samp>&rsquo;, leading to a .pot file that
  2471. contains this:
  2472. <pre class="example"> #. TRANSLATORS: The placeholder indicates the bug-reporting address
  2473. #. for this package. Please add _another line_ saying
  2474. #. "Report translation bugs to &lt;...&gt;\n" with the address for translation
  2475. #. bugs (typically your translation team's web or email address).
  2476. #: src/hello.c:178
  2477. #, c-format
  2478. msgid "Report bugs to &lt;%s&gt;.\n"
  2479. msgstr ""
  2480. </pre>
  2481. <div class="node">
  2482. <a name="Names"></a>
  2483. <p><hr>
  2484. Next:&nbsp;<a rel="next" accesskey="n" href="#Libraries">Libraries</a>,
  2485. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Bug-Report-Address">Bug Report Address</a>,
  2486. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2487. </div>
  2488. <h3 class="section">4.9 Marking Proper Names for Translation</h3>
  2489. <p>Should names of persons, cities, locations etc. be marked for translation
  2490. or not? People who only know languages that can be written with Latin
  2491. letters (English, Spanish, French, German, etc.) are tempted to say &ldquo;no&rdquo;,
  2492. because names usually do not change when transported between these languages.
  2493. However, in general when translating from one script to another, names
  2494. are translated too, usually phonetically or by transliteration. For
  2495. example, Russian or Greek names are converted to the Latin alphabet when
  2496. being translated to English, and English or French names are converted
  2497. to the Katakana script when being translated to Japanese. This is
  2498. necessary because the speakers of the target language in general cannot
  2499. read the script the name is originally written in.
  2500. <p>As a programmer, you should therefore make sure that names are marked
  2501. for translation, with a special comment telling the translators that it
  2502. is a proper name and how to pronounce it. In its simple form, it looks
  2503. like this:
  2504. <pre class="example"> printf (_("Written by %s.\n"),
  2505. /* TRANSLATORS: This is a proper name. See the gettext
  2506. manual, section Names. Note this is actually a non-ASCII
  2507. name: The first name is (with Unicode escapes)
  2508. "Fran\u00e7ois" or (with HTML entities) "Fran&amp;ccedil;ois".
  2509. Pronunciation is like "fraa-swa pee-nar". */
  2510. _("Francois Pinard"));
  2511. </pre>
  2512. <p class="noindent">The GNU gnulib library offers a module &lsquo;<samp><span class="samp">propername</span></samp>&rsquo;
  2513. (<a href="http://www.gnu.org/software/gnulib/MODULES.html#module=propername">http://www.gnu.org/software/gnulib/MODULES.html#module=propername</a>)
  2514. which takes care to automatically append the original name, in parentheses,
  2515. to the translated name. For names that cannot be written in ASCII, it
  2516. also frees the translator from the task of entering the appropriate non-ASCII
  2517. characters if no script change is needed. In this more comfortable form,
  2518. it looks like this:
  2519. <pre class="example"> printf (_("Written by %s and %s.\n"),
  2520. proper_name ("Ulrich Drepper"),
  2521. /* TRANSLATORS: This is a proper name. See the gettext
  2522. manual, section Names. Note this is actually a non-ASCII
  2523. name: The first name is (with Unicode escapes)
  2524. "Fran\u00e7ois" or (with HTML entities) "Fran&amp;ccedil;ois".
  2525. Pronunciation is like "fraa-swa pee-nar". */
  2526. proper_name_utf8 ("Francois Pinard", "Fran\303\247ois Pinard"));
  2527. </pre>
  2528. <p class="noindent">You can also write the original name directly in Unicode (rather than with
  2529. Unicode escapes or HTML entities) and denote the pronunciation using the
  2530. International Phonetic Alphabet (see
  2531. <a href="http://www.wikipedia.org/wiki/International_Phonetic_Alphabet">http://www.wikipedia.org/wiki/International_Phonetic_Alphabet</a>).
  2532. <p>As a translator, you should use some care when translating names, because
  2533. it is frustrating if people see their names mutilated or distorted.
  2534. <p>If your language uses the Latin script, all you need to do is to reproduce
  2535. the name as perfectly as you can within the usual character set of your
  2536. language. In this particular case, this means to provide a translation
  2537. containing the c-cedilla character. If your language uses a different
  2538. script and the people speaking it don't usually read Latin words, it means
  2539. transliteration. If the programmer used the simple case, you should still
  2540. give, in parentheses, the original writing of the name &ndash; for the sake of
  2541. the people that do read the Latin script. If the programmer used the
  2542. &lsquo;<samp><span class="samp">propername</span></samp>&rsquo; module mentioned above, you don't need to give the original
  2543. writing of the name in parentheses, because the program will already do so.
  2544. Here is an example, using Greek as the target script:
  2545. <pre class="example"> #. This is a proper name. See the gettext
  2546. #. manual, section Names. Note this is actually a non-ASCII
  2547. #. name: The first name is (with Unicode escapes)
  2548. #. "Fran\u00e7ois" or (with HTML entities) "Fran&amp;ccedil;ois".
  2549. #. Pronunciation is like "fraa-swa pee-nar".
  2550. msgid "Francois Pinard"
  2551. msgstr "\phi\rho\alpha\sigma\omicron\alpha \pi\iota\nu\alpha\rho"
  2552. " (Francois Pinard)"
  2553. </pre>
  2554. <p>Because translation of names is such a sensitive domain, it is a good
  2555. idea to test your translation before submitting it.
  2556. <div class="node">
  2557. <a name="Libraries"></a>
  2558. <p><hr>
  2559. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Names">Names</a>,
  2560. Up:&nbsp;<a rel="up" accesskey="u" href="#Sources">Sources</a>
  2561. </div>
  2562. <h3 class="section">4.10 Preparing Library Sources</h3>
  2563. <p>When you are preparing a library, not a program, for the use of
  2564. <code>gettext</code>, only a few details are different. Here we assume that
  2565. the library has a translation domain and a POT file of its own. (If
  2566. it uses the translation domain and POT file of the main program, then
  2567. the previous sections apply without changes.)
  2568. <ol type=1 start=1>
  2569. <li>The library code doesn't call <code>setlocale (LC_ALL, "")</code>. It's the
  2570. responsibility of the main program to set the locale. The library's
  2571. documentation should mention this fact, so that developers of programs
  2572. using the library are aware of it.
  2573. <li>The library code doesn't call <code>textdomain (PACKAGE)</code>, because it
  2574. would interfere with the text domain set by the main program.
  2575. <li>The initialization code for a program was
  2576. <pre class="smallexample"> setlocale (LC_ALL, "");
  2577. bindtextdomain (PACKAGE, LOCALEDIR);
  2578. textdomain (PACKAGE);
  2579. </pre>
  2580. <p class="noindent">For a library it is reduced to
  2581. <pre class="smallexample"> bindtextdomain (PACKAGE, LOCALEDIR);
  2582. </pre>
  2583. <p class="noindent">If your library's API doesn't already have an initialization function,
  2584. you need to create one, containing at least the <code>bindtextdomain</code>
  2585. invocation. However, you usually don't need to export and document this
  2586. initialization function: It is sufficient that all entry points of the
  2587. library call the initialization function if it hasn't been called before.
  2588. The typical idiom used to achieve this is a static boolean variable that
  2589. indicates whether the initialization function has been called. Like this:
  2590. <pre class="example"> static bool libfoo_initialized;
  2591. static void
  2592. libfoo_initialize (void)
  2593. {
  2594. bindtextdomain (PACKAGE, LOCALEDIR);
  2595. libfoo_initialized = true;
  2596. }
  2597. /* This function is part of the exported API. */
  2598. struct foo *
  2599. create_foo (...)
  2600. {
  2601. /* Must ensure the initialization is performed. */
  2602. if (!libfoo_initialized)
  2603. libfoo_initialize ();
  2604. ...
  2605. }
  2606. /* This function is part of the exported API. The argument must be
  2607. non-NULL and have been created through create_foo(). */
  2608. int
  2609. foo_refcount (struct foo *argument)
  2610. {
  2611. /* No need to invoke the initialization function here, because
  2612. create_foo() must already have been called before. */
  2613. ...
  2614. }
  2615. </pre>
  2616. <li>The usual declaration of the &lsquo;<samp><span class="samp">_</span></samp>&rsquo; macro in each source file was
  2617. <pre class="smallexample"> #include &lt;libintl.h&gt;
  2618. #define _(String) gettext (String)
  2619. </pre>
  2620. <p class="noindent">for a program. For a library, which has its own translation domain,
  2621. it reads like this:
  2622. <pre class="smallexample"> #include &lt;libintl.h&gt;
  2623. #define _(String) dgettext (PACKAGE, String)
  2624. </pre>
  2625. <p>In other words, <code>dgettext</code> is used instead of <code>gettext</code>.
  2626. Similarly, the <code>dngettext</code> function should be used in place of the
  2627. <code>ngettext</code> function.
  2628. </ol>
  2629. <div class="node">
  2630. <a name="Template"></a>
  2631. <p><hr>
  2632. Next:&nbsp;<a rel="next" accesskey="n" href="#Creating">Creating</a>,
  2633. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Sources">Sources</a>,
  2634. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  2635. </div>
  2636. <h2 class="chapter">5 Making the PO Template File</h2>
  2637. <p><a name="index-PO-template-file-158"></a>
  2638. After preparing the sources, the programmer creates a PO template file.
  2639. This section explains how to use <code>xgettext</code> for this purpose.
  2640. <p><code>xgettext</code> creates a file named <samp><var>domainname</var><span class="file">.po</span></samp>. You
  2641. should then rename it to <samp><var>domainname</var><span class="file">.pot</span></samp>. (Why doesn't
  2642. <code>xgettext</code> create it under the name <samp><var>domainname</var><span class="file">.pot</span></samp>
  2643. right away? The answer is: for historical reasons. When <code>xgettext</code>
  2644. was specified, the distinction between a PO file and PO file template
  2645. was fuzzy, and the suffix &lsquo;<samp><span class="samp">.pot</span></samp>&rsquo; wasn't in use at that time.)
  2646. <!-- FIXME: Rewrite. -->
  2647. <ul class="menu">
  2648. <li><a accesskey="1" href="#xgettext-Invocation">xgettext Invocation</a>: Invoking the <code>xgettext</code> Program
  2649. </ul>
  2650. <div class="node">
  2651. <a name="xgettext-Invocation"></a>
  2652. <p><hr>
  2653. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Template">Template</a>,
  2654. Up:&nbsp;<a rel="up" accesskey="u" href="#Template">Template</a>
  2655. </div>
  2656. <h3 class="section">5.1 Invoking the <code>xgettext</code> Program</h3>
  2657. <p><a name="index-xgettext-159"></a><a name="index-g_t_0040code_007bxgettext_007d-program_002c-usage-160"></a>
  2658. <pre class="example"> xgettext [<var>option</var>] [<var>inputfile</var>] ...
  2659. </pre>
  2660. <p>The <code>xgettext</code> program extracts translatable strings from given
  2661. input files.
  2662. <h4 class="subsection">5.1.1 Input file location</h4>
  2663. <dl>
  2664. <dt>&lsquo;<samp><var>inputfile</var><span class="samp"> ...</span></samp>&rsquo;<dd>Input files.
  2665. <br><dt>&lsquo;<samp><span class="samp">-f </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--files-from=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-161"></a><a name="index-g_t_002d_002dfiles_002dfrom_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-162"></a>Read the names of the input files from <var>file</var> instead of getting
  2666. them from the command line.
  2667. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-163"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-164"></a>Add <var>directory</var> to the list of directories. Source files are
  2668. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  2669. file will be written relative to the current directory, though.
  2670. </dl>
  2671. <p>If <var>inputfile</var> is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  2672. <h4 class="subsection">5.1.2 Output file location</h4>
  2673. <dl>
  2674. <dt>&lsquo;<samp><span class="samp">-d </span><var>name</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--default-domain=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-165"></a><a name="index-g_t_002d_002ddefault_002ddomain_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-166"></a>Use <samp><var>name</var><span class="file">.po</span></samp> for output (instead of <samp><span class="file">messages.po</span></samp>).
  2675. <br><dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-167"></a><a name="index-g_t_002d_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-168"></a>Write output to specified file (instead of <samp><var>name</var><span class="file">.po</span></samp> or
  2676. <samp><span class="file">messages.po</span></samp>).
  2677. <br><dt>&lsquo;<samp><span class="samp">-p </span><var>dir</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-dir=</span><var>dir</var></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-169"></a><a name="index-g_t_002d_002doutput_002ddir_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-170"></a>Output files will be placed in directory <var>dir</var>.
  2678. </dl>
  2679. <p><a name="index-output-to-stdout_002c-_0040code_007bxgettext_007d-171"></a>If the output <var>file</var> is &lsquo;<samp><span class="samp">-</span></samp>&rsquo; or &lsquo;<samp><span class="samp">/dev/stdout</span></samp>&rsquo;, the output
  2680. is written to standard output.
  2681. <h4 class="subsection">5.1.3 Choice of input file language</h4>
  2682. <dl>
  2683. <dt>&lsquo;<samp><span class="samp">-L </span><var>name</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--language=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002dL_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-172"></a><a name="index-g_t_002d_002dlanguage_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-173"></a><a name="index-supported-languages_002c-_0040code_007bxgettext_007d-174"></a>Specifies the language of the input files. The supported languages
  2684. are <code>C</code>, <code>C++</code>, <code>ObjectiveC</code>, <code>PO</code>, <code>Python</code>,
  2685. <code>Lisp</code>, <code>EmacsLisp</code>, <code>librep</code>, <code>Scheme</code>, <code>Smalltalk</code>,
  2686. <code>Java</code>, <code>JavaProperties</code>, <code>C#</code>, <code>awk</code>, <code>YCP</code>,
  2687. <code>Tcl</code>, <code>Perl</code>, <code>PHP</code>, <code>GCC-source</code>, <code>NXStringTable</code>,
  2688. <code>RST</code>, <code>Glade</code>.
  2689. <br><dt>&lsquo;<samp><span class="samp">-C</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--c++</span></samp>&rsquo;<dd><a name="index-g_t_002dC_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-175"></a><a name="index-g_t_002d_002dc_002b_002b_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-176"></a>This is a shorthand for <code>--language=C++</code>.
  2690. </dl>
  2691. <p>By default the language is guessed depending on the input file name
  2692. extension.
  2693. <h4 class="subsection">5.1.4 Input file interpretation</h4>
  2694. <dl>
  2695. <dt>&lsquo;<samp><span class="samp">--from-code=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dfrom_002dcode_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-177"></a>Specifies the encoding of the input files. This option is needed only
  2696. if some untranslated message strings or their corresponding comments
  2697. contain non-ASCII characters. Note that Tcl and Glade input files are
  2698. always assumed to be in UTF-8, regardless of this option.
  2699. </dl>
  2700. <p>By default the input files are assumed to be in ASCII.
  2701. <h4 class="subsection">5.1.5 Operation mode</h4>
  2702. <dl>
  2703. <dt>&lsquo;<samp><span class="samp">-j</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--join-existing</span></samp>&rsquo;<dd><a name="index-g_t_002dj_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-178"></a><a name="index-g_t_002d_002djoin_002dexisting_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-179"></a>Join messages with existing file.
  2704. <br><dt>&lsquo;<samp><span class="samp">-x </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--exclude-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002dx_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-180"></a><a name="index-g_t_002d_002dexclude_002dfile_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-181"></a>Entries from <var>file</var> are not extracted. <var>file</var> should be a PO or
  2705. POT file.
  2706. <br><dt>&lsquo;<samp><span class="samp">-c[</span><var>tag</var><span class="samp">]</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--add-comments[=</span><var>tag</var><span class="samp">]</span></samp>&rsquo;<dd><a name="index-g_t_002dc_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-182"></a><a name="index-g_t_002d_002dadd_002dcomments_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-183"></a>Place comment blocks starting with <var>tag</var> and preceding keyword lines
  2707. in the output file. Without a <var>tag</var>, the option means to put <em>all</em>
  2708. comment blocks preceding keyword lines in the output file.
  2709. </dl>
  2710. <h4 class="subsection">5.1.6 Language specific options</h4>
  2711. <dl>
  2712. <dt>&lsquo;<samp><span class="samp">-a</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--extract-all</span></samp>&rsquo;<dd><a name="index-g_t_002da_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-184"></a><a name="index-g_t_002d_002dextract_002dall_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-185"></a>Extract all strings.
  2713. <p>This option has an effect with most languages, namely C, C++, ObjectiveC,
  2714. Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP,
  2715. GCC-source, Glade.
  2716. <br><dt>&lsquo;<samp><span class="samp">-k[</span><var>keywordspec</var><span class="samp">]</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--keyword[=</span><var>keywordspec</var><span class="samp">]</span></samp>&rsquo;<dd><a name="index-g_t_002dk_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-186"></a><a name="index-g_t_002d_002dkeyword_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-187"></a>Specify <var>keywordspec</var> as an additional keyword to be looked for.
  2717. Without a <var>keywordspec</var>, the option means to not use default keywords.
  2718. <p><a name="index-adding-keywords_002c-_0040code_007bxgettext_007d-188"></a><a name="index-context_002c-argument-specification-in-_0040code_007bxgettext_007d-189"></a>If <var>keywordspec</var> is a C identifier <var>id</var>, <code>xgettext</code> looks
  2719. for strings in the first argument of each call to the function or macro
  2720. <var>id</var>. If <var>keywordspec</var> is of the form
  2721. &lsquo;<samp><var>id</var><span class="samp">:</span><var>argnum</var></samp>&rsquo;, <code>xgettext</code> looks for strings in the
  2722. <var>argnum</var>th argument of the call. If <var>keywordspec</var> is of the form
  2723. &lsquo;<samp><var>id</var><span class="samp">:</span><var>argnum1</var><span class="samp">,</span><var>argnum2</var></samp>&rsquo;, <code>xgettext</code> looks for
  2724. strings in the <var>argnum1</var>st argument and in the <var>argnum2</var>nd argument
  2725. of the call, and treats them as singular/plural variants for a message
  2726. with plural handling. Also, if <var>keywordspec</var> is of the form
  2727. &lsquo;<samp><var>id</var><span class="samp">:</span><var>contextargnum</var><span class="samp">c,</span><var>argnum</var></samp>&rsquo; or
  2728. &lsquo;<samp><var>id</var><span class="samp">:</span><var>argnum</var><span class="samp">,</span><var>contextargnum</var><span class="samp">c</span></samp>&rsquo;, <code>xgettext</code> treats
  2729. strings in the <var>contextargnum</var>th argument as a context specifier.
  2730. And, as a special-purpose support for GNOME, if <var>keywordspec</var> is of the
  2731. form &lsquo;<samp><var>id</var><span class="samp">:</span><var>argnum</var><span class="samp">g</span></samp>&rsquo;, <code>xgettext</code> recognizes the
  2732. <var>argnum</var>th argument as a string with context, using the GNOME <code>glib</code>
  2733. syntax &lsquo;<samp><span class="samp">"msgctxt|msgid"</span></samp>&rsquo;.
  2734. <br>
  2735. Furthermore, if <var>keywordspec</var> is of the form
  2736. &lsquo;<samp><var>id</var><span class="samp">:...,</span><var>totalnumargs</var><span class="samp">t</span></samp>&rsquo;, <code>xgettext</code> recognizes this
  2737. argument specification only if the number of actual arguments is equal to
  2738. <var>totalnumargs</var>. This is useful for disambiguating overloaded function
  2739. calls in C++.
  2740. <br>
  2741. Finally, if <var>keywordspec</var> is of the form
  2742. &lsquo;<samp><var>id</var><span class="samp">:</span><var>argnum</var><span class="samp">...,"</span><var>xcomment</var><span class="samp">"</span></samp>&rsquo;, <code>xgettext</code>, when
  2743. extracting a message from the specified argument strings, adds an extracted
  2744. comment <var>xcomment</var> to the message. Note that when used through a normal
  2745. shell command line, the double-quotes around the <var>xcomment</var> need to be
  2746. escaped.
  2747. <p>This option has an effect with most languages, namely C, C++, ObjectiveC,
  2748. Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP,
  2749. GCC-source, Glade.
  2750. <p>The default keyword specifications, which are always looked for if not
  2751. explicitly disabled, are language dependent. They are:
  2752. <ul>
  2753. <li>For C, C++, and GCC-source: <code>gettext</code>, <code>dgettext:2</code>,
  2754. <code>dcgettext:2</code>, <code>ngettext:1,2</code>, <code>dngettext:2,3</code>,
  2755. <code>dcngettext:2,3</code>, <code>gettext_noop</code>, and <code>pgettext:1c,2</code>,
  2756. <code>dpgettext:2c,3</code>, <code>dcpgettext:2c,3</code>, <code>npgettext:1c,2,3</code>,
  2757. <code>dnpgettext:2c,3,4</code>, <code>dcnpgettext:2c,3,4</code>.
  2758. <li>For Objective C: Like for C, and also <code>NSLocalizedString</code>, <code>_</code>,
  2759. <code>NSLocalizedStaticString</code>, <code>__</code>.
  2760. <li>For Shell scripts: <code>gettext</code>, <code>ngettext:1,2</code>, <code>eval_gettext</code>,
  2761. <code>eval_ngettext:1,2</code>.
  2762. <li>For Python: <code>gettext</code>, <code>ugettext</code>, <code>dgettext:2</code>,
  2763. <code>ngettext:1,2</code>, <code>ungettext:1,2</code>, <code>dngettext:2,3</code>, <code>_</code>.
  2764. <li>For Lisp: <code>gettext</code>, <code>ngettext:1,2</code>, <code>gettext-noop</code>.
  2765. <li>For EmacsLisp: <code>_</code>.
  2766. <li>For librep: <code>_</code>.
  2767. <li>For Scheme: <code>gettext</code>, <code>ngettext:1,2</code>, <code>gettext-noop</code>.
  2768. <li>For Java: <code>GettextResource.gettext:2</code>,
  2769. <code>GettextResource.ngettext:2,3</code>, <code>GettextResource.pgettext:2c,3</code>,
  2770. <code>GettextResource.npgettext:2c,3,4</code>, <code>gettext</code>, <code>ngettext:1,2</code>,
  2771. <code>pgettext:1c,2</code>, <code>npgettext:1c,2,3</code>, <code>getString</code>.
  2772. <li>For C#: <code>GetString</code>, <code>GetPluralString:1,2</code>,
  2773. <code>GetParticularString:1c,2</code>, <code>GetParticularPluralString:1c,2,3</code>.
  2774. <li>For awk: <code>dcgettext</code>, <code>dcngettext:1,2</code>.
  2775. <li>For Tcl: <code>::msgcat::mc</code>.
  2776. <li>For Perl: <code>gettext</code>, <code>%gettext</code>, <code>$gettext</code>, <code>dgettext:2</code>,
  2777. <code>dcgettext:2</code>, <code>ngettext:1,2</code>, <code>dngettext:2,3</code>,
  2778. <code>dcngettext:2,3</code>, <code>gettext_noop</code>.
  2779. <li>For PHP: <code>_</code>, <code>gettext</code>, <code>dgettext:2</code>, <code>dcgettext:2</code>,
  2780. <code>ngettext:1,2</code>, <code>dngettext:2,3</code>, <code>dcngettext:2,3</code>.
  2781. <li>For Glade 1: <code>label</code>, <code>title</code>, <code>text</code>, <code>format</code>,
  2782. <code>copyright</code>, <code>comments</code>, <code>preview_text</code>, <code>tooltip</code>.
  2783. </ul>
  2784. <p>To disable the default keyword specifications, the option &lsquo;<samp><span class="samp">-k</span></samp>&rsquo; or
  2785. &lsquo;<samp><span class="samp">--keyword</span></samp>&rsquo; or &lsquo;<samp><span class="samp">--keyword=</span></samp>&rsquo;, without a <var>keywordspec</var>, can be
  2786. used.
  2787. <br><dt>&lsquo;<samp><span class="samp">--flag=</span><var>word</var><span class="samp">:</span><var>arg</var><span class="samp">:</span><var>flag</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dflag_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-190"></a>Specifies additional flags for strings occurring as part of the <var>arg</var>th
  2788. argument of the function <var>word</var>. The possible flags are the possible
  2789. format string indicators, such as &lsquo;<samp><span class="samp">c-format</span></samp>&rsquo;, and their negations,
  2790. such as &lsquo;<samp><span class="samp">no-c-format</span></samp>&rsquo;, possibly prefixed with &lsquo;<samp><span class="samp">pass-</span></samp>&rsquo;.
  2791. <br>
  2792. <a name="index-function-attribute_002c-_005f_005fformat_005f_005f-191"></a>The meaning of <code>--flag=</code><var>function</var><code>:</code><var>arg</var><code>:</code><var>lang</var><code>-format</code>
  2793. is that in language <var>lang</var>, the specified <var>function</var> expects as
  2794. <var>arg</var>th argument a format string. (For those of you familiar with
  2795. GCC function attributes, <code>--flag=</code><var>function</var><code>:</code><var>arg</var><code>:c-format</code> is
  2796. roughly equivalent to the declaration
  2797. &lsquo;<samp><span class="samp">__attribute__ ((__format__ (__printf__, </span><var>arg</var><span class="samp">, ...)))</span></samp>&rsquo; attached
  2798. to <var>function</var> in a C source file.)
  2799. For example, if you use the &lsquo;<samp><span class="samp">error</span></samp>&rsquo; function from GNU libc, you can
  2800. specify its behaviour through <code>--flag=error:3:c-format</code>. The effect of
  2801. this specification is that <code>xgettext</code> will mark as format strings all
  2802. <code>gettext</code> invocations that occur as <var>arg</var>th argument of
  2803. <var>function</var>.
  2804. This is useful when such strings contain no format string directives:
  2805. together with the checks done by &lsquo;<samp><span class="samp">msgfmt -c</span></samp>&rsquo; it will ensure that
  2806. translators cannot accidentally use format string directives that would
  2807. lead to a crash at runtime.
  2808. <br>
  2809. <a name="index-function-attribute_002c-_005f_005fformat_005farg_005f_005f-192"></a>The meaning of <code>--flag=</code><var>function</var><code>:</code><var>arg</var><code>:pass-</code><var>lang</var><code>-format</code>
  2810. is that in language <var>lang</var>, if the <var>function</var> call occurs in a
  2811. position that must yield a format string, then its <var>arg</var>th argument
  2812. must yield a format string of the same type as well. (If you know GCC
  2813. function attributes, the <code>--flag=</code><var>function</var><code>:</code><var>arg</var><code>:pass-c-format</code>
  2814. option is roughly equivalent to the declaration
  2815. &lsquo;<samp><span class="samp">__attribute__ ((__format_arg__ (</span><var>arg</var><span class="samp">)))</span></samp>&rsquo; attached to <var>function</var>
  2816. in a C source file.)
  2817. For example, if you use the &lsquo;<samp><span class="samp">_</span></samp>&rsquo; shortcut for the <code>gettext</code> function,
  2818. you should use <code>--flag=_:1:pass-c-format</code>. The effect of this
  2819. specification is that <code>xgettext</code> will propagate a format string
  2820. requirement for a <code>_("string")</code> call to its first argument, the literal
  2821. <code>"string"</code>, and thus mark it as a format string.
  2822. This is useful when such strings contain no format string directives:
  2823. together with the checks done by &lsquo;<samp><span class="samp">msgfmt -c</span></samp>&rsquo; it will ensure that
  2824. translators cannot accidentally use format string directives that would
  2825. lead to a crash at runtime.
  2826. <br>
  2827. This option has an effect with most languages, namely C, C++, ObjectiveC,
  2828. Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP,
  2829. GCC-source.
  2830. <br><dt>&lsquo;<samp><span class="samp">-T</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--trigraphs</span></samp>&rsquo;<dd><a name="index-g_t_002dT_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-193"></a><a name="index-g_t_002d_002dtrigraphs_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-194"></a><a name="index-C-trigraphs-195"></a>Understand ANSI C trigraphs for input.
  2831. <br>
  2832. This option has an effect only with the languages C, C++, ObjectiveC.
  2833. <br><dt>&lsquo;<samp><span class="samp">--qt</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dqt_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-196"></a><a name="index-Qt-format-strings-197"></a>Recognize Qt format strings.
  2834. <br>
  2835. This option has an effect only with the language C++.
  2836. <br><dt>&lsquo;<samp><span class="samp">--kde</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dkde_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-198"></a><a name="index-KDE-format-strings-199"></a>Recognize KDE 4 format strings.
  2837. <br>
  2838. This option has an effect only with the language C++.
  2839. <br><dt>&lsquo;<samp><span class="samp">--boost</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dboost_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-200"></a><a name="index-Boost-format-strings-201"></a>Recognize Boost format strings.
  2840. <br>
  2841. This option has an effect only with the language C++.
  2842. <br><dt>&lsquo;<samp><span class="samp">--debug</span></samp>&rsquo;<dd><a name="index-g_t_002d_002ddebug_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-202"></a><a name="index-debugging-messages-marked-as-format-strings-203"></a>Use the flags <code>c-format</code> and <code>possible-c-format</code> to show who was
  2843. responsible for marking a message as a format string. The latter form is
  2844. used if the <code>xgettext</code> program decided, the format form is used if
  2845. the programmer prescribed it.
  2846. <p>By default only the <code>c-format</code> form is used. The translator should
  2847. not have to care about these details.
  2848. </dl>
  2849. <p>This implementation of <code>xgettext</code> is able to process a few awkward
  2850. cases, like strings in preprocessor macros, ANSI concatenation of
  2851. adjacent strings, and escaped end of lines for continued strings.
  2852. <h4 class="subsection">5.1.7 Output details</h4>
  2853. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  2854. <dl>
  2855. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-204"></a>Specify whether or when to use colors and other text attributes.
  2856. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  2857. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-205"></a>Specify the CSS style rule file to use for <code>--color</code>.
  2858. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  2859. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-206"></a>Always write an output file even if no message is defined.
  2860. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-207"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-208"></a>Write the .po file using indented style.
  2861. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-209"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines. Note that using
  2862. this option makes it harder for technically skilled translators to understand
  2863. each message's context.
  2864. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-210"></a><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-211"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  2865. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-212"></a>Write out a strict Uniforum conforming PO file. Note that this
  2866. Uniforum format should be avoided because it doesn't support the
  2867. GNU extensions.
  2868. <br><dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-213"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  2869. that this file format doesn't support plural forms and silently drops
  2870. obsolete messages.
  2871. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-214"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  2872. Note that this file format doesn't support plural forms.
  2873. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-215"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-216"></a>Set the output page width. Long strings in the output files will be
  2874. split across multiple lines in order to ensure that each line's width
  2875. (= number of screen columns) is less or equal to the given <var>number</var>.
  2876. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-217"></a>Do not break long message lines. Message lines whose width exceeds the
  2877. output page width will not be split into several lines. Only file reference
  2878. lines which are wider than the output page width will be split.
  2879. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-218"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-219"></a><a name="index-sorting-output-of-_0040code_007bxgettext_007d-220"></a>Generate sorted output. Note that using this option makes it much harder
  2880. for the translator to understand each message's context.
  2881. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-221"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-222"></a>Sort output by file location.
  2882. <br><dt>&lsquo;<samp><span class="samp">--omit-header</span></samp>&rsquo;<dd><a name="index-g_t_002d_002domit_002dheader_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-223"></a>Don't write header with &lsquo;<samp><span class="samp">msgid ""</span></samp>&rsquo; entry.
  2883. <p><a name="index-testing-_0040file_007b_002epo_007d-files-for-equivalence-224"></a>This is useful for testing purposes because it eliminates a source
  2884. of variance for generated <code>.gmo</code> files. With <code>--omit-header</code>,
  2885. two invocations of <code>xgettext</code> on the same files with the same
  2886. options at different times are guaranteed to produce the same results.
  2887. <p>Note that using this option will lead to an error if the resulting file
  2888. would not entirely be in ASCII.
  2889. <br><dt>&lsquo;<samp><span class="samp">--copyright-holder=</span><var>string</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcopyright_002dholder_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-225"></a>Set the copyright holder in the output. <var>string</var> should be the
  2890. copyright holder of the surrounding package. (Note that the msgstr
  2891. strings, extracted from the package's sources, belong to the copyright
  2892. holder of the package.) Translators are expected to transfer or disclaim
  2893. the copyright for their translations, so that package maintainers can
  2894. distribute them without legal risk. If <var>string</var> is empty, the output
  2895. files are marked as being in the public domain; in this case, the translators
  2896. are expected to disclaim their copyright, again so that package maintainers
  2897. can distribute them without legal risk.
  2898. <p>The default value for <var>string</var> is the Free Software Foundation, Inc.,
  2899. simply because <code>xgettext</code> was first used in the GNU project.
  2900. <br><dt>&lsquo;<samp><span class="samp">--foreign-user</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforeign_002duser_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-226"></a>Omit FSF copyright in output. This option is equivalent to
  2901. &lsquo;<samp><span class="samp">--copyright-holder=''</span></samp>&rsquo;. It can be useful for packages outside the GNU
  2902. project that want their translations to be in the public domain.
  2903. <br><dt>&lsquo;<samp><span class="samp">--package-name=</span><var>package</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dpackage_002dname_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-227"></a>Set the package name in the header of the output.
  2904. <br><dt>&lsquo;<samp><span class="samp">--package-version=</span><var>version</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dpackage_002dversion_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-228"></a>Set the package version in the header of the output. This option has an
  2905. effect only if the &lsquo;<samp><span class="samp">--package-name</span></samp>&rsquo; option is also used.
  2906. <br><dt>&lsquo;<samp><span class="samp">--msgid-bugs-address=</span><var>email@address</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dmsgid_002dbugs_002daddress_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-229"></a>Set the reporting address for msgid bugs. This is the email address or URL
  2907. to which the translators shall report bugs in the untranslated strings:
  2908. <ul>
  2909. <li>Strings which are not entire sentences, see the maintainer guidelines
  2910. in <a href="#Preparing-Strings">Preparing Strings</a>.
  2911. <li>Strings which use unclear terms or require additional context to be
  2912. understood.
  2913. <li>Strings which make invalid assumptions about notation of date, time or
  2914. money.
  2915. <li>Pluralisation problems.
  2916. <li>Incorrect English spelling.
  2917. <li>Incorrect formatting.
  2918. </ul>
  2919. <p>It can be your email address, or a mailing list address where translators
  2920. can write to without being subscribed, or the URL of a web page through
  2921. which the translators can contact you.
  2922. <p>The default value is empty, which means that translators will be clueless!
  2923. Don't forget to specify this option.
  2924. <br><dt>&lsquo;<samp><span class="samp">-m[</span><var>string</var><span class="samp">]</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--msgstr-prefix[=</span><var>string</var><span class="samp">]</span></samp>&rsquo;<dd><a name="index-g_t_002dm_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-230"></a><a name="index-g_t_002d_002dmsgstr_002dprefix_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-231"></a>Use <var>string</var> (or "" if not specified) as prefix for msgstr values.
  2925. <br><dt>&lsquo;<samp><span class="samp">-M[</span><var>string</var><span class="samp">]</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--msgstr-suffix[=</span><var>string</var><span class="samp">]</span></samp>&rsquo;<dd><a name="index-g_t_002dM_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-232"></a><a name="index-g_t_002d_002dmsgstr_002dsuffix_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-233"></a>Use <var>string</var> (or "" if not specified) as suffix for msgstr values.
  2926. </dl>
  2927. <h4 class="subsection">5.1.8 Informative output</h4>
  2928. <dl>
  2929. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-234"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-235"></a>Display this help and exit.
  2930. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-236"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-237"></a>Output version information and exit.
  2931. </dl>
  2932. <div class="node">
  2933. <a name="Creating"></a>
  2934. <p><hr>
  2935. Next:&nbsp;<a rel="next" accesskey="n" href="#Updating">Updating</a>,
  2936. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Template">Template</a>,
  2937. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  2938. </div>
  2939. <h2 class="chapter">6 Creating a New PO File</h2>
  2940. <p><a name="index-creating-a-new-PO-file-238"></a>
  2941. When starting a new translation, the translator creates a file called
  2942. <samp><var>LANG</var><span class="file">.po</span></samp>, as a copy of the <samp><var>package</var><span class="file">.pot</span></samp> template
  2943. file with modifications in the initial comments (at the beginning of the file)
  2944. and in the header entry (the first entry, near the beginning of the file).
  2945. <p>The easiest way to do so is by use of the &lsquo;<samp><span class="samp">msginit</span></samp>&rsquo; program.
  2946. For example:
  2947. <pre class="example"> $ cd <var>PACKAGE</var>-<var>VERSION</var>
  2948. $ cd po
  2949. $ msginit
  2950. </pre>
  2951. <p>The alternative way is to do the copy and modifications by hand.
  2952. To do so, the translator copies <samp><var>package</var><span class="file">.pot</span></samp> to
  2953. <samp><var>LANG</var><span class="file">.po</span></samp>. Then she modifies the initial comments and
  2954. the header entry of this file.
  2955. <ul class="menu">
  2956. <li><a accesskey="1" href="#msginit-Invocation">msginit Invocation</a>: Invoking the <code>msginit</code> Program
  2957. <li><a accesskey="2" href="#Header-Entry">Header Entry</a>: Filling in the Header Entry
  2958. </ul>
  2959. <div class="node">
  2960. <a name="msginit-Invocation"></a>
  2961. <p><hr>
  2962. Next:&nbsp;<a rel="next" accesskey="n" href="#Header-Entry">Header Entry</a>,
  2963. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Creating">Creating</a>,
  2964. Up:&nbsp;<a rel="up" accesskey="u" href="#Creating">Creating</a>
  2965. </div>
  2966. <h3 class="section">6.1 Invoking the <code>msginit</code> Program</h3>
  2967. <p><a name="index-msginit-239"></a><a name="index-g_t_0040code_007bmsginit_007d-program_002c-usage-240"></a>
  2968. <pre class="example"> msginit [<var>option</var>]
  2969. </pre>
  2970. <p><a name="index-create-new-PO-file-241"></a><a name="index-initialize-new-PO-file-242"></a>The <code>msginit</code> program creates a new PO file, initializing the meta
  2971. information with values from the user's environment.
  2972. <h4 class="subsection">6.1.1 Input file location</h4>
  2973. <dl>
  2974. <dt>&lsquo;<samp><span class="samp">-i </span><var>inputfile</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--input=</span><var>inputfile</var></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-243"></a><a name="index-g_t_002d_002dinput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-244"></a>Input POT file.
  2975. </dl>
  2976. <p>If no <var>inputfile</var> is given, the current directory is searched for the
  2977. POT file. If it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  2978. <h4 class="subsection">6.1.2 Output file location</h4>
  2979. <dl>
  2980. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-245"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-246"></a>Write output to specified PO file.
  2981. </dl>
  2982. <p>If no output file is given, it depends on the &lsquo;<samp><span class="samp">--locale</span></samp>&rsquo; option or the
  2983. user's locale setting. If it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, the results are written to
  2984. standard output.
  2985. <h4 class="subsection">6.1.3 Input file syntax</h4>
  2986. <dl>
  2987. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-247"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-248"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  2988. syntax, not in PO file syntax.
  2989. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-249"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  2990. <code>.strings</code> syntax, not in PO file syntax.
  2991. </dl>
  2992. <h4 class="subsection">6.1.4 Output details</h4>
  2993. <dl>
  2994. <dt>&lsquo;<samp><span class="samp">-l </span><var>ll_CC</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>ll_CC</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-250"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-251"></a>Set target locale. <var>ll</var> should be a language code, and <var>CC</var> should
  2995. be a country code. The command &lsquo;<samp><span class="samp">locale -a</span></samp>&rsquo; can be used to output a list
  2996. of all installed locales. The default is the user's locale setting.
  2997. <br><dt>&lsquo;<samp><span class="samp">--no-translator</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dtranslator_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-252"></a>Declares that the PO file will not have a human translator and is instead
  2998. automatically generated.
  2999. <br><dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-253"></a>Specify whether or when to use colors and other text attributes.
  3000. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  3001. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-254"></a>Specify the CSS style rule file to use for <code>--color</code>.
  3002. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  3003. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-255"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-256"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  3004. that this file format doesn't support plural forms and silently drops
  3005. obsolete messages.
  3006. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-257"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  3007. Note that this file format doesn't support plural forms.
  3008. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-258"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-259"></a>Set the output page width. Long strings in the output files will be
  3009. split across multiple lines in order to ensure that each line's width
  3010. (= number of screen columns) is less or equal to the given <var>number</var>.
  3011. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-260"></a>Do not break long message lines. Message lines whose width exceeds the
  3012. output page width will not be split into several lines. Only file reference
  3013. lines which are wider than the output page width will be split.
  3014. </dl>
  3015. <h4 class="subsection">6.1.5 Informative output</h4>
  3016. <dl>
  3017. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-261"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-262"></a>Display this help and exit.
  3018. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-263"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-264"></a>Output version information and exit.
  3019. </dl>
  3020. <div class="node">
  3021. <a name="Header-Entry"></a>
  3022. <p><hr>
  3023. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msginit-Invocation">msginit Invocation</a>,
  3024. Up:&nbsp;<a rel="up" accesskey="u" href="#Creating">Creating</a>
  3025. </div>
  3026. <h3 class="section">6.2 Filling in the Header Entry</h3>
  3027. <p><a name="index-header-entry-of-a-PO-file-265"></a>
  3028. The initial comments "SOME DESCRIPTIVE TITLE", "YEAR" and
  3029. "FIRST AUTHOR &lt;EMAIL@ADDRESS&gt;, YEAR" ought to be replaced by sensible
  3030. information. This can be done in any text editor; if Emacs is used
  3031. and it switched to PO mode automatically (because it has recognized
  3032. the file's suffix), you can disable it by typing <kbd>M-x fundamental-mode</kbd>.
  3033. <p>Modifying the header entry can already be done using PO mode: in Emacs,
  3034. type <kbd>M-x po-mode RET</kbd> and then <kbd>RET</kbd> again to start editing the
  3035. entry. You should fill in the following fields.
  3036. <dl>
  3037. <dt>Project-Id-Version<dd>This is the name and version of the package. Fill it in if it has not
  3038. already been filled in by <code>xgettext</code>.
  3039. <br><dt>Report-Msgid-Bugs-To<dd>This has already been filled in by <code>xgettext</code>. It contains an email
  3040. address or URL where you can report bugs in the untranslated strings:
  3041. <ul>
  3042. <li>Strings which are not entire sentences, see the maintainer guidelines
  3043. in <a href="#Preparing-Strings">Preparing Strings</a>.
  3044. <li>Strings which use unclear terms or require additional context to be
  3045. understood.
  3046. <li>Strings which make invalid assumptions about notation of date, time or
  3047. money.
  3048. <li>Pluralisation problems.
  3049. <li>Incorrect English spelling.
  3050. <li>Incorrect formatting.
  3051. </ul>
  3052. <br><dt>POT-Creation-Date<dd>This has already been filled in by <code>xgettext</code>.
  3053. <br><dt>PO-Revision-Date<dd>You don't need to fill this in. It will be filled by the PO file editor
  3054. when you save the file.
  3055. <br><dt>Last-Translator<dd>Fill in your name and email address (without double quotes).
  3056. <br><dt>Language-Team<dd>Fill in the English name of the language, and the email address or
  3057. homepage URL of the language team you are part of.
  3058. <p>Before starting a translation, it is a good idea to get in touch with
  3059. your translation team, not only to make sure you don't do duplicated work,
  3060. but also to coordinate difficult linguistic issues.
  3061. <p><a name="index-list-of-translation-teams_002c-where-to-find-266"></a>In the Free Translation Project, each translation team has its own mailing
  3062. list. The up-to-date list of teams can be found at the Free Translation
  3063. Project's homepage, <a href="http://translationproject.org/">http://translationproject.org/</a>, in the "Teams"
  3064. area.
  3065. <br><dt>Language<dd><!-- The purpose of this field is to make it possible to automatically -->
  3066. <!-- convert PO files to translation memory, -->
  3067. <!-- initialize a spell checker based on the PO file, -->
  3068. <!-- perform language specific checks. -->
  3069. Fill in the language code of the language. This can be in one of three
  3070. forms:
  3071. <ul>
  3072. <li>&lsquo;<samp><var>ll</var></samp>&rsquo;, an ISO&nbsp;639<!-- /@w --> two-letter language code (lowercase).
  3073. See <a href="#Language-Codes">Language Codes</a> for the list of codes.
  3074. <li>&lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo;, where &lsquo;<samp><var>ll</var></samp>&rsquo; is an ISO&nbsp;639<!-- /@w --> two-letter
  3075. language code (lowercase) and &lsquo;<samp><var>CC</var></samp>&rsquo; is an ISO&nbsp;3166<!-- /@w --> two-letter
  3076. country code (uppercase). The country code specification is not redundant:
  3077. Some languages have dialects in different countries. For example,
  3078. &lsquo;<samp><span class="samp">de_AT</span></samp>&rsquo; is used for Austria, and &lsquo;<samp><span class="samp">pt_BR</span></samp>&rsquo; for Brazil. The country
  3079. code serves to distinguish the dialects. See <a href="#Language-Codes">Language Codes</a> and
  3080. <a href="#Country-Codes">Country Codes</a> for the lists of codes.
  3081. <li>&lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var><span class="samp">@</span><var>variant</var></samp>&rsquo;, where &lsquo;<samp><var>ll</var></samp>&rsquo; is an
  3082. ISO&nbsp;639<!-- /@w --> two-letter language code (lowercase), &lsquo;<samp><var>CC</var></samp>&rsquo; is an
  3083. ISO&nbsp;3166<!-- /@w --> two-letter country code (uppercase), and &lsquo;<samp><var>variant</var></samp>&rsquo; is
  3084. a variant designator. The variant designator (lowercase) can be a script
  3085. designator, such as &lsquo;<samp><span class="samp">latin</span></samp>&rsquo; or &lsquo;<samp><span class="samp">cyrillic</span></samp>&rsquo;.
  3086. </ul>
  3087. <p>The naming convention &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo; is also the way locales are
  3088. named on systems based on GNU libc. But there are three important differences:
  3089. <ul>
  3090. <li>In this PO file field, but not in locale names, &lsquo;<samp><var>ll</var><span class="samp">_</span><var>CC</var></samp>&rsquo;
  3091. combinations denoting a language's main dialect are abbreviated as
  3092. &lsquo;<samp><var>ll</var></samp>&rsquo;. For example, &lsquo;<samp><span class="samp">de</span></samp>&rsquo; is equivalent to &lsquo;<samp><span class="samp">de_DE</span></samp>&rsquo;
  3093. (German as spoken in Germany), and &lsquo;<samp><span class="samp">pt</span></samp>&rsquo; to &lsquo;<samp><span class="samp">pt_PT</span></samp>&rsquo; (Portuguese as
  3094. spoken in Portugal) in this context.
  3095. <li>In this PO file field, suffixes like &lsquo;<samp><span class="samp">.</span><var>encoding</var></samp>&rsquo; are not used.
  3096. <li>In this PO file field, variant designators that are not relevant to message
  3097. translation, such as &lsquo;<samp><span class="samp">@euro</span></samp>&rsquo;, are not used.
  3098. </ul>
  3099. <p>So, if your locale name is &lsquo;<samp><span class="samp">de_DE.UTF-8</span></samp>&rsquo;, the language specification in
  3100. PO files is just &lsquo;<samp><span class="samp">de</span></samp>&rsquo;.
  3101. <br><dt>Content-Type<dd><a name="index-encoding-of-PO-files-267"></a><a name="index-charset-of-PO-files-268"></a>Replace &lsquo;<samp><span class="samp">CHARSET</span></samp>&rsquo; with the character encoding used for your language,
  3102. in your locale, or UTF-8. This field is needed for correct operation of the
  3103. <code>msgmerge</code> and <code>msgfmt</code> programs, as well as for users whose
  3104. locale's character encoding differs from yours (see <a href="#Charset-conversion">Charset conversion</a>).
  3105. <p><a name="index-g_t_0040code_007blocale_007d-program-269"></a>You get the character encoding of your locale by running the shell command
  3106. &lsquo;<samp><span class="samp">locale charmap</span></samp>&rsquo;. If the result is &lsquo;<samp><span class="samp">C</span></samp>&rsquo; or &lsquo;<samp><span class="samp">ANSI_X3.4-1968</span></samp>&rsquo;,
  3107. which is equivalent to &lsquo;<samp><span class="samp">ASCII</span></samp>&rsquo; (= &lsquo;<samp><span class="samp">US-ASCII</span></samp>&rsquo;), it means that your
  3108. locale is not correctly configured. In this case, ask your translation
  3109. team which charset to use. &lsquo;<samp><span class="samp">ASCII</span></samp>&rsquo; is not usable for any language
  3110. except Latin.
  3111. <p><a name="index-encoding-list-270"></a>Because the PO files must be portable to operating systems with less advanced
  3112. internationalization facilities, the character encodings that can be used
  3113. are limited to those supported by both GNU <code>libc</code> and GNU
  3114. <code>libiconv</code>. These are:
  3115. <code>ASCII</code>, <code>ISO-8859-1</code>, <code>ISO-8859-2</code>, <code>ISO-8859-3</code>,
  3116. <code>ISO-8859-4</code>, <code>ISO-8859-5</code>, <code>ISO-8859-6</code>, <code>ISO-8859-7</code>,
  3117. <code>ISO-8859-8</code>, <code>ISO-8859-9</code>, <code>ISO-8859-13</code>, <code>ISO-8859-14</code>,
  3118. <code>ISO-8859-15</code>,
  3119. <code>KOI8-R</code>, <code>KOI8-U</code>, <code>KOI8-T</code>,
  3120. <code>CP850</code>, <code>CP866</code>, <code>CP874</code>,
  3121. <code>CP932</code>, <code>CP949</code>, <code>CP950</code>, <code>CP1250</code>, <code>CP1251</code>,
  3122. <code>CP1252</code>, <code>CP1253</code>, <code>CP1254</code>, <code>CP1255</code>, <code>CP1256</code>,
  3123. <code>CP1257</code>, <code>GB2312</code>, <code>EUC-JP</code>, <code>EUC-KR</code>, <code>EUC-TW</code>,
  3124. <code>BIG5</code>, <code>BIG5-HKSCS</code>, <code>GBK</code>, <code>GB18030</code>, <code>SHIFT_JIS</code>,
  3125. <code>JOHAB</code>, <code>TIS-620</code>, <code>VISCII</code>, <code>GEORGIAN-PS</code>, <code>UTF-8</code>.
  3126. <!-- This data is taken from glibc/localedata/SUPPORTED. -->
  3127. <p><a name="index-Linux-271"></a>In the GNU system, the following encodings are frequently used for the
  3128. corresponding languages.
  3129. <p><a name="index-encoding-for-your-language-272"></a>
  3130. <ul>
  3131. <li><code>ISO-8859-1</code> for
  3132. Afrikaans, Albanian, Basque, Breton, Catalan, Cornish, Danish, Dutch,
  3133. English, Estonian, Faroese, Finnish, French, Galician, German,
  3134. Greenlandic, Icelandic, Indonesian, Irish, Italian, Malay, Manx,
  3135. Norwegian, Occitan, Portuguese, Spanish, Swedish, Tagalog, Uzbek,
  3136. Walloon,
  3137. <li><code>ISO-8859-2</code> for
  3138. Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak,
  3139. Slovenian,
  3140. <li><code>ISO-8859-3</code> for Maltese,
  3141. <li><code>ISO-8859-5</code> for Macedonian, Serbian,
  3142. <li><code>ISO-8859-6</code> for Arabic,
  3143. <li><code>ISO-8859-7</code> for Greek,
  3144. <li><code>ISO-8859-8</code> for Hebrew,
  3145. <li><code>ISO-8859-9</code> for Turkish,
  3146. <li><code>ISO-8859-13</code> for Latvian, Lithuanian, Maori,
  3147. <li><code>ISO-8859-14</code> for Welsh,
  3148. <li><code>ISO-8859-15</code> for
  3149. Basque, Catalan, Dutch, English, Finnish, French, Galician, German, Irish,
  3150. Italian, Portuguese, Spanish, Swedish, Walloon,
  3151. <li><code>KOI8-R</code> for Russian,
  3152. <li><code>KOI8-U</code> for Ukrainian,
  3153. <li><code>KOI8-T</code> for Tajik,
  3154. <li><code>CP1251</code> for Bulgarian, Belarusian,
  3155. <li><code>GB2312</code>, <code>GBK</code>, <code>GB18030</code>
  3156. for simplified writing of Chinese,
  3157. <li><code>BIG5</code>, <code>BIG5-HKSCS</code>
  3158. for traditional writing of Chinese,
  3159. <li><code>EUC-JP</code> for Japanese,
  3160. <li><code>EUC-KR</code> for Korean,
  3161. <li><code>TIS-620</code> for Thai,
  3162. <li><code>GEORGIAN-PS</code> for Georgian,
  3163. <li><code>UTF-8</code> for any language, including those listed above.
  3164. </ul>
  3165. <p><a name="index-quote-characters_002c-use-in-PO-files-273"></a><a name="index-quotation-marks-274"></a>When single quote characters or double quote characters are used in
  3166. translations for your language, and your locale's encoding is one of the
  3167. ISO-8859-* charsets, it is best if you create your PO files in UTF-8
  3168. encoding, instead of your locale's encoding. This is because in UTF-8
  3169. the real quote characters can be represented (single quote characters:
  3170. U+2018, U+2019, double quote characters: U+201C, U+201D), whereas none of
  3171. ISO-8859-* charsets has them all. Users in UTF-8 locales will see the
  3172. real quote characters, whereas users in ISO-8859-* locales will see the
  3173. vertical apostrophe and the vertical double quote instead (because that's
  3174. what the character set conversion will transliterate them to).
  3175. <p><a name="index-g_t_0040code_007bxmodmap_007d-program_002c-and-typing-quotation-marks-275"></a>To enter such quote characters under X11, you can change your keyboard
  3176. mapping using the <code>xmodmap</code> program. The X11 names of the quote
  3177. characters are "leftsinglequotemark", "rightsinglequotemark",
  3178. "leftdoublequotemark", "rightdoublequotemark", "singlelowquotemark",
  3179. "doublelowquotemark".
  3180. <p>Note that only recent versions of GNU Emacs support the UTF-8 encoding:
  3181. Emacs 20 with Mule-UCS, and Emacs 21. As of January 2001, XEmacs doesn't
  3182. support the UTF-8 encoding.
  3183. <p>The character encoding name can be written in either upper or lower case.
  3184. Usually upper case is preferred.
  3185. <br><dt>Content-Transfer-Encoding<dd>Set this to <code>8bit</code>.
  3186. <br><dt>Plural-Forms<dd>This field is optional. It is only needed if the PO file has plural forms.
  3187. You can find them by searching for the &lsquo;<samp><span class="samp">msgid_plural</span></samp>&rsquo; keyword. The
  3188. format of the plural forms field is described in <a href="#Plural-forms">Plural forms</a> and
  3189. <a href="#Translating-plural-forms">Translating plural forms</a>.
  3190. </dl>
  3191. <div class="node">
  3192. <a name="Updating"></a>
  3193. <p><hr>
  3194. Next:&nbsp;<a rel="next" accesskey="n" href="#Editing">Editing</a>,
  3195. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Creating">Creating</a>,
  3196. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  3197. </div>
  3198. <h2 class="chapter">7 Updating Existing PO Files</h2>
  3199. <ul class="menu">
  3200. <li><a accesskey="1" href="#msgmerge-Invocation">msgmerge Invocation</a>: Invoking the <code>msgmerge</code> Program
  3201. </ul>
  3202. <div class="node">
  3203. <a name="msgmerge-Invocation"></a>
  3204. <p><hr>
  3205. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Updating">Updating</a>,
  3206. Up:&nbsp;<a rel="up" accesskey="u" href="#Updating">Updating</a>
  3207. </div>
  3208. <h3 class="section">7.1 Invoking the <code>msgmerge</code> Program</h3>
  3209. <p><a name="index-msgmerge-276"></a><a name="index-g_t_0040code_007bmsgmerge_007d-program_002c-usage-277"></a>
  3210. <pre class="example"> msgmerge [<var>option</var>] <var>def</var>.po <var>ref</var>.pot
  3211. </pre>
  3212. <p>The <code>msgmerge</code> program merges two Uniforum style .po files together.
  3213. The <var>def</var>.po file is an existing PO file with translations which will
  3214. be taken over to the newly created file as long as they still match;
  3215. comments will be preserved, but extracted comments and file positions will
  3216. be discarded. The <var>ref</var>.pot file is the last created PO file with
  3217. up-to-date source references but old translations, or a PO Template file
  3218. (generally created by <code>xgettext</code>); any translations or comments
  3219. in the file will be discarded, however dot comments and file positions
  3220. will be preserved. Where an exact match cannot be found, fuzzy matching
  3221. is used to produce better results.
  3222. <h4 class="subsection">7.1.1 Input file location</h4>
  3223. <dl>
  3224. <dt>&lsquo;<samp><var>def</var><span class="samp">.po</span></samp>&rsquo;<dd>Translations referring to old sources.
  3225. <br><dt>&lsquo;<samp><var>ref</var><span class="samp">.pot</span></samp>&rsquo;<dd>References to the new sources.
  3226. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-278"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-279"></a>Add <var>directory</var> to the list of directories. Source files are
  3227. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  3228. file will be written relative to the current directory, though.
  3229. <br><dt>&lsquo;<samp><span class="samp">-C </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--compendium=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002dC_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-280"></a><a name="index-g_t_002d_002dcompendium_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-281"></a>Specify an additional library of message translations. See <a href="#Compendium">Compendium</a>.
  3230. This option may be specified more than once.
  3231. </dl>
  3232. <h4 class="subsection">7.1.2 Operation mode</h4>
  3233. <dl>
  3234. <dt>&lsquo;<samp><span class="samp">-U</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--update</span></samp>&rsquo;<dd><a name="index-g_t_002dU_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-282"></a><a name="index-g_t_002d_002dupdate_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-283"></a>Update <var>def</var>.po. Do nothing if <var>def</var>.po is already up to date.
  3235. </dl>
  3236. <h4 class="subsection">7.1.3 Output file location</h4>
  3237. <dl>
  3238. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-284"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-285"></a>Write output to specified file.
  3239. </dl>
  3240. <p><a name="index-standard-output_002c-and-_0040code_007bmsgmerge_007d-program-286"></a>The results are written to standard output if no output file is specified
  3241. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  3242. <h4 class="subsection">7.1.4 Output file location in update mode</h4>
  3243. <p>The result is written back to <var>def</var>.po.
  3244. <dl>
  3245. <dt>&lsquo;<samp><span class="samp">--backup=</span><var>control</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dbackup_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-287"></a><a name="index-backup-old-file_002c-and-_0040code_007bmsgmerge_007d-program-288"></a>Make a backup of <var>def</var>.po
  3246. <br><dt>&lsquo;<samp><span class="samp">--suffix=</span><var>suffix</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dsuffix_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-289"></a>Override the usual backup suffix.
  3247. </dl>
  3248. <p><a name="index-version-control-for-backup-files_002c-_0040code_007bmsgmerge_007d-290"></a>The version control method may be selected via the <code>--backup</code> option
  3249. or through the <code>VERSION_CONTROL</code> environment variable. Here are the
  3250. values:
  3251. <dl>
  3252. <dt>&lsquo;<samp><span class="samp">none</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">off</span></samp>&rsquo;<dd>Never make backups (even if <code>--backup</code> is given).
  3253. <br><dt>&lsquo;<samp><span class="samp">numbered</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">t</span></samp>&rsquo;<dd>Make numbered backups.
  3254. <br><dt>&lsquo;<samp><span class="samp">existing</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">nil</span></samp>&rsquo;<dd>Make numbered backups if numbered backups for this file already exist,
  3255. otherwise make simple backups.
  3256. <br><dt>&lsquo;<samp><span class="samp">simple</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">never</span></samp>&rsquo;<dd>Always make simple backups.
  3257. </dl>
  3258. <p>The backup suffix is &lsquo;<samp><span class="samp">~</span></samp>&rsquo;, unless set with <code>--suffix</code> or the
  3259. <code>SIMPLE_BACKUP_SUFFIX</code> environment variable.
  3260. <h4 class="subsection">7.1.5 Operation modifiers</h4>
  3261. <dl>
  3262. <dt>&lsquo;<samp><span class="samp">-m</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--multi-domain</span></samp>&rsquo;<dd><a name="index-g_t_002dm_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-291"></a><a name="index-g_t_002d_002dmulti_002ddomain_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-292"></a>Apply <var>ref</var>.pot to each of the domains in <var>def</var>.po.
  3263. <br><dt>&lsquo;<samp><span class="samp">-N</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--no-fuzzy-matching</span></samp>&rsquo;<dd><a name="index-g_t_002dN_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-293"></a><a name="index-g_t_002d_002dno_002dfuzzy_002dmatching_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-294"></a>Do not use fuzzy matching when an exact match is not found. This may speed
  3264. up the operation considerably.
  3265. <br><dt>&lsquo;<samp><span class="samp">--previous</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dprevious_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-295"></a>Keep the previous msgids of translated messages, marked with &lsquo;<samp><span class="samp">#|</span></samp>&rsquo;, when
  3266. adding the fuzzy marker to such messages.
  3267. </dl>
  3268. <h4 class="subsection">7.1.6 Input file syntax</h4>
  3269. <dl>
  3270. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-296"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-297"></a>Assume the input files are Java ResourceBundles in Java <code>.properties</code>
  3271. syntax, not in PO file syntax.
  3272. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-298"></a>Assume the input files are NeXTstep/GNUstep localized resource files in
  3273. <code>.strings</code> syntax, not in PO file syntax.
  3274. </dl>
  3275. <h4 class="subsection">7.1.7 Output details</h4>
  3276. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  3277. <dl>
  3278. <dt>&lsquo;<samp><span class="samp">--lang=</span><var>catalogname</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dlang_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-299"></a>Specify the &lsquo;<samp><span class="samp">Language</span></samp>&rsquo; field to be used in the header entry. See
  3279. <a href="#Header-Entry">Header Entry</a> for the meaning of this field. Note: The
  3280. &lsquo;<samp><span class="samp">Language-Team</span></samp>&rsquo; and &lsquo;<samp><span class="samp">Plural-Forms</span></samp>&rsquo; fields are left unchanged.
  3281. If this option is not specified, the &lsquo;<samp><span class="samp">Language</span></samp>&rsquo; field is inferred, as
  3282. best as possible, from the &lsquo;<samp><span class="samp">Language-Team</span></samp>&rsquo; field.
  3283. <br><dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-300"></a>Specify whether or when to use colors and other text attributes.
  3284. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  3285. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-301"></a>Specify the CSS style rule file to use for <code>--color</code>.
  3286. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  3287. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-302"></a>Always write an output file even if it contains no message.
  3288. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-303"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-304"></a>Write the .po file using indented style.
  3289. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-305"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  3290. <br><dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-306"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  3291. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-307"></a>Write out a strict Uniforum conforming PO file. Note that this
  3292. Uniforum format should be avoided because it doesn't support the
  3293. GNU extensions.
  3294. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-308"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-309"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  3295. that this file format doesn't support plural forms and silently drops
  3296. obsolete messages.
  3297. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-310"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  3298. Note that this file format doesn't support plural forms.
  3299. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-311"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-312"></a>Set the output page width. Long strings in the output files will be
  3300. split across multiple lines in order to ensure that each line's width
  3301. (= number of screen columns) is less or equal to the given <var>number</var>.
  3302. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-313"></a>Do not break long message lines. Message lines whose width exceeds the
  3303. output page width will not be split into several lines. Only file reference
  3304. lines which are wider than the output page width will be split.
  3305. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-314"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-315"></a><a name="index-sorting-_0040code_007bmsgmerge_007d-output-316"></a>Generate sorted output. Note that using this option makes it much harder
  3306. for the translator to understand each message's context.
  3307. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-317"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-318"></a>Sort output by file location.
  3308. </dl>
  3309. <h4 class="subsection">7.1.8 Informative output</h4>
  3310. <dl>
  3311. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-319"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-320"></a>Display this help and exit.
  3312. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-321"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-322"></a>Output version information and exit.
  3313. <br><dt>&lsquo;<samp><span class="samp">-v</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--verbose</span></samp>&rsquo;<dd><a name="index-g_t_002dv_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-323"></a><a name="index-g_t_002d_002dverbose_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-324"></a>Increase verbosity level.
  3314. <br><dt>&lsquo;<samp><span class="samp">-q</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--quiet</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--silent</span></samp>&rsquo;<dd><a name="index-g_t_002dq_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-325"></a><a name="index-g_t_002d_002dquiet_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-326"></a><a name="index-g_t_002d_002dsilent_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-327"></a>Suppress progress indicators.
  3315. </dl>
  3316. <div class="node">
  3317. <a name="Editing"></a>
  3318. <p><hr>
  3319. Next:&nbsp;<a rel="next" accesskey="n" href="#Manipulating">Manipulating</a>,
  3320. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Updating">Updating</a>,
  3321. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  3322. </div>
  3323. <h2 class="chapter">8 Editing PO Files</h2>
  3324. <p><a name="index-Editing-PO-Files-328"></a>
  3325. <ul class="menu">
  3326. <li><a accesskey="1" href="#KBabel">KBabel</a>: KDE's PO File Editor
  3327. <li><a accesskey="2" href="#Gtranslator">Gtranslator</a>: GNOME's PO File Editor
  3328. <li><a accesskey="3" href="#PO-Mode">PO Mode</a>: Emacs's PO File Editor
  3329. <li><a accesskey="4" href="#Compendium">Compendium</a>: Using Translation Compendia
  3330. </ul>
  3331. <div class="node">
  3332. <a name="KBabel"></a>
  3333. <p><hr>
  3334. Next:&nbsp;<a rel="next" accesskey="n" href="#Gtranslator">Gtranslator</a>,
  3335. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Editing">Editing</a>,
  3336. Up:&nbsp;<a rel="up" accesskey="u" href="#Editing">Editing</a>
  3337. </div>
  3338. <h3 class="section">8.1 KDE's PO File Editor</h3>
  3339. <p><a name="index-KDE-PO-file-editor-329"></a>
  3340. <div class="node">
  3341. <a name="Gtranslator"></a>
  3342. <p><hr>
  3343. Next:&nbsp;<a rel="next" accesskey="n" href="#PO-Mode">PO Mode</a>,
  3344. Previous:&nbsp;<a rel="previous" accesskey="p" href="#KBabel">KBabel</a>,
  3345. Up:&nbsp;<a rel="up" accesskey="u" href="#Editing">Editing</a>
  3346. </div>
  3347. <h3 class="section">8.2 GNOME's PO File Editor</h3>
  3348. <p><a name="index-GNOME-PO-file-editor-330"></a>
  3349. <div class="node">
  3350. <a name="PO-Mode"></a>
  3351. <p><hr>
  3352. Next:&nbsp;<a rel="next" accesskey="n" href="#Compendium">Compendium</a>,
  3353. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Gtranslator">Gtranslator</a>,
  3354. Up:&nbsp;<a rel="up" accesskey="u" href="#Editing">Editing</a>
  3355. </div>
  3356. <h3 class="section">8.3 Emacs's PO File Editor</h3>
  3357. <p><a name="index-Emacs-PO-Mode-331"></a>
  3358. <!-- FIXME: Rewrite. -->
  3359. <p>For those of you being
  3360. the lucky users of Emacs, PO mode has been specifically created
  3361. for providing a cozy environment for editing or modifying PO files.
  3362. While editing a PO file, PO mode allows for the easy browsing of
  3363. auxiliary and compendium PO files, as well as for following references into
  3364. the set of C program sources from which PO files have been derived.
  3365. It has a few special features, among which are the interactive marking
  3366. of program strings as translatable, and the validation of PO files
  3367. with easy repositioning to PO file lines showing errors.
  3368. <p>For the beginning, besides main PO mode commands
  3369. (see <a href="#Main-PO-Commands">Main PO Commands</a>), you should know how to move between entries
  3370. (see <a href="#Entry-Positioning">Entry Positioning</a>), and how to handle untranslated entries
  3371. (see <a href="#Untranslated-Entries">Untranslated Entries</a>).
  3372. <ul class="menu">
  3373. <li><a accesskey="1" href="#Installation">Installation</a>: Completing GNU <code>gettext</code> Installation
  3374. <li><a accesskey="2" href="#Main-PO-Commands">Main PO Commands</a>: Main Commands
  3375. <li><a accesskey="3" href="#Entry-Positioning">Entry Positioning</a>: Entry Positioning
  3376. <li><a accesskey="4" href="#Normalizing">Normalizing</a>: Normalizing Strings in Entries
  3377. <li><a accesskey="5" href="#Translated-Entries">Translated Entries</a>: Translated Entries
  3378. <li><a accesskey="6" href="#Fuzzy-Entries">Fuzzy Entries</a>: Fuzzy Entries
  3379. <li><a accesskey="7" href="#Untranslated-Entries">Untranslated Entries</a>: Untranslated Entries
  3380. <li><a accesskey="8" href="#Obsolete-Entries">Obsolete Entries</a>: Obsolete Entries
  3381. <li><a accesskey="9" href="#Modifying-Translations">Modifying Translations</a>: Modifying Translations
  3382. <li><a href="#Modifying-Comments">Modifying Comments</a>: Modifying Comments
  3383. <li><a href="#Subedit">Subedit</a>: Mode for Editing Translations
  3384. <li><a href="#C-Sources-Context">C Sources Context</a>: C Sources Context
  3385. <li><a href="#Auxiliary">Auxiliary</a>: Consulting Auxiliary PO Files
  3386. </ul>
  3387. <div class="node">
  3388. <a name="Installation"></a>
  3389. <p><hr>
  3390. Next:&nbsp;<a rel="next" accesskey="n" href="#Main-PO-Commands">Main PO Commands</a>,
  3391. Previous:&nbsp;<a rel="previous" accesskey="p" href="#PO-Mode">PO Mode</a>,
  3392. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3393. </div>
  3394. <h4 class="subsection">8.3.1 Completing GNU <code>gettext</code> Installation</h4>
  3395. <p><a name="index-installing-_0040code_007bgettext_007d-332"></a><a name="index-g_t_0040code_007bgettext_007d-installation-333"></a>Once you have received, unpacked, configured and compiled the GNU
  3396. <code>gettext</code> distribution, the &lsquo;<samp><span class="samp">make install</span></samp>&rsquo; command puts in
  3397. place the programs <code>xgettext</code>, <code>msgfmt</code>, <code>gettext</code>, and
  3398. <code>msgmerge</code>, as well as their available message catalogs. To
  3399. top off a comfortable installation, you might also want to make the
  3400. PO mode available to your Emacs users.
  3401. <p><a name="index-g_t_0040file_007b_002eemacs_007d-customizations-334"></a><a name="index-installing-PO-mode-335"></a>During the installation of the PO mode, you might want to modify your
  3402. file <samp><span class="file">.emacs</span></samp>, once and for all, so it contains a few lines looking
  3403. like:
  3404. <pre class="example"> (setq auto-mode-alist
  3405. (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist))
  3406. (autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t)
  3407. </pre>
  3408. <p>Later, whenever you edit some <samp><span class="file">.po</span></samp>
  3409. file, or any file having the string &lsquo;<samp><span class="samp">.po.</span></samp>&rsquo; within its name,
  3410. Emacs loads <samp><span class="file">po-mode.elc</span></samp> (or <samp><span class="file">po-mode.el</span></samp>) as needed, and
  3411. automatically activates PO mode commands for the associated buffer.
  3412. The string <em>PO</em> appears in the mode line for any buffer for
  3413. which PO mode is active. Many PO files may be active at once in a
  3414. single Emacs session.
  3415. <p>If you are using Emacs version 20 or newer, and have already installed
  3416. the appropriate international fonts on your system, you may also tell
  3417. Emacs how to determine automatically the coding system of every PO file.
  3418. This will often (but not always) cause the necessary fonts to be loaded
  3419. and used for displaying the translations on your Emacs screen. For this
  3420. to happen, add the lines:
  3421. <pre class="example"> (modify-coding-system-alist 'file "\\.po\\'\\|\\.po\\."
  3422. 'po-find-file-coding-system)
  3423. (autoload 'po-find-file-coding-system "po-mode")
  3424. </pre>
  3425. <p class="noindent">to your <samp><span class="file">.emacs</span></samp> file. If, with this, you still see boxes instead
  3426. of international characters, try a different font set (via Shift Mouse
  3427. button 1).
  3428. <div class="node">
  3429. <a name="Main-PO-Commands"></a>
  3430. <p><hr>
  3431. Next:&nbsp;<a rel="next" accesskey="n" href="#Entry-Positioning">Entry Positioning</a>,
  3432. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installation">Installation</a>,
  3433. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3434. </div>
  3435. <h4 class="subsection">8.3.2 Main PO mode Commands</h4>
  3436. <p><a name="index-PO-mode-_0028Emacs_0029-commands-336"></a><a name="index-commands-337"></a>After setting up Emacs with something similar to the lines in
  3437. <a href="#Installation">Installation</a>, PO mode is activated for a window when Emacs finds a
  3438. PO file in that window. This puts the window read-only and establishes a
  3439. po-mode-map, which is a genuine Emacs mode, in a way that is not derived
  3440. from text mode in any way. Functions found on <code>po-mode-hook</code>,
  3441. if any, will be executed.
  3442. <p>When PO mode is active in a window, the letters &lsquo;<samp><span class="samp">PO</span></samp>&rsquo; appear
  3443. in the mode line for that window. The mode line also displays how
  3444. many entries of each kind are held in the PO file. For example,
  3445. the string &lsquo;<samp><span class="samp">132t+3f+10u+2o</span></samp>&rsquo; would tell the translator that the
  3446. PO mode contains 132 translated entries (see <a href="#Translated-Entries">Translated Entries</a>,
  3447. 3 fuzzy entries (see <a href="#Fuzzy-Entries">Fuzzy Entries</a>), 10 untranslated entries
  3448. (see <a href="#Untranslated-Entries">Untranslated Entries</a>) and 2 obsolete entries (see <a href="#Obsolete-Entries">Obsolete Entries</a>). Zero-coefficients items are not shown. So, in this example, if
  3449. the fuzzy entries were unfuzzied, the untranslated entries were translated
  3450. and the obsolete entries were deleted, the mode line would merely display
  3451. &lsquo;<samp><span class="samp">145t</span></samp>&rsquo; for the counters.
  3452. <p>The main PO commands are those which do not fit into the other categories of
  3453. subsequent sections. These allow for quitting PO mode or for managing windows
  3454. in special ways.
  3455. <dl>
  3456. <dt><kbd>_</kbd><dd><a name="index-g_t_005f_0040r_007b_002c-PO-Mode-command_007d-338"></a>Undo last modification to the PO file (<code>po-undo</code>).
  3457. <br><dt><kbd>Q</kbd><dd><a name="index-Q_0040r_007b_002c-PO-Mode-command_007d-339"></a>Quit processing and save the PO file (<code>po-quit</code>).
  3458. <br><dt><kbd>q</kbd><dd><a name="index-q_0040r_007b_002c-PO-Mode-command_007d-340"></a>Quit processing, possibly after confirmation (<code>po-confirm-and-quit</code>).
  3459. <br><dt><kbd>0</kbd><dd><a name="index-g_t0_0040r_007b_002c-PO-Mode-command_007d-341"></a>Temporary leave the PO file window (<code>po-other-window</code>).
  3460. <br><dt><kbd>?</kbd><dt><kbd>h</kbd><dd><a name="index-g_t_003f_0040r_007b_002c-PO-Mode-command_007d-342"></a><a name="index-h_0040r_007b_002c-PO-Mode-command_007d-343"></a>Show help about PO mode (<code>po-help</code>).
  3461. <br><dt><kbd>=</kbd><dd><a name="index-g_t_003d_0040r_007b_002c-PO-Mode-command_007d-344"></a>Give some PO file statistics (<code>po-statistics</code>).
  3462. <br><dt><kbd>V</kbd><dd><a name="index-V_0040r_007b_002c-PO-Mode-command_007d-345"></a>Batch validate the format of the whole PO file (<code>po-validate</code>).
  3463. </dl>
  3464. <p><a name="index-g_t_005f_0040r_007b_002c-PO-Mode-command_007d-346"></a><a name="index-po_002dundo_0040r_007b_002c-PO-Mode-command_007d-347"></a>The command <kbd>_</kbd> (<code>po-undo</code>) interfaces to the Emacs
  3465. <em>undo</em> facility. See <a href="emacs.html#Undo">Undoing Changes</a>. Each time <kbd>_</kbd> is typed, modifications which the translator
  3466. did to the PO file are undone a little more. For the purpose of
  3467. undoing, each PO mode command is atomic. This is especially true for
  3468. the <kbd>&lt;RET&gt;</kbd> command: the whole edition made by using a single
  3469. use of this command is undone at once, even if the edition itself
  3470. implied several actions. However, while in the editing window, one
  3471. can undo the edition work quite parsimoniously.
  3472. <p><a name="index-Q_0040r_007b_002c-PO-Mode-command_007d-348"></a><a name="index-q_0040r_007b_002c-PO-Mode-command_007d-349"></a><a name="index-po_002dquit_0040r_007b_002c-PO-Mode-command_007d-350"></a><a name="index-po_002dconfirm_002dand_002dquit_0040r_007b_002c-PO-Mode-command_007d-351"></a>The commands <kbd>Q</kbd> (<code>po-quit</code>) and <kbd>q</kbd>
  3473. (<code>po-confirm-and-quit</code>) are used when the translator is done with the
  3474. PO file. The former is a bit less verbose than the latter. If the file
  3475. has been modified, it is saved to disk first. In both cases, and prior to
  3476. all this, the commands check if any untranslated messages remain in the
  3477. PO file and, if so, the translator is asked if she really wants to leave
  3478. off working with this PO file. This is the preferred way of getting rid
  3479. of an Emacs PO file buffer. Merely killing it through the usual command
  3480. <kbd>C-x&nbsp;k</kbd><!-- /@w --> (<code>kill-buffer</code>) is not the tidiest way to proceed.
  3481. <p><a name="index-g_t0_0040r_007b_002c-PO-Mode-command_007d-352"></a><a name="index-po_002dother_002dwindow_0040r_007b_002c-PO-Mode-command_007d-353"></a>The command <kbd>0</kbd> (<code>po-other-window</code>) is another, softer way,
  3482. to leave PO mode, temporarily. It just moves the cursor to some other
  3483. Emacs window, and pops one if necessary. For example, if the translator
  3484. just got PO mode to show some source context in some other, she might
  3485. discover some apparent bug in the program source that needs correction.
  3486. This command allows the translator to change sex, become a programmer,
  3487. and have the cursor right into the window containing the program she
  3488. (or rather <em>he</em>) wants to modify. By later getting the cursor back
  3489. in the PO file window, or by asking Emacs to edit this file once again,
  3490. PO mode is then recovered.
  3491. <p><a name="index-g_t_003f_0040r_007b_002c-PO-Mode-command_007d-354"></a><a name="index-h_0040r_007b_002c-PO-Mode-command_007d-355"></a><a name="index-po_002dhelp_0040r_007b_002c-PO-Mode-command_007d-356"></a>The command <kbd>h</kbd> (<code>po-help</code>) displays a summary of all available PO
  3492. mode commands. The translator should then type any character to resume
  3493. normal PO mode operations. The command <kbd>?</kbd> has the same effect
  3494. as <kbd>h</kbd>.
  3495. <p><a name="index-g_t_003d_0040r_007b_002c-PO-Mode-command_007d-357"></a><a name="index-po_002dstatistics_0040r_007b_002c-PO-Mode-command_007d-358"></a>The command <kbd>=</kbd> (<code>po-statistics</code>) computes the total number of
  3496. entries in the PO file, the ordinal of the current entry (counted from
  3497. 1), the number of untranslated entries, the number of obsolete entries,
  3498. and displays all these numbers.
  3499. <p><a name="index-V_0040r_007b_002c-PO-Mode-command_007d-359"></a><a name="index-po_002dvalidate_0040r_007b_002c-PO-Mode-command_007d-360"></a>The command <kbd>V</kbd> (<code>po-validate</code>) launches <code>msgfmt</code> in
  3500. checking and verbose
  3501. mode over the current PO file. This command first offers to save the
  3502. current PO file on disk. The <code>msgfmt</code> tool, from GNU <code>gettext</code>,
  3503. has the purpose of creating a MO file out of a PO file, and PO mode uses
  3504. the features of this program for checking the overall format of a PO file,
  3505. as well as all individual entries.
  3506. <p><a name="index-next_002derror_0040r_007b_002c-stepping-through-PO-file-validation-results_007d-361"></a>The program <code>msgfmt</code> runs asynchronously with Emacs, so the
  3507. translator regains control immediately while her PO file is being studied.
  3508. Error output is collected in the Emacs &lsquo;<samp><span class="samp">*compilation*</span></samp>&rsquo; buffer,
  3509. displayed in another window. The regular Emacs command <kbd>C-x`</kbd>
  3510. (<code>next-error</code>), as well as other usual compile commands, allow the
  3511. translator to reposition quickly to the offending parts of the PO file.
  3512. Once the cursor is on the line in error, the translator may decide on
  3513. any PO mode action which would help correcting the error.
  3514. <div class="node">
  3515. <a name="Entry-Positioning"></a>
  3516. <p><hr>
  3517. Next:&nbsp;<a rel="next" accesskey="n" href="#Normalizing">Normalizing</a>,
  3518. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Main-PO-Commands">Main PO Commands</a>,
  3519. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3520. </div>
  3521. <h4 class="subsection">8.3.3 Entry Positioning</h4>
  3522. <p><a name="index-current-entry-of-a-PO-file-362"></a>The cursor in a PO file window is almost always part of
  3523. an entry. The only exceptions are the special case when the cursor
  3524. is after the last entry in the file, or when the PO file is
  3525. empty. The entry where the cursor is found to be is said to be the
  3526. current entry. Many PO mode commands operate on the current entry,
  3527. so moving the cursor does more than allowing the translator to browse
  3528. the PO file, this also selects on which entry commands operate.
  3529. <p><a name="index-moving-through-a-PO-file-363"></a>Some PO mode commands alter the position of the cursor in a specialized
  3530. way. A few of those special purpose positioning are described here,
  3531. the others are described in following sections (for a complete list try
  3532. <kbd>C-h m</kbd>):
  3533. <dl>
  3534. <dt><kbd>.</kbd><dd><a name="index-g_t_002e_0040r_007b_002c-PO-Mode-command_007d-364"></a>Redisplay the current entry (<code>po-current-entry</code>).
  3535. <br><dt><kbd>n</kbd><dd><a name="index-n_0040r_007b_002c-PO-Mode-command_007d-365"></a>Select the entry after the current one (<code>po-next-entry</code>).
  3536. <br><dt><kbd>p</kbd><dd><a name="index-p_0040r_007b_002c-PO-Mode-command_007d-366"></a>Select the entry before the current one (<code>po-previous-entry</code>).
  3537. <br><dt><kbd>&lt;</kbd><dd><a name="index-g_t_003c_0040r_007b_002c-PO-Mode-command_007d-367"></a>Select the first entry in the PO file (<code>po-first-entry</code>).
  3538. <br><dt><kbd>&gt;</kbd><dd><a name="index-g_t_003e_0040r_007b_002c-PO-Mode-command_007d-368"></a>Select the last entry in the PO file (<code>po-last-entry</code>).
  3539. <br><dt><kbd>m</kbd><dd><a name="index-m_0040r_007b_002c-PO-Mode-command_007d-369"></a>Record the location of the current entry for later use
  3540. (<code>po-push-location</code>).
  3541. <br><dt><kbd>r</kbd><dd><a name="index-r_0040r_007b_002c-PO-Mode-command_007d-370"></a>Return to a previously saved entry location (<code>po-pop-location</code>).
  3542. <br><dt><kbd>x</kbd><dd><a name="index-x_0040r_007b_002c-PO-Mode-command_007d-371"></a>Exchange the current entry location with the previously saved one
  3543. (<code>po-exchange-location</code>).
  3544. </dl>
  3545. <p><a name="index-g_t_002e_0040r_007b_002c-PO-Mode-command_007d-372"></a><a name="index-po_002dcurrent_002dentry_0040r_007b_002c-PO-Mode-command_007d-373"></a>Any Emacs command able to reposition the cursor may be used
  3546. to select the current entry in PO mode, including commands which
  3547. move by characters, lines, paragraphs, screens or pages, and search
  3548. commands. However, there is a kind of standard way to display the
  3549. current entry in PO mode, which usual Emacs commands moving
  3550. the cursor do not especially try to enforce. The command <kbd>.</kbd>
  3551. (<code>po-current-entry</code>) has the sole purpose of redisplaying the
  3552. current entry properly, after the current entry has been changed by
  3553. means external to PO mode, or the Emacs screen otherwise altered.
  3554. <p>It is yet to be decided if PO mode helps the translator, or otherwise
  3555. irritates her, by forcing a rigid window disposition while she
  3556. is doing her work. We originally had quite precise ideas about
  3557. how windows should behave, but on the other hand, anyone used to
  3558. Emacs is often happy to keep full control. Maybe a fixed window
  3559. disposition might be offered as a PO mode option that the translator
  3560. might activate or deactivate at will, so it could be offered on an
  3561. experimental basis. If nobody feels a real need for using it, or
  3562. a compulsion for writing it, we should drop this whole idea.
  3563. The incentive for doing it should come from translators rather than
  3564. programmers, as opinions from an experienced translator are surely
  3565. more worth to me than opinions from programmers <em>thinking</em> about
  3566. how <em>others</em> should do translation.
  3567. <p><a name="index-n_0040r_007b_002c-PO-Mode-command_007d-374"></a><a name="index-po_002dnext_002dentry_0040r_007b_002c-PO-Mode-command_007d-375"></a><a name="index-p_0040r_007b_002c-PO-Mode-command_007d-376"></a><a name="index-po_002dprevious_002dentry_0040r_007b_002c-PO-Mode-command_007d-377"></a>The commands <kbd>n</kbd> (<code>po-next-entry</code>) and <kbd>p</kbd>
  3568. (<code>po-previous-entry</code>) move the cursor the entry following,
  3569. or preceding, the current one. If <kbd>n</kbd> is given while the
  3570. cursor is on the last entry of the PO file, or if <kbd>p</kbd>
  3571. is given while the cursor is on the first entry, no move is done.
  3572. <p><a name="index-g_t_003c_0040r_007b_002c-PO-Mode-command_007d-378"></a><a name="index-po_002dfirst_002dentry_0040r_007b_002c-PO-Mode-command_007d-379"></a><a name="index-g_t_003e_0040r_007b_002c-PO-Mode-command_007d-380"></a><a name="index-po_002dlast_002dentry_0040r_007b_002c-PO-Mode-command_007d-381"></a>The commands <kbd>&lt;</kbd> (<code>po-first-entry</code>) and <kbd>&gt;</kbd>
  3573. (<code>po-last-entry</code>) move the cursor to the first entry, or last
  3574. entry, of the PO file. When the cursor is located past the last
  3575. entry in a PO file, most PO mode commands will return an error saying
  3576. &lsquo;<samp><span class="samp">After last entry</span></samp>&rsquo;. Moreover, the commands <kbd>&lt;</kbd> and <kbd>&gt;</kbd>
  3577. have the special property of being able to work even when the cursor
  3578. is not into some PO file entry, and one may use them for nicely
  3579. correcting this situation. But even these commands will fail on a
  3580. truly empty PO file. There are development plans for the PO mode for it
  3581. to interactively fill an empty PO file from sources. See <a href="#Marking">Marking</a>.
  3582. <p>The translator may decide, before working at the translation of
  3583. a particular entry, that she needs to browse the remainder of the
  3584. PO file, maybe for finding the terminology or phraseology used
  3585. in related entries. She can of course use the standard Emacs idioms
  3586. for saving the current cursor location in some register, and use that
  3587. register for getting back, or else, use the location ring.
  3588. <p><a name="index-m_0040r_007b_002c-PO-Mode-command_007d-382"></a><a name="index-po_002dpush_002dlocation_0040r_007b_002c-PO-Mode-command_007d-383"></a><a name="index-r_0040r_007b_002c-PO-Mode-command_007d-384"></a><a name="index-po_002dpop_002dlocation_0040r_007b_002c-PO-Mode-command_007d-385"></a>PO mode offers another approach, by which cursor locations may be saved
  3589. onto a special stack. The command <kbd>m</kbd> (<code>po-push-location</code>)
  3590. merely adds the location of current entry to the stack, pushing
  3591. the already saved locations under the new one. The command
  3592. <kbd>r</kbd> (<code>po-pop-location</code>) consumes the top stack element and
  3593. repositions the cursor to the entry associated with that top element.
  3594. This position is then lost, for the next <kbd>r</kbd> will move the cursor
  3595. to the previously saved location, and so on until no locations remain
  3596. on the stack.
  3597. <p>If the translator wants the position to be kept on the location stack,
  3598. maybe for taking a look at the entry associated with the top
  3599. element, then go elsewhere with the intent of getting back later, she
  3600. ought to use <kbd>m</kbd> immediately after <kbd>r</kbd>.
  3601. <p><a name="index-x_0040r_007b_002c-PO-Mode-command_007d-386"></a><a name="index-po_002dexchange_002dlocation_0040r_007b_002c-PO-Mode-command_007d-387"></a>The command <kbd>x</kbd> (<code>po-exchange-location</code>) simultaneously
  3602. repositions the cursor to the entry associated with the top element of
  3603. the stack of saved locations, and replaces that top element with the
  3604. location of the current entry before the move. Consequently, repeating
  3605. the <kbd>x</kbd> command toggles alternatively between two entries.
  3606. For achieving this, the translator will position the cursor on the
  3607. first entry, use <kbd>m</kbd>, then position to the second entry, and
  3608. merely use <kbd>x</kbd> for making the switch.
  3609. <div class="node">
  3610. <a name="Normalizing"></a>
  3611. <p><hr>
  3612. Next:&nbsp;<a rel="next" accesskey="n" href="#Translated-Entries">Translated Entries</a>,
  3613. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Entry-Positioning">Entry Positioning</a>,
  3614. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3615. </div>
  3616. <h4 class="subsection">8.3.4 Normalizing Strings in Entries</h4>
  3617. <p><a name="index-string-normalization-in-entries-388"></a>
  3618. There are many different ways for encoding a particular string into a
  3619. PO file entry, because there are so many different ways to split and
  3620. quote multi-line strings, and even, to represent special characters
  3621. by backslashed escaped sequences. Some features of PO mode rely on
  3622. the ability for PO mode to scan an already existing PO file for a
  3623. particular string encoded into the <code>msgid</code> field of some entry.
  3624. Even if PO mode has internally all the built-in machinery for
  3625. implementing this recognition easily, doing it fast is technically
  3626. difficult. To facilitate a solution to this efficiency problem,
  3627. we decided on a canonical representation for strings.
  3628. <p>A conventional representation of strings in a PO file is currently
  3629. under discussion, and PO mode experiments with a canonical representation.
  3630. Having both <code>xgettext</code> and PO mode converging towards a uniform
  3631. way of representing equivalent strings would be useful, as the internal
  3632. normalization needed by PO mode could be automatically satisfied
  3633. when using <code>xgettext</code> from GNU <code>gettext</code>. An explicit
  3634. PO mode normalization should then be only necessary for PO files
  3635. imported from elsewhere, or for when the convention itself evolves.
  3636. <p>So, for achieving normalization of at least the strings of a given
  3637. PO file needing a canonical representation, the following PO mode
  3638. command is available:
  3639. <p><a name="index-string-normalization-in-entries-389"></a>
  3640. <dl>
  3641. <dt><kbd>M-x po-normalize</kbd><dd><a name="index-po_002dnormalize_0040r_007b_002c-PO-Mode-command_007d-390"></a>Tidy the whole PO file by making entries more uniform.
  3642. </dl>
  3643. <p>The special command <kbd>M-x po-normalize</kbd>, which has no associated
  3644. keys, revises all entries, ensuring that strings of both original
  3645. and translated entries use uniform internal quoting in the PO file.
  3646. It also removes any crumb after the last entry. This command may be
  3647. useful for PO files freshly imported from elsewhere, or if we ever
  3648. improve on the canonical quoting format we use. This canonical format
  3649. is not only meant for getting cleaner PO files, but also for greatly
  3650. speeding up <code>msgid</code> string lookup for some other PO mode commands.
  3651. <p><kbd>M-x po-normalize</kbd> presently makes three passes over the entries.
  3652. The first implements heuristics for converting PO files for GNU
  3653. <code>gettext</code> 0.6 and earlier, in which <code>msgid</code> and <code>msgstr</code>
  3654. fields were using K&amp;R style C string syntax for multi-line strings.
  3655. These heuristics may fail for comments not related to obsolete
  3656. entries and ending with a backslash; they also depend on subsequent
  3657. passes for finalizing the proper commenting of continued lines for
  3658. obsolete entries. This first pass might disappear once all oldish PO
  3659. files would have been adjusted. The second and third pass normalize
  3660. all <code>msgid</code> and <code>msgstr</code> strings respectively. They also
  3661. clean out those trailing backslashes used by XView's <code>msgfmt</code>
  3662. for continued lines.
  3663. <p><a name="index-importing-PO-files-391"></a>Having such an explicit normalizing command allows for importing PO
  3664. files from other sources, but also eases the evolution of the current
  3665. convention, evolution driven mostly by aesthetic concerns, as of now.
  3666. It is easy to make suggested adjustments at a later time, as the
  3667. normalizing command and eventually, other GNU <code>gettext</code> tools
  3668. should greatly automate conformance. A description of the canonical
  3669. string format is given below, for the particular benefit of those not
  3670. having Emacs handy, and who would nevertheless want to handcraft
  3671. their PO files in nice ways.
  3672. <p><a name="index-multi_002dline-strings-392"></a>Right now, in PO mode, strings are single line or multi-line. A string
  3673. goes multi-line if and only if it has <em>embedded</em> newlines, that
  3674. is, if it matches &lsquo;<samp><span class="samp">[^\n]\n+[^\n]</span></samp>&rsquo;. So, we would have:
  3675. <pre class="example"> msgstr "\n\nHello, world!\n\n\n"
  3676. </pre>
  3677. <p>but, replacing the space by a newline, this becomes:
  3678. <pre class="example"> msgstr ""
  3679. "\n"
  3680. "\n"
  3681. "Hello,\n"
  3682. "world!\n"
  3683. "\n"
  3684. "\n"
  3685. </pre>
  3686. <p>We are deliberately using a caricatural example, here, to make the
  3687. point clearer. Usually, multi-lines are not that bad looking.
  3688. It is probable that we will implement the following suggestion.
  3689. We might lump together all initial newlines into the empty string,
  3690. and also all newlines introducing empty lines (that is, for <var>n</var>&nbsp;&gt;&nbsp;1<!-- /@w -->, the <var>n</var>-1'th last newlines would go together on a separate
  3691. string), so making the previous example appear:
  3692. <pre class="example"> msgstr "\n\n"
  3693. "Hello,\n"
  3694. "world!\n"
  3695. "\n\n"
  3696. </pre>
  3697. <p>There are a few yet undecided little points about string normalization,
  3698. to be documented in this manual, once these questions settle.
  3699. <div class="node">
  3700. <a name="Translated-Entries"></a>
  3701. <p><hr>
  3702. Next:&nbsp;<a rel="next" accesskey="n" href="#Fuzzy-Entries">Fuzzy Entries</a>,
  3703. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Normalizing">Normalizing</a>,
  3704. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3705. </div>
  3706. <h4 class="subsection">8.3.5 Translated Entries</h4>
  3707. <p><a name="index-translated-entries-393"></a>
  3708. Each PO file entry for which the <code>msgstr</code> field has been filled with
  3709. a translation, and which is not marked as fuzzy (see <a href="#Fuzzy-Entries">Fuzzy Entries</a>),
  3710. is said to be a <dfn>translated</dfn> entry. Only translated entries will
  3711. later be compiled by GNU <code>msgfmt</code> and become usable in programs.
  3712. Other entry types will be excluded; translation will not occur for them.
  3713. <p><a name="index-moving-by-translated-entries-394"></a>Some commands are more specifically related to translated entry processing.
  3714. <dl>
  3715. <dt><kbd>t</kbd><dd><a name="index-t_0040r_007b_002c-PO-Mode-command_007d-395"></a>Find the next translated entry (<code>po-next-translated-entry</code>).
  3716. <br><dt><kbd>T</kbd><dd><a name="index-T_0040r_007b_002c-PO-Mode-command_007d-396"></a>Find the previous translated entry (<code>po-previous-translated-entry</code>).
  3717. </dl>
  3718. <p><a name="index-t_0040r_007b_002c-PO-Mode-command_007d-397"></a><a name="index-po_002dnext_002dtranslated_002dentry_0040r_007b_002c-PO-Mode-command_007d-398"></a><a name="index-T_0040r_007b_002c-PO-Mode-command_007d-399"></a><a name="index-po_002dprevious_002dtranslated_002dentry_0040r_007b_002c-PO-Mode-command_007d-400"></a>The commands <kbd>t</kbd> (<code>po-next-translated-entry</code>) and <kbd>T</kbd>
  3719. (<code>po-previous-translated-entry</code>) move forwards or backwards, chasing
  3720. for an translated entry. If none is found, the search is extended and
  3721. wraps around in the PO file buffer.
  3722. <p><a name="index-po_002dauto_002dfuzzy_002don_002dedit_0040r_007b_002c-PO-Mode-variable_007d-401"></a>Translated entries usually result from the translator having edited in
  3723. a translation for them, <a href="#Modifying-Translations">Modifying Translations</a>. However, if the
  3724. variable <code>po-auto-fuzzy-on-edit</code> is not <code>nil</code>, the entry having
  3725. received a new translation first becomes a fuzzy entry, which ought to
  3726. be later unfuzzied before becoming an official, genuine translated entry.
  3727. See <a href="#Fuzzy-Entries">Fuzzy Entries</a>.
  3728. <div class="node">
  3729. <a name="Fuzzy-Entries"></a>
  3730. <p><hr>
  3731. Next:&nbsp;<a rel="next" accesskey="n" href="#Untranslated-Entries">Untranslated Entries</a>,
  3732. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Translated-Entries">Translated Entries</a>,
  3733. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3734. </div>
  3735. <h4 class="subsection">8.3.6 Fuzzy Entries</h4>
  3736. <p><a name="index-fuzzy-entries-402"></a>
  3737. <a name="index-attributes-of-a-PO-file-entry-403"></a><a name="index-attribute_002c-fuzzy-404"></a>Each PO file entry may have a set of <dfn>attributes</dfn>, which are
  3738. qualities given a name and explicitly associated with the translation,
  3739. using a special system comment. One of these attributes
  3740. has the name <code>fuzzy</code>, and entries having this attribute are said
  3741. to have a fuzzy translation. They are called fuzzy entries, for short.
  3742. <p>Fuzzy entries, even if they account for translated entries for
  3743. most other purposes, usually call for revision by the translator.
  3744. Those may be produced by applying the program <code>msgmerge</code> to
  3745. update an older translated PO files according to a new PO template
  3746. file, when this tool hypothesises that some new <code>msgid</code> has
  3747. been modified only slightly out of an older one, and chooses to pair
  3748. what it thinks to be the old translation for the new modified entry.
  3749. The slight alteration in the original string (the <code>msgid</code> string)
  3750. should often be reflected in the translated string, and this requires
  3751. the intervention of the translator. For this reason, <code>msgmerge</code>
  3752. might mark some entries as being fuzzy.
  3753. <p><a name="index-moving-by-fuzzy-entries-405"></a>Also, the translator may decide herself to mark an entry as fuzzy
  3754. for her own convenience, when she wants to remember that the entry
  3755. has to be later revisited. So, some commands are more specifically
  3756. related to fuzzy entry processing.
  3757. <dl>
  3758. <dt><kbd>f</kbd><dd><a name="index-f_0040r_007b_002c-PO-Mode-command_007d-406"></a><!-- better append "-entry" all the time. -ke- -->
  3759. Find the next fuzzy entry (<code>po-next-fuzzy-entry</code>).
  3760. <br><dt><kbd>F</kbd><dd><a name="index-F_0040r_007b_002c-PO-Mode-command_007d-407"></a>Find the previous fuzzy entry (<code>po-previous-fuzzy-entry</code>).
  3761. <br><dt><kbd>&lt;TAB&gt;</kbd><dd><a name="index-TAB_0040r_007b_002c-PO-Mode-command_007d-408"></a>Remove the fuzzy attribute of the current entry (<code>po-unfuzzy</code>).
  3762. </dl>
  3763. <p><a name="index-f_0040r_007b_002c-PO-Mode-command_007d-409"></a><a name="index-po_002dnext_002dfuzzy_002dentry_0040r_007b_002c-PO-Mode-command_007d-410"></a><a name="index-F_0040r_007b_002c-PO-Mode-command_007d-411"></a><a name="index-po_002dprevious_002dfuzzy_002dentry_0040r_007b_002c-PO-Mode-command_007d-412"></a>The commands <kbd>f</kbd> (<code>po-next-fuzzy-entry</code>) and <kbd>F</kbd>
  3764. (<code>po-previous-fuzzy-entry</code>) move forwards or backwards, chasing for
  3765. a fuzzy entry. If none is found, the search is extended and wraps
  3766. around in the PO file buffer.
  3767. <p><a name="index-TAB_0040r_007b_002c-PO-Mode-command_007d-413"></a><a name="index-po_002dunfuzzy_0040r_007b_002c-PO-Mode-command_007d-414"></a><a name="index-po_002dauto_002dselect_002don_002dunfuzzy_0040r_007b_002c-PO-Mode-variable_007d-415"></a>The command <kbd>&lt;TAB&gt;</kbd> (<code>po-unfuzzy</code>) removes the fuzzy
  3768. attribute associated with an entry, usually leaving it translated.
  3769. Further, if the variable <code>po-auto-select-on-unfuzzy</code> has not
  3770. the <code>nil</code> value, the <kbd>&lt;TAB&gt;</kbd> command will automatically chase
  3771. for another interesting entry to work on. The initial value of
  3772. <code>po-auto-select-on-unfuzzy</code> is <code>nil</code>.
  3773. <p>The initial value of <code>po-auto-fuzzy-on-edit</code> is <code>nil</code>. However,
  3774. if the variable <code>po-auto-fuzzy-on-edit</code> is set to <code>t</code>, any entry
  3775. edited through the <kbd>&lt;RET&gt;</kbd> command is marked fuzzy, as a way to
  3776. ensure some kind of double check, later. In this case, the usual paradigm
  3777. is that an entry becomes fuzzy (if not already) whenever the translator
  3778. modifies it. If she is satisfied with the translation, she then uses
  3779. <kbd>&lt;TAB&gt;</kbd> to pick another entry to work on, clearing the fuzzy attribute
  3780. on the same blow. If she is not satisfied yet, she merely uses <kbd>&lt;SPC&gt;</kbd>
  3781. to chase another entry, leaving the entry fuzzy.
  3782. <p><a name="index-DEL_0040r_007b_002c-PO-Mode-command_007d-416"></a><a name="index-po_002dfade_002dout_002dentry_0040r_007b_002c-PO-Mode-command_007d-417"></a>The translator may also use the <kbd>&lt;DEL&gt;</kbd> command
  3783. (<code>po-fade-out-entry</code>) over any translated entry to mark it as being
  3784. fuzzy, when she wants to easily leave a trace she wants to later return
  3785. working at this entry.
  3786. <p>Also, when time comes to quit working on a PO file buffer with the <kbd>q</kbd>
  3787. command, the translator is asked for confirmation, if fuzzy string
  3788. still exists.
  3789. <div class="node">
  3790. <a name="Untranslated-Entries"></a>
  3791. <p><hr>
  3792. Next:&nbsp;<a rel="next" accesskey="n" href="#Obsolete-Entries">Obsolete Entries</a>,
  3793. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Fuzzy-Entries">Fuzzy Entries</a>,
  3794. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3795. </div>
  3796. <h4 class="subsection">8.3.7 Untranslated Entries</h4>
  3797. <p><a name="index-untranslated-entries-418"></a>
  3798. When <code>xgettext</code> originally creates a PO file, unless told
  3799. otherwise, it initializes the <code>msgid</code> field with the untranslated
  3800. string, and leaves the <code>msgstr</code> string to be empty. Such entries,
  3801. having an empty translation, are said to be <dfn>untranslated</dfn> entries.
  3802. Later, when the programmer slightly modifies some string right in
  3803. the program, this change is later reflected in the PO file
  3804. by the appearance of a new untranslated entry for the modified string.
  3805. <p>The usual commands moving from entry to entry consider untranslated
  3806. entries on the same level as active entries. Untranslated entries
  3807. are easily recognizable by the fact they end with &lsquo;<samp><span class="samp">msgstr&nbsp;""</span></samp>&rsquo;<!-- /@w -->.
  3808. <p><a name="index-moving-by-untranslated-entries-419"></a>The work of the translator might be (quite naively) seen as the process
  3809. of seeking for an untranslated entry, editing a translation for
  3810. it, and repeating these actions until no untranslated entries remain.
  3811. Some commands are more specifically related to untranslated entry
  3812. processing.
  3813. <dl>
  3814. <dt><kbd>u</kbd><dd><a name="index-u_0040r_007b_002c-PO-Mode-command_007d-420"></a>Find the next untranslated entry (<code>po-next-untranslated-entry</code>).
  3815. <br><dt><kbd>U</kbd><dd><a name="index-U_0040r_007b_002c-PO-Mode-command_007d-421"></a>Find the previous untranslated entry (<code>po-previous-untransted-entry</code>).
  3816. <br><dt><kbd>k</kbd><dd><a name="index-k_0040r_007b_002c-PO-Mode-command_007d-422"></a>Turn the current entry into an untranslated one (<code>po-kill-msgstr</code>).
  3817. </dl>
  3818. <p><a name="index-u_0040r_007b_002c-PO-Mode-command_007d-423"></a><a name="index-po_002dnext_002duntranslated_002dentry_0040r_007b_002c-PO-Mode-command_007d-424"></a><a name="index-U_0040r_007b_002c-PO-Mode-command_007d-425"></a><a name="index-po_002dprevious_002duntransted_002dentry_0040r_007b_002c-PO-Mode-command_007d-426"></a>The commands <kbd>u</kbd> (<code>po-next-untranslated-entry</code>) and <kbd>U</kbd>
  3819. (<code>po-previous-untransted-entry</code>) move forwards or backwards,
  3820. chasing for an untranslated entry. If none is found, the search is
  3821. extended and wraps around in the PO file buffer.
  3822. <p><a name="index-k_0040r_007b_002c-PO-Mode-command_007d-427"></a><a name="index-po_002dkill_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-428"></a>An entry can be turned back into an untranslated entry by
  3823. merely emptying its translation, using the command <kbd>k</kbd>
  3824. (<code>po-kill-msgstr</code>). See <a href="#Modifying-Translations">Modifying Translations</a>.
  3825. <p>Also, when time comes to quit working on a PO file buffer
  3826. with the <kbd>q</kbd> command, the translator is asked for confirmation,
  3827. if some untranslated string still exists.
  3828. <div class="node">
  3829. <a name="Obsolete-Entries"></a>
  3830. <p><hr>
  3831. Next:&nbsp;<a rel="next" accesskey="n" href="#Modifying-Translations">Modifying Translations</a>,
  3832. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Untranslated-Entries">Untranslated Entries</a>,
  3833. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3834. </div>
  3835. <h4 class="subsection">8.3.8 Obsolete Entries</h4>
  3836. <p><a name="index-obsolete-entries-429"></a>
  3837. By <dfn>obsolete</dfn> PO file entries, we mean those entries which are
  3838. commented out, usually by <code>msgmerge</code> when it found that the
  3839. translation is not needed anymore by the package being localized.
  3840. <p>The usual commands moving from entry to entry consider obsolete
  3841. entries on the same level as active entries. Obsolete entries are
  3842. easily recognizable by the fact that all their lines start with
  3843. <code>#</code>, even those lines containing <code>msgid</code> or <code>msgstr</code>.
  3844. <p>Commands exist for emptying the translation or reinitializing it
  3845. to the original untranslated string. Commands interfacing with the
  3846. kill ring may force some previously saved text into the translation.
  3847. The user may interactively edit the translation. All these commands
  3848. may apply to obsolete entries, carefully leaving the entry obsolete
  3849. after the fact.
  3850. <p><a name="index-moving-by-obsolete-entries-430"></a>Moreover, some commands are more specifically related to obsolete
  3851. entry processing.
  3852. <dl>
  3853. <dt><kbd>o</kbd><dd><a name="index-o_0040r_007b_002c-PO-Mode-command_007d-431"></a>Find the next obsolete entry (<code>po-next-obsolete-entry</code>).
  3854. <br><dt><kbd>O</kbd><dd><a name="index-O_0040r_007b_002c-PO-Mode-command_007d-432"></a>Find the previous obsolete entry (<code>po-previous-obsolete-entry</code>).
  3855. <br><dt><kbd>&lt;DEL&gt;</kbd><dd><a name="index-DEL_0040r_007b_002c-PO-Mode-command_007d-433"></a>Make an active entry obsolete, or zap out an obsolete entry
  3856. (<code>po-fade-out-entry</code>).
  3857. </dl>
  3858. <p><a name="index-o_0040r_007b_002c-PO-Mode-command_007d-434"></a><a name="index-po_002dnext_002dobsolete_002dentry_0040r_007b_002c-PO-Mode-command_007d-435"></a><a name="index-O_0040r_007b_002c-PO-Mode-command_007d-436"></a><a name="index-po_002dprevious_002dobsolete_002dentry_0040r_007b_002c-PO-Mode-command_007d-437"></a>The commands <kbd>o</kbd> (<code>po-next-obsolete-entry</code>) and <kbd>O</kbd>
  3859. (<code>po-previous-obsolete-entry</code>) move forwards or backwards,
  3860. chasing for an obsolete entry. If none is found, the search is
  3861. extended and wraps around in the PO file buffer.
  3862. <p>PO mode does not provide ways for un-commenting an obsolete entry
  3863. and making it active, because this would reintroduce an original
  3864. untranslated string which does not correspond to any marked string
  3865. in the program sources. This goes with the philosophy of never
  3866. introducing useless <code>msgid</code> values.
  3867. <p><a name="index-DEL_0040r_007b_002c-PO-Mode-command_007d-438"></a><a name="index-po_002dfade_002dout_002dentry_0040r_007b_002c-PO-Mode-command_007d-439"></a><a name="index-obsolete-active-entry-440"></a><a name="index-comment-out-PO-file-entry-441"></a>However, it is possible to comment out an active entry, so making
  3868. it obsolete. GNU <code>gettext</code> utilities will later react to the
  3869. disappearance of a translation by using the untranslated string.
  3870. The command <kbd>&lt;DEL&gt;</kbd> (<code>po-fade-out-entry</code>) pushes the current entry
  3871. a little further towards annihilation. If the entry is active (it is a
  3872. translated entry), then it is first made fuzzy. If it is already fuzzy,
  3873. then the entry is merely commented out, with confirmation. If the entry
  3874. is already obsolete, then it is completely deleted from the PO file.
  3875. It is easy to recycle the translation so deleted into some other PO file
  3876. entry, usually one which is untranslated. See <a href="#Modifying-Translations">Modifying Translations</a>.
  3877. <p>Here is a quite interesting problem to solve for later development of
  3878. PO mode, for those nights you are not sleepy. The idea would be that
  3879. PO mode might become bright enough, one of these days, to make good
  3880. guesses at retrieving the most probable candidate, among all obsolete
  3881. entries, for initializing the translation of a newly appeared string.
  3882. I think it might be a quite hard problem to do this algorithmically, as
  3883. we have to develop good and efficient measures of string similarity.
  3884. Right now, PO mode completely lets the decision to the translator,
  3885. when the time comes to find the adequate obsolete translation, it
  3886. merely tries to provide handy tools for helping her to do so.
  3887. <div class="node">
  3888. <a name="Modifying-Translations"></a>
  3889. <p><hr>
  3890. Next:&nbsp;<a rel="next" accesskey="n" href="#Modifying-Comments">Modifying Comments</a>,
  3891. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Obsolete-Entries">Obsolete Entries</a>,
  3892. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  3893. </div>
  3894. <h4 class="subsection">8.3.9 Modifying Translations</h4>
  3895. <p><a name="index-editing-translations-442"></a><a name="index-editing-translations-443"></a>
  3896. PO mode prevents direct modification of the PO file, by the usual
  3897. means Emacs gives for altering a buffer's contents. By doing so,
  3898. it pretends helping the translator to avoid little clerical errors
  3899. about the overall file format, or the proper quoting of strings,
  3900. as those errors would be easily made. Other kinds of errors are
  3901. still possible, but some may be caught and diagnosed by the batch
  3902. validation process, which the translator may always trigger by the
  3903. <kbd>V</kbd> command. For all other errors, the translator has to rely on
  3904. her own judgment, and also on the linguistic reports submitted to her
  3905. by the users of the translated package, having the same mother tongue.
  3906. <p>When the time comes to create a translation, correct an error diagnosed
  3907. mechanically or reported by a user, the translators have to resort to
  3908. using the following commands for modifying the translations.
  3909. <dl>
  3910. <dt><kbd>&lt;RET&gt;</kbd><dd><a name="index-RET_0040r_007b_002c-PO-Mode-command_007d-444"></a>Interactively edit the translation (<code>po-edit-msgstr</code>).
  3911. <br><dt><kbd>&lt;LFD&gt;</kbd><dt><kbd>C-j</kbd><dd><a name="index-LFD_0040r_007b_002c-PO-Mode-command_007d-445"></a><a name="index-C_002dj_0040r_007b_002c-PO-Mode-command_007d-446"></a>Reinitialize the translation with the original, untranslated string
  3912. (<code>po-msgid-to-msgstr</code>).
  3913. <br><dt><kbd>k</kbd><dd><a name="index-k_0040r_007b_002c-PO-Mode-command_007d-447"></a>Save the translation on the kill ring, and delete it (<code>po-kill-msgstr</code>).
  3914. <br><dt><kbd>w</kbd><dd><a name="index-w_0040r_007b_002c-PO-Mode-command_007d-448"></a>Save the translation on the kill ring, without deleting it
  3915. (<code>po-kill-ring-save-msgstr</code>).
  3916. <br><dt><kbd>y</kbd><dd><a name="index-y_0040r_007b_002c-PO-Mode-command_007d-449"></a>Replace the translation, taking the new from the kill ring
  3917. (<code>po-yank-msgstr</code>).
  3918. </dl>
  3919. <p><a name="index-RET_0040r_007b_002c-PO-Mode-command_007d-450"></a><a name="index-po_002dedit_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-451"></a>The command <kbd>&lt;RET&gt;</kbd> (<code>po-edit-msgstr</code>) opens a new Emacs
  3920. window meant to edit in a new translation, or to modify an already existing
  3921. translation. The new window contains a copy of the translation taken from
  3922. the current PO file entry, all ready for edition, expunged of all quoting
  3923. marks, fully modifiable and with the complete extent of Emacs modifying
  3924. commands. When the translator is done with her modifications, she may use
  3925. <kbd>C-c&nbsp;C-c</kbd><!-- /@w --> to close the subedit window with the automatically requoted
  3926. results, or <kbd>C-c&nbsp;C-k</kbd><!-- /@w --> to abort her modifications. See <a href="#Subedit">Subedit</a>,
  3927. for more information.
  3928. <p><a name="index-LFD_0040r_007b_002c-PO-Mode-command_007d-452"></a><a name="index-C_002dj_0040r_007b_002c-PO-Mode-command_007d-453"></a><a name="index-po_002dmsgid_002dto_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-454"></a>The command <kbd>&lt;LFD&gt;</kbd> (<code>po-msgid-to-msgstr</code>) initializes, or
  3929. reinitializes the translation with the original string. This command is
  3930. normally used when the translator wants to redo a fresh translation of
  3931. the original string, disregarding any previous work.
  3932. <p><a name="index-po_002dauto_002dedit_002dwith_002dmsgid_0040r_007b_002c-PO-Mode-variable_007d-455"></a>It is possible to arrange so, whenever editing an untranslated
  3933. entry, the <kbd>&lt;LFD&gt;</kbd> command be automatically executed. If you set
  3934. <code>po-auto-edit-with-msgid</code> to <code>t</code>, the translation gets
  3935. initialised with the original string, in case none exists already.
  3936. The default value for <code>po-auto-edit-with-msgid</code> is <code>nil</code>.
  3937. <p><a name="index-starting-a-string-translation-456"></a>In fact, whether it is best to start a translation with an empty
  3938. string, or rather with a copy of the original string, is a matter of
  3939. taste or habit. Sometimes, the source language and the
  3940. target language are so different that is simply best to start writing
  3941. on an empty page. At other times, the source and target languages
  3942. are so close that it would be a waste to retype a number of words
  3943. already being written in the original string. A translator may also
  3944. like having the original string right under her eyes, as she will
  3945. progressively overwrite the original text with the translation, even
  3946. if this requires some extra editing work to get rid of the original.
  3947. <p><a name="index-cut-and-paste-for-translated-strings-457"></a><a name="index-k_0040r_007b_002c-PO-Mode-command_007d-458"></a><a name="index-po_002dkill_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-459"></a><a name="index-w_0040r_007b_002c-PO-Mode-command_007d-460"></a><a name="index-po_002dkill_002dring_002dsave_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-461"></a>The command <kbd>k</kbd> (<code>po-kill-msgstr</code>) merely empties the
  3948. translation string, so turning the entry into an untranslated
  3949. one. But while doing so, its previous contents is put apart in
  3950. a special place, known as the kill ring. The command <kbd>w</kbd>
  3951. (<code>po-kill-ring-save-msgstr</code>) has also the effect of taking a
  3952. copy of the translation onto the kill ring, but it otherwise leaves
  3953. the entry alone, and does <em>not</em> remove the translation from the
  3954. entry. Both commands use exactly the Emacs kill ring, which is shared
  3955. between buffers, and which is well known already to Emacs lovers.
  3956. <p>The translator may use <kbd>k</kbd> or <kbd>w</kbd> many times in the course
  3957. of her work, as the kill ring may hold several saved translations.
  3958. From the kill ring, strings may later be reinserted in various
  3959. Emacs buffers. In particular, the kill ring may be used for moving
  3960. translation strings between different entries of a single PO file
  3961. buffer, or if the translator is handling many such buffers at once,
  3962. even between PO files.
  3963. <p>To facilitate exchanges with buffers which are not in PO mode, the
  3964. translation string put on the kill ring by the <kbd>k</kbd> command is fully
  3965. unquoted before being saved: external quotes are removed, multi-line
  3966. strings are concatenated, and backslash escaped sequences are turned
  3967. into their corresponding characters. In the special case of obsolete
  3968. entries, the translation is also uncommented prior to saving.
  3969. <p><a name="index-y_0040r_007b_002c-PO-Mode-command_007d-462"></a><a name="index-po_002dyank_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-463"></a>The command <kbd>y</kbd> (<code>po-yank-msgstr</code>) completely replaces the
  3970. translation of the current entry by a string taken from the kill ring.
  3971. Following Emacs terminology, we then say that the replacement
  3972. string is <dfn>yanked</dfn> into the PO file buffer.
  3973. See <a href="emacs.html#Yanking">Yanking</a>.
  3974. The first time <kbd>y</kbd> is used, the translation receives the value of
  3975. the most recent addition to the kill ring. If <kbd>y</kbd> is typed once
  3976. again, immediately, without intervening keystrokes, the translation
  3977. just inserted is taken away and replaced by the second most recent
  3978. addition to the kill ring. By repeating <kbd>y</kbd> many times in a row,
  3979. the translator may travel along the kill ring for saved strings,
  3980. until she finds the string she really wanted.
  3981. <p>When a string is yanked into a PO file entry, it is fully and
  3982. automatically requoted for complying with the format PO files should
  3983. have. Further, if the entry is obsolete, PO mode then appropriately
  3984. push the inserted string inside comments. Once again, translators
  3985. should not burden themselves with quoting considerations besides, of
  3986. course, the necessity of the translated string itself respective to
  3987. the program using it.
  3988. <p>Note that <kbd>k</kbd> or <kbd>w</kbd> are not the only commands pushing strings
  3989. on the kill ring, as almost any PO mode command replacing translation
  3990. strings (or the translator comments) automatically saves the old string
  3991. on the kill ring. The main exceptions to this general rule are the
  3992. yanking commands themselves.
  3993. <p><a name="index-using-obsolete-translations-to-make-new-entries-464"></a>To better illustrate the operation of killing and yanking, let's
  3994. use an actual example, taken from a common situation. When the
  3995. programmer slightly modifies some string right in the program, his
  3996. change is later reflected in the PO file by the appearance
  3997. of a new untranslated entry for the modified string, and the fact
  3998. that the entry translating the original or unmodified string becomes
  3999. obsolete. In many cases, the translator might spare herself some work
  4000. by retrieving the unmodified translation from the obsolete entry,
  4001. then initializing the untranslated entry <code>msgstr</code> field with
  4002. this retrieved translation. Once this done, the obsolete entry is
  4003. not wanted anymore, and may be safely deleted.
  4004. <p>When the translator finds an untranslated entry and suspects that a
  4005. slight variant of the translation exists, she immediately uses <kbd>m</kbd>
  4006. to mark the current entry location, then starts chasing obsolete
  4007. entries with <kbd>o</kbd>, hoping to find some translation corresponding
  4008. to the unmodified string. Once found, she uses the <kbd>&lt;DEL&gt;</kbd> command
  4009. for deleting the obsolete entry, knowing that <kbd>&lt;DEL&gt;</kbd> also <em>kills</em>
  4010. the translation, that is, pushes the translation on the kill ring.
  4011. Then, <kbd>r</kbd> returns to the initial untranslated entry, and <kbd>y</kbd>
  4012. then <em>yanks</em> the saved translation right into the <code>msgstr</code>
  4013. field. The translator is then free to use <kbd>&lt;RET&gt;</kbd> for fine
  4014. tuning the translation contents, and maybe to later use <kbd>u</kbd>,
  4015. then <kbd>m</kbd> again, for going on with the next untranslated string.
  4016. <p>When some sequence of keys has to be typed over and over again, the
  4017. translator may find it useful to become better acquainted with the Emacs
  4018. capability of learning these sequences and playing them back under request.
  4019. See <a href="emacs.html#Keyboard-Macros">Keyboard Macros</a>.
  4020. <div class="node">
  4021. <a name="Modifying-Comments"></a>
  4022. <p><hr>
  4023. Next:&nbsp;<a rel="next" accesskey="n" href="#Subedit">Subedit</a>,
  4024. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Modifying-Translations">Modifying Translations</a>,
  4025. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  4026. </div>
  4027. <h4 class="subsection">8.3.10 Modifying Comments</h4>
  4028. <p><a name="index-editing-comments-in-PO-files-465"></a><a name="index-editing-comments-466"></a>
  4029. Any translation work done seriously will raise many linguistic
  4030. difficulties, for which decisions have to be made, and the choices
  4031. further documented. These documents may be saved within the
  4032. PO file in form of translator comments, which the translator
  4033. is free to create, delete, or modify at will. These comments may
  4034. be useful to herself when she returns to this PO file after a while.
  4035. <p>Comments not having whitespace after the initial &lsquo;<samp><span class="samp">#</span></samp>&rsquo;, for example,
  4036. those beginning with &lsquo;<samp><span class="samp">#.</span></samp>&rsquo; or &lsquo;<samp><span class="samp">#:</span></samp>&rsquo;, are <em>not</em> translator
  4037. comments, they are exclusively created by other <code>gettext</code> tools.
  4038. So, the commands below will never alter such system added comments,
  4039. they are not meant for the translator to modify. See <a href="#PO-Files">PO Files</a>.
  4040. <p>The following commands are somewhat similar to those modifying translations,
  4041. so the general indications given for those apply here. See <a href="#Modifying-Translations">Modifying Translations</a>.
  4042. <dl>
  4043. <dt><kbd>#</kbd><dd><a name="index-g_t_0023_0040r_007b_002c-PO-Mode-command_007d-467"></a>Interactively edit the translator comments (<code>po-edit-comment</code>).
  4044. <br><dt><kbd>K</kbd><dd><a name="index-K_0040r_007b_002c-PO-Mode-command_007d-468"></a>Save the translator comments on the kill ring, and delete it
  4045. (<code>po-kill-comment</code>).
  4046. <br><dt><kbd>W</kbd><dd><a name="index-W_0040r_007b_002c-PO-Mode-command_007d-469"></a>Save the translator comments on the kill ring, without deleting it
  4047. (<code>po-kill-ring-save-comment</code>).
  4048. <br><dt><kbd>Y</kbd><dd><a name="index-Y_0040r_007b_002c-PO-Mode-command_007d-470"></a>Replace the translator comments, taking the new from the kill ring
  4049. (<code>po-yank-comment</code>).
  4050. </dl>
  4051. <p>These commands parallel PO mode commands for modifying the translation
  4052. strings, and behave much the same way as they do, except that they handle
  4053. this part of PO file comments meant for translator usage, rather
  4054. than the translation strings. So, if the descriptions given below are
  4055. slightly succinct, it is because the full details have already been given.
  4056. See <a href="#Modifying-Translations">Modifying Translations</a>.
  4057. <p><a name="index-g_t_0023_0040r_007b_002c-PO-Mode-command_007d-471"></a><a name="index-po_002dedit_002dcomment_0040r_007b_002c-PO-Mode-command_007d-472"></a>The command <kbd>#</kbd> (<code>po-edit-comment</code>) opens a new Emacs window
  4058. containing a copy of the translator comments on the current PO file entry.
  4059. If there are no such comments, PO mode understands that the translator wants
  4060. to add a comment to the entry, and she is presented with an empty screen.
  4061. Comment marks (<code>#</code>) and the space following them are automatically
  4062. removed before edition, and reinstated after. For translator comments
  4063. pertaining to obsolete entries, the uncommenting and recommenting operations
  4064. are done twice. Once in the editing window, the keys <kbd>C-c&nbsp;C-c</kbd><!-- /@w -->
  4065. allow the translator to tell she is finished with editing the comment.
  4066. See <a href="#Subedit">Subedit</a>, for further details.
  4067. <p><a name="index-po_002dsubedit_002dmode_002dhook_0040r_007b_002c-PO-Mode-variable_007d-473"></a>Functions found on <code>po-subedit-mode-hook</code>, if any, are executed after
  4068. the string has been inserted in the edit buffer.
  4069. <p><a name="index-K_0040r_007b_002c-PO-Mode-command_007d-474"></a><a name="index-po_002dkill_002dcomment_0040r_007b_002c-PO-Mode-command_007d-475"></a><a name="index-W_0040r_007b_002c-PO-Mode-command_007d-476"></a><a name="index-po_002dkill_002dring_002dsave_002dcomment_0040r_007b_002c-PO-Mode-command_007d-477"></a><a name="index-Y_0040r_007b_002c-PO-Mode-command_007d-478"></a><a name="index-po_002dyank_002dcomment_0040r_007b_002c-PO-Mode-command_007d-479"></a>The command <kbd>K</kbd> (<code>po-kill-comment</code>) gets rid of all
  4070. translator comments, while saving those comments on the kill ring.
  4071. The command <kbd>W</kbd> (<code>po-kill-ring-save-comment</code>) takes
  4072. a copy of the translator comments on the kill ring, but leaves
  4073. them undisturbed in the current entry. The command <kbd>Y</kbd>
  4074. (<code>po-yank-comment</code>) completely replaces the translator comments
  4075. by a string taken at the front of the kill ring. When this command
  4076. is immediately repeated, the comments just inserted are withdrawn,
  4077. and replaced by other strings taken along the kill ring.
  4078. <p>On the kill ring, all strings have the same nature. There is no
  4079. distinction between <em>translation</em> strings and <em>translator
  4080. comments</em> strings. So, for example, let's presume the translator
  4081. has just finished editing a translation, and wants to create a new
  4082. translator comment to document why the previous translation was
  4083. not good, just to remember what was the problem. Foreseeing that she
  4084. will do that in her documentation, the translator may want to quote
  4085. the previous translation in her translator comments. To do so, she
  4086. may initialize the translator comments with the previous translation,
  4087. still at the head of the kill ring. Because editing already pushed the
  4088. previous translation on the kill ring, she merely has to type <kbd>M-w</kbd>
  4089. prior to <kbd>#</kbd>, and the previous translation will be right there,
  4090. all ready for being introduced by some explanatory text.
  4091. <p>On the other hand, presume there are some translator comments already
  4092. and that the translator wants to add to those comments, instead
  4093. of wholly replacing them. Then, she should edit the comment right
  4094. away with <kbd>#</kbd>. Once inside the editing window, she can use the
  4095. regular Emacs commands <kbd>C-y</kbd> (<code>yank</code>) and <kbd>M-y</kbd>
  4096. (<code>yank-pop</code>) to get the previous translation where she likes.
  4097. <div class="node">
  4098. <a name="Subedit"></a>
  4099. <p><hr>
  4100. Next:&nbsp;<a rel="next" accesskey="n" href="#C-Sources-Context">C Sources Context</a>,
  4101. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Modifying-Comments">Modifying Comments</a>,
  4102. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  4103. </div>
  4104. <h4 class="subsection">8.3.11 Details of Sub Edition</h4>
  4105. <p><a name="index-subedit-minor-mode-480"></a>
  4106. The PO subedit minor mode has a few peculiarities worth being described
  4107. in fuller detail. It installs a few commands over the usual editing set
  4108. of Emacs, which are described below.
  4109. <dl>
  4110. <dt><kbd>C-c C-c</kbd><dd><a name="index-C_002dc-C_002dc_0040r_007b_002c-PO-Mode-command_007d-481"></a>Complete edition (<code>po-subedit-exit</code>).
  4111. <br><dt><kbd>C-c C-k</kbd><dd><a name="index-C_002dc-C_002dk_0040r_007b_002c-PO-Mode-command_007d-482"></a>Abort edition (<code>po-subedit-abort</code>).
  4112. <br><dt><kbd>C-c C-a</kbd><dd><a name="index-C_002dc-C_002da_0040r_007b_002c-PO-Mode-command_007d-483"></a>Consult auxiliary PO files (<code>po-subedit-cycle-auxiliary</code>).
  4113. </dl>
  4114. <p><a name="index-exiting-PO-subedit-484"></a><a name="index-C_002dc-C_002dc_0040r_007b_002c-PO-Mode-command_007d-485"></a><a name="index-po_002dsubedit_002dexit_0040r_007b_002c-PO-Mode-command_007d-486"></a>The window's contents represents a translation for a given message,
  4115. or a translator comment. The translator may modify this window to
  4116. her heart's content. Once this is done, the command <kbd>C-c&nbsp;C-c</kbd><!-- /@w -->
  4117. (<code>po-subedit-exit</code>) may be used to return the edited translation into
  4118. the PO file, replacing the original translation, even if it moved out of
  4119. sight or if buffers were switched.
  4120. <p><a name="index-C_002dc-C_002dk_0040r_007b_002c-PO-Mode-command_007d-487"></a><a name="index-po_002dsubedit_002dabort_0040r_007b_002c-PO-Mode-command_007d-488"></a>If the translator becomes unsatisfied with her translation or comment,
  4121. to the extent she prefers keeping what was existent prior to the
  4122. <kbd>&lt;RET&gt;</kbd> or <kbd>#</kbd> command, she may use the command <kbd>C-c&nbsp;C-k</kbd><!-- /@w -->
  4123. (<code>po-subedit-abort</code>) to merely get rid of edition, while preserving
  4124. the original translation or comment. Another way would be for her to exit
  4125. normally with <kbd>C-c&nbsp;C-c</kbd><!-- /@w -->, then type <code>U</code> once for undoing the
  4126. whole effect of last edition.
  4127. <p><a name="index-C_002dc-C_002da_0040r_007b_002c-PO-Mode-command_007d-489"></a><a name="index-po_002dsubedit_002dcycle_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-490"></a>The command <kbd>C-c&nbsp;C-a</kbd><!-- /@w --> (<code>po-subedit-cycle-auxiliary</code>)
  4128. allows for glancing through translations
  4129. already achieved in other languages, directly while editing the current
  4130. translation. This may be quite convenient when the translator is fluent
  4131. at many languages, but of course, only makes sense when such completed
  4132. auxiliary PO files are already available to her (see <a href="#Auxiliary">Auxiliary</a>).
  4133. <p>Functions found on <code>po-subedit-mode-hook</code>, if any, are executed after
  4134. the string has been inserted in the edit buffer.
  4135. <p>While editing her translation, the translator should pay attention to not
  4136. inserting unwanted <kbd>&lt;RET&gt;</kbd> (newline) characters at the end of
  4137. the translated string if those are not meant to be there, or to removing
  4138. such characters when they are required. Since these characters are not
  4139. visible in the editing buffer, they are easily introduced by mistake.
  4140. To help her, <kbd>&lt;RET&gt;</kbd> automatically puts the character <code>&lt;</code>
  4141. at the end of the string being edited, but this <code>&lt;</code> is not really
  4142. part of the string. On exiting the editing window with <kbd>C-c&nbsp;C-c</kbd><!-- /@w -->,
  4143. PO mode automatically removes such <kbd>&lt;</kbd> and all whitespace added after
  4144. it. If the translator adds characters after the terminating <code>&lt;</code>, it
  4145. looses its delimiting property and integrally becomes part of the string.
  4146. If she removes the delimiting <code>&lt;</code>, then the edited string is taken
  4147. <em>as is</em>, with all trailing newlines, even if invisible. Also, if
  4148. the translated string ought to end itself with a genuine <code>&lt;</code>, then
  4149. the delimiting <code>&lt;</code> may not be removed; so the string should appear,
  4150. in the editing window, as ending with two <code>&lt;</code> in a row.
  4151. <p><a name="index-editing-multiple-entries-491"></a>When a translation (or a comment) is being edited, the translator may move
  4152. the cursor back into the PO file buffer and freely move to other entries,
  4153. browsing at will. If, with an edition pending, the translator wanders in the
  4154. PO file buffer, she may decide to start modifying another entry. Each entry
  4155. being edited has its own subedit buffer. It is possible to simultaneously
  4156. edit the translation <em>and</em> the comment of a single entry, or to
  4157. edit entries in different PO files, all at once. Typing <kbd>&lt;RET&gt;</kbd>
  4158. on a field already being edited merely resumes that particular edit. Yet,
  4159. the translator should better be comfortable at handling many Emacs windows!
  4160. <p><a name="index-pending-subedits-492"></a>Pending subedits may be completed or aborted in any order, regardless
  4161. of how or when they were started. When many subedits are pending and the
  4162. translator asks for quitting the PO file (with the <kbd>q</kbd> command), subedits
  4163. are automatically resumed one at a time, so she may decide for each of them.
  4164. <div class="node">
  4165. <a name="C-Sources-Context"></a>
  4166. <p><hr>
  4167. Next:&nbsp;<a rel="next" accesskey="n" href="#Auxiliary">Auxiliary</a>,
  4168. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Subedit">Subedit</a>,
  4169. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  4170. </div>
  4171. <h4 class="subsection">8.3.12 C Sources Context</h4>
  4172. <p><a name="index-consulting-program-sources-493"></a><a name="index-looking-at-the-source-to-aid-translation-494"></a><a name="index-use-the-source_002c-Luke-495"></a>
  4173. PO mode is particularly powerful when used with PO files
  4174. created through GNU <code>gettext</code> utilities, as those utilities
  4175. insert special comments in the PO files they generate.
  4176. Some of these special comments relate the PO file entry to
  4177. exactly where the untranslated string appears in the program sources.
  4178. <p>When the translator gets to an untranslated entry, she is fairly
  4179. often faced with an original string which is not as informative as
  4180. it normally should be, being succinct, cryptic, or otherwise ambiguous.
  4181. Before choosing how to translate the string, she needs to understand
  4182. better what the string really means and how tight the translation has
  4183. to be. Most of the time, when problems arise, the only way left to make
  4184. her judgment is looking at the true program sources from where this
  4185. string originated, searching for surrounding comments the programmer
  4186. might have put in there, and looking around for helping clues of
  4187. <em>any</em> kind.
  4188. <p>Surely, when looking at program sources, the translator will receive
  4189. more help if she is a fluent programmer. However, even if she is
  4190. not versed in programming and feels a little lost in C code, the
  4191. translator should not be shy at taking a look, once in a while.
  4192. It is most probable that she will still be able to find some of the
  4193. hints she needs. She will learn quickly to not feel uncomfortable
  4194. in program code, paying more attention to programmer's comments,
  4195. variable and function names (if he dared choosing them well), and
  4196. overall organization, than to the program code itself.
  4197. <p><a name="index-find-source-fragment-for-a-PO-file-entry-496"></a>The following commands are meant to help the translator at getting
  4198. program source context for a PO file entry.
  4199. <dl>
  4200. <dt><kbd>s</kbd><dd><a name="index-s_0040r_007b_002c-PO-Mode-command_007d-497"></a>Resume the display of a program source context, or cycle through them
  4201. (<code>po-cycle-source-reference</code>).
  4202. <br><dt><kbd>M-s</kbd><dd><a name="index-M_002ds_0040r_007b_002c-PO-Mode-command_007d-498"></a>Display of a program source context selected by menu
  4203. (<code>po-select-source-reference</code>).
  4204. <br><dt><kbd>S</kbd><dd><a name="index-S_0040r_007b_002c-PO-Mode-command_007d-499"></a>Add a directory to the search path for source files
  4205. (<code>po-consider-source-path</code>).
  4206. <br><dt><kbd>M-S</kbd><dd><a name="index-M_002dS_0040r_007b_002c-PO-Mode-command_007d-500"></a>Delete a directory from the search path for source files
  4207. (<code>po-ignore-source-path</code>).
  4208. </dl>
  4209. <p><a name="index-s_0040r_007b_002c-PO-Mode-command_007d-501"></a><a name="index-po_002dcycle_002dsource_002dreference_0040r_007b_002c-PO-Mode-command_007d-502"></a><a name="index-M_002ds_0040r_007b_002c-PO-Mode-command_007d-503"></a><a name="index-po_002dselect_002dsource_002dreference_0040r_007b_002c-PO-Mode-command_007d-504"></a>The commands <kbd>s</kbd> (<code>po-cycle-source-reference</code>) and <kbd>M-s</kbd>
  4210. (<code>po-select-source-reference</code>) both open another window displaying
  4211. some source program file, and already positioned in such a way that
  4212. it shows an actual use of the string to be translated. By doing
  4213. so, the command gives source program context for the string. But if
  4214. the entry has no source context references, or if all references
  4215. are unresolved along the search path for program sources, then the
  4216. command diagnoses this as an error.
  4217. <p>Even if <kbd>s</kbd> (or <kbd>M-s</kbd>) opens a new window, the cursor stays
  4218. in the PO file window. If the translator really wants to
  4219. get into the program source window, she ought to do it explicitly,
  4220. maybe by using command <kbd>O</kbd>.
  4221. <p>When <kbd>s</kbd> is typed for the first time, or for a PO file entry which
  4222. is different of the last one used for getting source context, then the
  4223. command reacts by giving the first context available for this entry,
  4224. if any. If some context has already been recently displayed for the
  4225. current PO file entry, and the translator wandered off to do other
  4226. things, typing <kbd>s</kbd> again will merely resume, in another window,
  4227. the context last displayed. In particular, if the translator moved
  4228. the cursor away from the context in the source file, the command will
  4229. bring the cursor back to the context. By using <kbd>s</kbd> many times
  4230. in a row, with no other commands intervening, PO mode will cycle to
  4231. the next available contexts for this particular entry, getting back
  4232. to the first context once the last has been shown.
  4233. <p>The command <kbd>M-s</kbd> behaves differently. Instead of cycling through
  4234. references, it lets the translator choose a particular reference among
  4235. many, and displays that reference. It is best used with completion,
  4236. if the translator types <kbd>&lt;TAB&gt;</kbd> immediately after <kbd>M-s</kbd>, in
  4237. response to the question, she will be offered a menu of all possible
  4238. references, as a reminder of which are the acceptable answers.
  4239. This command is useful only where there are really many contexts
  4240. available for a single string to translate.
  4241. <p><a name="index-S_0040r_007b_002c-PO-Mode-command_007d-505"></a><a name="index-po_002dconsider_002dsource_002dpath_0040r_007b_002c-PO-Mode-command_007d-506"></a><a name="index-M_002dS_0040r_007b_002c-PO-Mode-command_007d-507"></a><a name="index-po_002dignore_002dsource_002dpath_0040r_007b_002c-PO-Mode-command_007d-508"></a>Program source files are usually found relative to where the PO
  4242. file stands. As a special provision, when this fails, the file is
  4243. also looked for, but relative to the directory immediately above it.
  4244. Those two cases take proper care of most PO files. However, it might
  4245. happen that a PO file has been moved, or is edited in a different
  4246. place than its normal location. When this happens, the translator
  4247. should tell PO mode in which directory normally sits the genuine PO
  4248. file. Many such directories may be specified, and all together, they
  4249. constitute what is called the <dfn>search path</dfn> for program sources.
  4250. The command <kbd>S</kbd> (<code>po-consider-source-path</code>) is used to interactively
  4251. enter a new directory at the front of the search path, and the command
  4252. <kbd>M-S</kbd> (<code>po-ignore-source-path</code>) is used to select, with completion,
  4253. one of the directories she does not want anymore on the search path.
  4254. <div class="node">
  4255. <a name="Auxiliary"></a>
  4256. <p><hr>
  4257. Previous:&nbsp;<a rel="previous" accesskey="p" href="#C-Sources-Context">C Sources Context</a>,
  4258. Up:&nbsp;<a rel="up" accesskey="u" href="#PO-Mode">PO Mode</a>
  4259. </div>
  4260. <h4 class="subsection">8.3.13 Consulting Auxiliary PO Files</h4>
  4261. <p><a name="index-consulting-translations-to-other-languages-509"></a>
  4262. PO mode is able to help the knowledgeable translator, being fluent in
  4263. many languages, at taking advantage of translations already achieved
  4264. in other languages she just happens to know. It provides these other
  4265. language translations as additional context for her own work. Moreover,
  4266. it has features to ease the production of translations for many languages
  4267. at once, for translators preferring to work in this way.
  4268. <p><a name="index-auxiliary-PO-file-510"></a><a name="index-auxiliary-PO-file-511"></a>An <dfn>auxiliary</dfn> PO file is an existing PO file meant for the same
  4269. package the translator is working on, but targeted to a different mother
  4270. tongue language. Commands exist for declaring and handling auxiliary
  4271. PO files, and also for showing contexts for the entry under work.
  4272. <p>Here are the auxiliary file commands available in PO mode.
  4273. <dl>
  4274. <dt><kbd>a</kbd><dd><a name="index-a_0040r_007b_002c-PO-Mode-command_007d-512"></a>Seek auxiliary files for another translation for the same entry
  4275. (<code>po-cycle-auxiliary</code>).
  4276. <br><dt><kbd>C-c C-a</kbd><dd><a name="index-C_002dc-C_002da_0040r_007b_002c-PO-Mode-command_007d-513"></a>Switch to a particular auxiliary file (<code>po-select-auxiliary</code>).
  4277. <br><dt><kbd>A</kbd><dd><a name="index-A_0040r_007b_002c-PO-Mode-command_007d-514"></a>Declare this PO file as an auxiliary file (<code>po-consider-as-auxiliary</code>).
  4278. <br><dt><kbd>M-A</kbd><dd><a name="index-M_002dA_0040r_007b_002c-PO-Mode-command_007d-515"></a>Remove this PO file from the list of auxiliary files
  4279. (<code>po-ignore-as-auxiliary</code>).
  4280. </dl>
  4281. <p><a name="index-A_0040r_007b_002c-PO-Mode-command_007d-516"></a><a name="index-po_002dconsider_002das_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-517"></a><a name="index-M_002dA_0040r_007b_002c-PO-Mode-command_007d-518"></a><a name="index-po_002dignore_002das_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-519"></a>Command <kbd>A</kbd> (<code>po-consider-as-auxiliary</code>) adds the current
  4282. PO file to the list of auxiliary files, while command <kbd>M-A</kbd>
  4283. (<code>po-ignore-as-auxiliary</code> just removes it.
  4284. <p><a name="index-a_0040r_007b_002c-PO-Mode-command_007d-520"></a><a name="index-po_002dcycle_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-521"></a>The command <kbd>a</kbd> (<code>po-cycle-auxiliary</code>) seeks all auxiliary PO
  4285. files, round-robin, searching for a translated entry in some other language
  4286. having an <code>msgid</code> field identical as the one for the current entry.
  4287. The found PO file, if any, takes the place of the current PO file in
  4288. the display (its window gets on top). Before doing so, the current PO
  4289. file is also made into an auxiliary file, if not already. So, <kbd>a</kbd>
  4290. in this newly displayed PO file will seek another PO file, and so on,
  4291. so repeating <kbd>a</kbd> will eventually yield back the original PO file.
  4292. <p><a name="index-C_002dc-C_002da_0040r_007b_002c-PO-Mode-command_007d-522"></a><a name="index-po_002dselect_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-523"></a>The command <kbd>C-c C-a</kbd> (<code>po-select-auxiliary</code>) asks the translator
  4293. for her choice of a particular auxiliary file, with completion, and
  4294. then switches to that selected PO file. The command also checks if
  4295. the selected file has an <code>msgid</code> field identical as the one for
  4296. the current entry, and if yes, this entry becomes current. Otherwise,
  4297. the cursor of the selected file is left undisturbed.
  4298. <p>For all this to work fully, auxiliary PO files will have to be normalized,
  4299. in that way that <code>msgid</code> fields should be written <em>exactly</em>
  4300. the same way. It is possible to write <code>msgid</code> fields in various
  4301. ways for representing the same string, different writing would break the
  4302. proper behaviour of the auxiliary file commands of PO mode. This is not
  4303. expected to be much a problem in practice, as most existing PO files have
  4304. their <code>msgid</code> entries written by the same GNU <code>gettext</code> tools.
  4305. <p><a name="index-normalize_0040r_007b_002c-PO-Mode-command_007d-524"></a>However, PO files initially created by PO mode itself, while marking
  4306. strings in source files, are normalised differently. So are PO
  4307. files resulting of the &lsquo;<samp><span class="samp">M-x normalize</span></samp>&rsquo; command. Until these
  4308. discrepancies between PO mode and other GNU <code>gettext</code> tools get
  4309. fully resolved, the translator should stay aware of normalisation issues.
  4310. <div class="node">
  4311. <a name="Compendium"></a>
  4312. <p><hr>
  4313. Previous:&nbsp;<a rel="previous" accesskey="p" href="#PO-Mode">PO Mode</a>,
  4314. Up:&nbsp;<a rel="up" accesskey="u" href="#Editing">Editing</a>
  4315. </div>
  4316. <h3 class="section">8.4 Using Translation Compendia</h3>
  4317. <p><a name="index-using-translation-compendia-525"></a>
  4318. <a name="index-compendium-526"></a>A <dfn>compendium</dfn> is a special PO file containing a set of
  4319. translations recurring in many different packages. The translator can
  4320. use gettext tools to build a new compendium, to add entries to her
  4321. compendium, and to initialize untranslated entries, or to update
  4322. already translated entries, from translations kept in the compendium.
  4323. <ul class="menu">
  4324. <li><a accesskey="1" href="#Creating-Compendia">Creating Compendia</a>: Merging translations for later use
  4325. <li><a accesskey="2" href="#Using-Compendia">Using Compendia</a>: Using older translations if they fit
  4326. </ul>
  4327. <div class="node">
  4328. <a name="Creating-Compendia"></a>
  4329. <p><hr>
  4330. Next:&nbsp;<a rel="next" accesskey="n" href="#Using-Compendia">Using Compendia</a>,
  4331. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Compendium">Compendium</a>,
  4332. Up:&nbsp;<a rel="up" accesskey="u" href="#Compendium">Compendium</a>
  4333. </div>
  4334. <h4 class="subsection">8.4.1 Creating Compendia</h4>
  4335. <p><a name="index-creating-compendia-527"></a><a name="index-compendium_002c-creating-528"></a>
  4336. Basically every PO file consisting of translated entries only can be
  4337. declared as a valid compendium. Often the translator wants to have
  4338. special compendia; let's consider two cases: <cite>concatenating PO
  4339. files</cite> and <cite>extracting a message subset from a PO file</cite>.
  4340. <h5 class="subsubsection">8.4.1.1 Concatenate PO Files</h5>
  4341. <p><a name="index-concatenating-PO-files-into-a-compendium-529"></a><a name="index-accumulating-translations-530"></a>To concatenate several valid PO files into one compendium file you can
  4342. use &lsquo;<samp><span class="samp">msgcomm</span></samp>&rsquo; or &lsquo;<samp><span class="samp">msgcat</span></samp>&rsquo; (the latter preferred):
  4343. <pre class="example"> msgcat -o compendium.po file1.po file2.po
  4344. </pre>
  4345. <p>By default, <code>msgcat</code> will accumulate divergent translations
  4346. for the same string. Those occurrences will be marked as <code>fuzzy</code>
  4347. and highly visible decorated; calling <code>msgcat</code> on
  4348. <samp><span class="file">file1.po</span></samp>:
  4349. <pre class="example"> #: src/hello.c:200
  4350. #, c-format
  4351. msgid "Report bugs to &lt;%s&gt;.\n"
  4352. msgstr "Comunicar `bugs' a &lt;%s&gt;.\n"
  4353. </pre>
  4354. <p class="noindent">and <samp><span class="file">file2.po</span></samp>:
  4355. <pre class="example"> #: src/bye.c:100
  4356. #, c-format
  4357. msgid "Report bugs to &lt;%s&gt;.\n"
  4358. msgstr "Comunicar \"bugs\" a &lt;%s&gt;.\n"
  4359. </pre>
  4360. <p class="noindent">will result in:
  4361. <pre class="example"> #: src/hello.c:200 src/bye.c:100
  4362. #, fuzzy, c-format
  4363. msgid "Report bugs to &lt;%s&gt;.\n"
  4364. msgstr ""
  4365. "#-#-#-#-# file1.po #-#-#-#-#\n"
  4366. "Comunicar `bugs' a &lt;%s&gt;.\n"
  4367. "#-#-#-#-# file2.po #-#-#-#-#\n"
  4368. "Comunicar \"bugs\" a &lt;%s&gt;.\n"
  4369. </pre>
  4370. <p class="noindent">The translator will have to resolve this &ldquo;conflict&rdquo; manually; she
  4371. has to decide whether the first or the second version is appropriate
  4372. (or provide a new translation), to delete the &ldquo;marker lines&rdquo;, and
  4373. finally to remove the <code>fuzzy</code> mark.
  4374. <p>If the translator knows in advance the first found translation of a
  4375. message is always the best translation she can make use to the
  4376. &lsquo;<samp><span class="samp">--use-first</span></samp>&rsquo; switch:
  4377. <pre class="example"> msgcat --use-first -o compendium.po file1.po file2.po
  4378. </pre>
  4379. <p>A good compendium file must not contain <code>fuzzy</code> or untranslated
  4380. entries. If input files are &ldquo;dirty&rdquo; you must preprocess the input
  4381. files or postprocess the result using &lsquo;<samp><span class="samp">msgattrib --translated --no-fuzzy</span></samp>&rsquo;.
  4382. <h5 class="subsubsection">8.4.1.2 Extract a Message Subset from a PO File</h5>
  4383. <p><a name="index-extracting-parts-of-a-PO-file-into-a-compendium-531"></a>
  4384. Nobody wants to translate the same messages again and again; thus you
  4385. may wish to have a compendium file containing <samp><span class="file">getopt.c</span></samp> messages.
  4386. <p>To extract a message subset (e.g., all <samp><span class="file">getopt.c</span></samp> messages) from an
  4387. existing PO file into one compendium file you can use &lsquo;<samp><span class="samp">msggrep</span></samp>&rsquo;:
  4388. <pre class="example"> msggrep --location src/getopt.c -o compendium.po file.po
  4389. </pre>
  4390. <div class="node">
  4391. <a name="Using-Compendia"></a>
  4392. <p><hr>
  4393. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Creating-Compendia">Creating Compendia</a>,
  4394. Up:&nbsp;<a rel="up" accesskey="u" href="#Compendium">Compendium</a>
  4395. </div>
  4396. <h4 class="subsection">8.4.2 Using Compendia</h4>
  4397. <p>You can use a compendium file to initialize a translation from scratch
  4398. or to update an already existing translation.
  4399. <h5 class="subsubsection">8.4.2.1 Initialize a New Translation File</h5>
  4400. <p><a name="index-initialize-translations-from-a-compendium-532"></a>
  4401. Since a PO file with translations does not exist the translator can
  4402. merely use <samp><span class="file">/dev/null</span></samp> to fake the &ldquo;old&rdquo; translation file.
  4403. <pre class="example"> msgmerge --compendium compendium.po -o file.po /dev/null file.pot
  4404. </pre>
  4405. <h5 class="subsubsection">8.4.2.2 Update an Existing Translation File</h5>
  4406. <p><a name="index-update-translations-from-a-compendium-533"></a>
  4407. Concatenate the compendium file(s) and the existing PO, merge the
  4408. result with the POT file and remove the obsolete entries (optional,
  4409. here done using &lsquo;<samp><span class="samp">sed</span></samp>&rsquo;):
  4410. <pre class="example"> msgcat --use-first -o update.po compendium1.po compendium2.po file.po
  4411. msgmerge update.po file.pot | msgattrib --no-obsolete &gt; file.po
  4412. </pre>
  4413. <div class="node">
  4414. <a name="Manipulating"></a>
  4415. <p><hr>
  4416. Next:&nbsp;<a rel="next" accesskey="n" href="#Binaries">Binaries</a>,
  4417. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Editing">Editing</a>,
  4418. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  4419. </div>
  4420. <h2 class="chapter">9 Manipulating PO Files</h2>
  4421. <p><a name="index-manipulating-PO-files-534"></a>
  4422. Sometimes it is necessary to manipulate PO files in a way that is better
  4423. performed automatically than by hand. GNU <code>gettext</code> includes a
  4424. complete set of tools for this purpose.
  4425. <p><a name="index-merging-two-PO-files-535"></a>When merging two packages into a single package, the resulting POT file
  4426. will be the concatenation of the two packages' POT files. Thus the
  4427. maintainer must concatenate the two existing package translations into
  4428. a single translation catalog, for each language. This is best performed
  4429. using &lsquo;<samp><span class="samp">msgcat</span></samp>&rsquo;. It is then the translators' duty to deal with any
  4430. possible conflicts that arose during the merge.
  4431. <p><a name="index-encoding-conversion-536"></a>When a translator takes over the translation job from another translator,
  4432. but she uses a different character encoding in her locale, she will
  4433. convert the catalog to her character encoding. This is best done through
  4434. the &lsquo;<samp><span class="samp">msgconv</span></samp>&rsquo; program.
  4435. <p>When a maintainer takes a source file with tagged messages from another
  4436. package, he should also take the existing translations for this source
  4437. file (and not let the translators do the same job twice). One way to do
  4438. this is through &lsquo;<samp><span class="samp">msggrep</span></samp>&rsquo;, another is to create a POT file for
  4439. that source file and use &lsquo;<samp><span class="samp">msgmerge</span></samp>&rsquo;.
  4440. <p><a name="index-dialect-537"></a><a name="index-orthography-538"></a>When a translator wants to adjust some translation catalog for a special
  4441. dialect or orthography &mdash; for example, German as written in Switzerland
  4442. versus German as written in Germany &mdash; she needs to apply some text
  4443. processing to every message in the catalog. The tool for doing this is
  4444. &lsquo;<samp><span class="samp">msgfilter</span></samp>&rsquo;.
  4445. <p>Another use of <code>msgfilter</code> is to produce approximately the POT file for
  4446. which a given PO file was made. This can be done through a filter command
  4447. like &lsquo;<samp><span class="samp">msgfilter sed -e d | sed -e '/^# /d'</span></samp>&rsquo;. Note that the original
  4448. POT file may have had different comments and different plural message counts,
  4449. that's why it's better to use the original POT file if available.
  4450. <p><a name="index-checking-of-translations-539"></a>When a translator wants to check her translations, for example according
  4451. to orthography rules or using a non-interactive spell checker, she can do
  4452. so using the &lsquo;<samp><span class="samp">msgexec</span></samp>&rsquo; program.
  4453. <p><a name="index-duplicate-elimination-540"></a>When third party tools create PO or POT files, sometimes duplicates cannot
  4454. be avoided. But the GNU <code>gettext</code> tools give an error when they
  4455. encounter duplicate msgids in the same file and in the same domain.
  4456. To merge duplicates, the &lsquo;<samp><span class="samp">msguniq</span></samp>&rsquo; program can be used.
  4457. <p>&lsquo;<samp><span class="samp">msgcomm</span></samp>&rsquo; is a more general tool for keeping or throwing away
  4458. duplicates, occurring in different files.
  4459. <p>&lsquo;<samp><span class="samp">msgcmp</span></samp>&rsquo; can be used to check whether a translation catalog is
  4460. completely translated.
  4461. <p><a name="index-attributes_002c-manipulating-541"></a>&lsquo;<samp><span class="samp">msgattrib</span></samp>&rsquo; can be used to select and extract only the fuzzy
  4462. or untranslated messages of a translation catalog.
  4463. <p>&lsquo;<samp><span class="samp">msgen</span></samp>&rsquo; is useful as a first step for preparing English translation
  4464. catalogs. It copies each message's msgid to its msgstr.
  4465. <p>Finally, for those applications where all these various programs are not
  4466. sufficient, a library &lsquo;<samp><span class="samp">libgettextpo</span></samp>&rsquo; is provided that can be used to
  4467. write other specialized programs that process PO files.
  4468. <ul class="menu">
  4469. <li><a accesskey="1" href="#msgcat-Invocation">msgcat Invocation</a>: Invoking the <code>msgcat</code> Program
  4470. <li><a accesskey="2" href="#msgconv-Invocation">msgconv Invocation</a>: Invoking the <code>msgconv</code> Program
  4471. <li><a accesskey="3" href="#msggrep-Invocation">msggrep Invocation</a>: Invoking the <code>msggrep</code> Program
  4472. <li><a accesskey="4" href="#msgfilter-Invocation">msgfilter Invocation</a>: Invoking the <code>msgfilter</code> Program
  4473. <li><a accesskey="5" href="#msguniq-Invocation">msguniq Invocation</a>: Invoking the <code>msguniq</code> Program
  4474. <li><a accesskey="6" href="#msgcomm-Invocation">msgcomm Invocation</a>: Invoking the <code>msgcomm</code> Program
  4475. <li><a accesskey="7" href="#msgcmp-Invocation">msgcmp Invocation</a>: Invoking the <code>msgcmp</code> Program
  4476. <li><a accesskey="8" href="#msgattrib-Invocation">msgattrib Invocation</a>: Invoking the <code>msgattrib</code> Program
  4477. <li><a accesskey="9" href="#msgen-Invocation">msgen Invocation</a>: Invoking the <code>msgen</code> Program
  4478. <li><a href="#msgexec-Invocation">msgexec Invocation</a>: Invoking the <code>msgexec</code> Program
  4479. <li><a href="#Colorizing">Colorizing</a>: Highlighting parts of PO files
  4480. <li><a href="#libgettextpo">libgettextpo</a>: Writing your own programs that process PO files
  4481. </ul>
  4482. <div class="node">
  4483. <a name="msgcat-Invocation"></a>
  4484. <p><hr>
  4485. Next:&nbsp;<a rel="next" accesskey="n" href="#msgconv-Invocation">msgconv Invocation</a>,
  4486. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Manipulating">Manipulating</a>,
  4487. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  4488. </div>
  4489. <h3 class="section">9.1 Invoking the <code>msgcat</code> Program</h3>
  4490. <p><a name="index-msgcat-542"></a><a name="index-g_t_0040code_007bmsgcat_007d-program_002c-usage-543"></a>
  4491. <pre class="example"> msgcat [<var>option</var>] [<var>inputfile</var>]...
  4492. </pre>
  4493. <p><a name="index-concatenate-PO-files-544"></a><a name="index-merge-PO-files-545"></a>The <code>msgcat</code> program concatenates and merges the specified PO files.
  4494. It finds messages which are common to two or more of the specified PO files.
  4495. By using the <code>--more-than</code> option, greater commonality may be requested
  4496. before messages are printed. Conversely, the <code>--less-than</code> option may be
  4497. used to specify less commonality before messages are printed (i.e.
  4498. &lsquo;<samp><span class="samp">--less-than=2</span></samp>&rsquo; will only print the unique messages). Translations,
  4499. comments and extract comments will be cumulated, except that if
  4500. <code>--use-first</code> is specified, they will be taken from the first PO file
  4501. to define them. File positions from all PO files will be cumulated.
  4502. <h4 class="subsection">9.1.1 Input file location</h4>
  4503. <dl>
  4504. <dt>&lsquo;<samp><var>inputfile</var><span class="samp"> ...</span></samp>&rsquo;<dd>Input files.
  4505. <br><dt>&lsquo;<samp><span class="samp">-f </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--files-from=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-546"></a><a name="index-g_t_002d_002dfiles_002dfrom_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-547"></a>Read the names of the input files from <var>file</var> instead of getting
  4506. them from the command line.
  4507. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-548"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-549"></a>Add <var>directory</var> to the list of directories. Source files are
  4508. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  4509. file will be written relative to the current directory, though.
  4510. </dl>
  4511. <p>If <var>inputfile</var> is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  4512. <h4 class="subsection">9.1.2 Output file location</h4>
  4513. <dl>
  4514. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-550"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-551"></a>Write output to specified file.
  4515. </dl>
  4516. <p><a name="index-standard-output_002c-and-_0040code_007bmsgcat_007d-552"></a>The results are written to standard output if no output file is specified
  4517. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  4518. <h4 class="subsection">9.1.3 Message selection</h4>
  4519. <dl>
  4520. <dt>&lsquo;<samp><span class="samp">-&lt; </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--less-than=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002d_003c_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-553"></a><a name="index-g_t_002d_002dless_002dthan_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-554"></a>Print messages with less than <var>number</var> definitions, defaults to infinite
  4521. if not set.
  4522. <br><dt>&lsquo;<samp><span class="samp">-&gt; </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--more-than=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002d_003e_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-555"></a><a name="index-g_t_002d_002dmore_002dthan_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-556"></a>Print messages with more than <var>number</var> definitions, defaults to 0 if not
  4523. set.
  4524. <br><dt>&lsquo;<samp><span class="samp">-u</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--unique</span></samp>&rsquo;<dd><a name="index-g_t_002du_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-557"></a><a name="index-g_t_002d_002dunique_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-558"></a>Shorthand for &lsquo;<samp><span class="samp">--less-than=2</span></samp>&rsquo;. Requests that only unique messages be
  4525. printed.
  4526. </dl>
  4527. <h4 class="subsection">9.1.4 Input file syntax</h4>
  4528. <dl>
  4529. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-559"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-560"></a>Assume the input files are Java ResourceBundles in Java <code>.properties</code>
  4530. syntax, not in PO file syntax.
  4531. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-561"></a>Assume the input files are NeXTstep/GNUstep localized resource files in
  4532. <code>.strings</code> syntax, not in PO file syntax.
  4533. </dl>
  4534. <h4 class="subsection">9.1.5 Output details</h4>
  4535. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  4536. <dl>
  4537. <dt>&lsquo;<samp><span class="samp">-t</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--to-code=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002dt_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-562"></a><a name="index-g_t_002d_002dto_002dcode_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-563"></a>Specify encoding for output.
  4538. <br><dt>&lsquo;<samp><span class="samp">--use-first</span></samp>&rsquo;<dd><a name="index-g_t_002d_002duse_002dfirst_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-564"></a>Use first available translation for each message. Don't merge several
  4539. translations into one.
  4540. <br><dt>&lsquo;<samp><span class="samp">--lang=</span><var>catalogname</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dlang_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-565"></a>Specify the &lsquo;<samp><span class="samp">Language</span></samp>&rsquo; field to be used in the header entry. See
  4541. <a href="#Header-Entry">Header Entry</a> for the meaning of this field. Note: The
  4542. &lsquo;<samp><span class="samp">Language-Team</span></samp>&rsquo; and &lsquo;<samp><span class="samp">Plural-Forms</span></samp>&rsquo; fields are left unchanged.
  4543. <br><dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-566"></a>Specify whether or when to use colors and other text attributes.
  4544. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  4545. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-567"></a>Specify the CSS style rule file to use for <code>--color</code>.
  4546. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  4547. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-568"></a>Always write an output file even if it contains no message.
  4548. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-569"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-570"></a>Write the .po file using indented style.
  4549. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-571"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  4550. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-572"></a><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-573"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  4551. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-574"></a>Write out a strict Uniforum conforming PO file. Note that this
  4552. Uniforum format should be avoided because it doesn't support the
  4553. GNU extensions.
  4554. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-575"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-576"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  4555. that this file format doesn't support plural forms and silently drops
  4556. obsolete messages.
  4557. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-577"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  4558. Note that this file format doesn't support plural forms.
  4559. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-578"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-579"></a>Set the output page width. Long strings in the output files will be
  4560. split across multiple lines in order to ensure that each line's width
  4561. (= number of screen columns) is less or equal to the given <var>number</var>.
  4562. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-580"></a>Do not break long message lines. Message lines whose width exceeds the
  4563. output page width will not be split into several lines. Only file reference
  4564. lines which are wider than the output page width will be split.
  4565. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-581"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-582"></a><a name="index-sorting-_0040code_007bmsgcat_007d-output-583"></a>Generate sorted output. Note that using this option makes it much harder
  4566. for the translator to understand each message's context.
  4567. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-584"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-585"></a>Sort output by file location.
  4568. </dl>
  4569. <h4 class="subsection">9.1.6 Informative output</h4>
  4570. <dl>
  4571. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-586"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-587"></a>Display this help and exit.
  4572. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-588"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-589"></a>Output version information and exit.
  4573. </dl>
  4574. <div class="node">
  4575. <a name="msgconv-Invocation"></a>
  4576. <p><hr>
  4577. Next:&nbsp;<a rel="next" accesskey="n" href="#msggrep-Invocation">msggrep Invocation</a>,
  4578. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgcat-Invocation">msgcat Invocation</a>,
  4579. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  4580. </div>
  4581. <h3 class="section">9.2 Invoking the <code>msgconv</code> Program</h3>
  4582. <p><a name="index-msgconv-590"></a><a name="index-g_t_0040code_007bmsgconv_007d-program_002c-usage-591"></a>
  4583. <pre class="example"> msgconv [<var>option</var>] [<var>inputfile</var>]
  4584. </pre>
  4585. <p><a name="index-convert-translations-to-a-different-encoding-592"></a>The <code>msgconv</code> program converts a translation catalog to a different
  4586. character encoding.
  4587. <h4 class="subsection">9.2.1 Input file location</h4>
  4588. <dl>
  4589. <dt>&lsquo;<samp><var>inputfile</var></samp>&rsquo;<dd>Input PO file.
  4590. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-593"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-594"></a>Add <var>directory</var> to the list of directories. Source files are
  4591. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  4592. file will be written relative to the current directory, though.
  4593. </dl>
  4594. <p>If no <var>inputfile</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  4595. <h4 class="subsection">9.2.2 Output file location</h4>
  4596. <dl>
  4597. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-595"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-596"></a>Write output to specified file.
  4598. </dl>
  4599. <p>The results are written to standard output if no output file is specified
  4600. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  4601. <h4 class="subsection">9.2.3 Conversion target</h4>
  4602. <dl>
  4603. <dt>&lsquo;<samp><span class="samp">-t</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--to-code=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002dt_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-597"></a><a name="index-g_t_002d_002dto_002dcode_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-598"></a>Specify encoding for output.
  4604. </dl>
  4605. <p>The default encoding is the current locale's encoding.
  4606. <h4 class="subsection">9.2.4 Input file syntax</h4>
  4607. <dl>
  4608. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-599"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-600"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  4609. syntax, not in PO file syntax.
  4610. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgonv_007d-option_007d-601"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  4611. <code>.strings</code> syntax, not in PO file syntax.
  4612. </dl>
  4613. <h4 class="subsection">9.2.5 Output details</h4>
  4614. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  4615. <dl>
  4616. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-602"></a>Specify whether or when to use colors and other text attributes.
  4617. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  4618. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-603"></a>Specify the CSS style rule file to use for <code>--color</code>.
  4619. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  4620. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-604"></a>Always write an output file even if it contains no message.
  4621. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-605"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-606"></a>Write the .po file using indented style.
  4622. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-607"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  4623. <br><dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-608"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  4624. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-609"></a>Write out a strict Uniforum conforming PO file. Note that this
  4625. Uniforum format should be avoided because it doesn't support the
  4626. GNU extensions.
  4627. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-610"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-611"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  4628. that this file format doesn't support plural forms and silently drops
  4629. obsolete messages.
  4630. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-612"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  4631. Note that this file format doesn't support plural forms.
  4632. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-613"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-614"></a>Set the output page width. Long strings in the output files will be
  4633. split across multiple lines in order to ensure that each line's width
  4634. (= number of screen columns) is less or equal to the given <var>number</var>.
  4635. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-615"></a>Do not break long message lines. Message lines whose width exceeds the
  4636. output page width will not be split into several lines. Only file reference
  4637. lines which are wider than the output page width will be split.
  4638. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-616"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-617"></a>Generate sorted output. Note that using this option makes it much harder
  4639. for the translator to understand each message's context.
  4640. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-618"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-619"></a>Sort output by file location.
  4641. </dl>
  4642. <h4 class="subsection">9.2.6 Informative output</h4>
  4643. <dl>
  4644. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-620"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-621"></a>Display this help and exit.
  4645. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-622"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-623"></a>Output version information and exit.
  4646. </dl>
  4647. <div class="node">
  4648. <a name="msggrep-Invocation"></a>
  4649. <p><hr>
  4650. Next:&nbsp;<a rel="next" accesskey="n" href="#msgfilter-Invocation">msgfilter Invocation</a>,
  4651. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgconv-Invocation">msgconv Invocation</a>,
  4652. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  4653. </div>
  4654. <h3 class="section">9.3 Invoking the <code>msggrep</code> Program</h3>
  4655. <p><a name="index-msggrep-624"></a><a name="index-g_t_0040code_007bmsggrep_007d-program_002c-usage-625"></a>
  4656. <pre class="example"> msggrep [<var>option</var>] [<var>inputfile</var>]
  4657. </pre>
  4658. <p><a name="index-search-messages-in-a-catalog-626"></a>The <code>msggrep</code> program extracts all messages of a translation catalog
  4659. that match a given pattern or belong to some given source files.
  4660. <h4 class="subsection">9.3.1 Input file location</h4>
  4661. <dl>
  4662. <dt>&lsquo;<samp><var>inputfile</var></samp>&rsquo;<dd>Input PO file.
  4663. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-627"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-628"></a>Add <var>directory</var> to the list of directories. Source files are
  4664. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  4665. file will be written relative to the current directory, though.
  4666. </dl>
  4667. <p>If no <var>inputfile</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  4668. <h4 class="subsection">9.3.2 Output file location</h4>
  4669. <dl>
  4670. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-629"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-630"></a>Write output to specified file.
  4671. </dl>
  4672. <p>The results are written to standard output if no output file is specified
  4673. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  4674. <h4 class="subsection">9.3.3 Message selection</h4>
  4675. <pre class="example"> [-N <var>sourcefile</var>]... [-M <var>domainname</var>]...
  4676. [-J <var>msgctxt-pattern</var>] [-K <var>msgid-pattern</var>] [-T <var>msgstr-pattern</var>]
  4677. [-C <var>comment-pattern</var>]
  4678. </pre>
  4679. <p>A message is selected if
  4680. <ul>
  4681. <li>it comes from one of the specified source files,
  4682. <li>or if it comes from one of the specified domains,
  4683. <li>or if &lsquo;<samp><span class="samp">-J</span></samp>&rsquo; is given and its context (msgctxt) matches
  4684. <var>msgctxt-pattern</var>,
  4685. <li>or if &lsquo;<samp><span class="samp">-K</span></samp>&rsquo; is given and its key (msgid or msgid_plural) matches
  4686. <var>msgid-pattern</var>,
  4687. <li>or if &lsquo;<samp><span class="samp">-T</span></samp>&rsquo; is given and its translation (msgstr) matches
  4688. <var>msgstr-pattern</var>,
  4689. <li>or if &lsquo;<samp><span class="samp">-C</span></samp>&rsquo; is given and the translator's comment matches
  4690. <var>comment-pattern</var>.
  4691. </ul>
  4692. <p>When more than one selection criterion is specified, the set of selected
  4693. messages is the union of the selected messages of each criterion.
  4694. <p><var>msgctxt-pattern</var> or <var>msgid-pattern</var> or <var>msgstr-pattern</var> syntax:
  4695. <pre class="example"> [-E | -F] [-e <var>pattern</var> | -f <var>file</var>]...
  4696. </pre>
  4697. <p><var>pattern</var>s are basic regular expressions by default, or extended regular
  4698. expressions if -E is given, or fixed strings if -F is given.
  4699. <dl>
  4700. <dt>&lsquo;<samp><span class="samp">-N </span><var>sourcefile</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--location=</span><var>sourcefile</var></samp>&rsquo;<dd><a name="index-g_t_002dN_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-631"></a><a name="index-g_t_002d_002dlocation_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-632"></a>Select messages extracted from <var>sourcefile</var>. <var>sourcefile</var> can be
  4701. either a literal file name or a wildcard pattern.
  4702. <br><dt>&lsquo;<samp><span class="samp">-M </span><var>domainname</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--domain=</span><var>domainname</var></samp>&rsquo;<dd><a name="index-g_t_002dM_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-633"></a><a name="index-g_t_002d_002ddomain_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-634"></a>Select messages belonging to domain <var>domainname</var>.
  4703. <br><dt>&lsquo;<samp><span class="samp">-J</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--msgctxt</span></samp>&rsquo;<dd><a name="index-g_t_002dJ_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-635"></a><a name="index-g_t_002d_002dmsgctxt_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-636"></a>Start of patterns for the msgctxt.
  4704. <br><dt>&lsquo;<samp><span class="samp">-K</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--msgid</span></samp>&rsquo;<dd><a name="index-g_t_002dK_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-637"></a><a name="index-g_t_002d_002dmsgid_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-638"></a>Start of patterns for the msgid.
  4705. <br><dt>&lsquo;<samp><span class="samp">-T</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--msgstr</span></samp>&rsquo;<dd><a name="index-g_t_002dT_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-639"></a><a name="index-g_t_002d_002dmsgstr_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-640"></a>Start of patterns for the msgstr.
  4706. <br><dt>&lsquo;<samp><span class="samp">-C</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--comment</span></samp>&rsquo;<dd><a name="index-g_t_002dC_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-641"></a><a name="index-g_t_002d_002dcomment_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-642"></a>Start of patterns for the translator's comment.
  4707. <br><dt>&lsquo;<samp><span class="samp">-X</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--extracted-comment</span></samp>&rsquo;<dd><a name="index-g_t_002dX_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-643"></a><a name="index-g_t_002d_002dextracted_002dcomment_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-644"></a>Start of patterns for the extracted comments.
  4708. <br><dt>&lsquo;<samp><span class="samp">-E</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--extended-regexp</span></samp>&rsquo;<dd><a name="index-g_t_002dE_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-645"></a><a name="index-g_t_002d_002dextended_002dregexp_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-646"></a>Specify that <var>pattern</var> is an extended regular expression.
  4709. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--fixed-strings</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-647"></a><a name="index-g_t_002d_002dfixed_002dstrings_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-648"></a>Specify that <var>pattern</var> is a set of newline-separated strings.
  4710. <br><dt>&lsquo;<samp><span class="samp">-e </span><var>pattern</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--regexp=</span><var>pattern</var></samp>&rsquo;<dd><a name="index-g_t_002de_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-649"></a><a name="index-g_t_002d_002dregexp_003d_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-650"></a>Use <var>pattern</var> as a regular expression.
  4711. <br><dt>&lsquo;<samp><span class="samp">-f </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-651"></a><a name="index-g_t_002d_002dfile_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-652"></a>Obtain <var>pattern</var> from <var>file</var>.
  4712. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--ignore-case</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-653"></a><a name="index-g_t_002d_002dignore_002dcase_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-654"></a>Ignore case distinctions.
  4713. <br><dt>&lsquo;<samp><span class="samp">-v</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--invert-match</span></samp>&rsquo;<dd><a name="index-g_t_002dv_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-655"></a><a name="index-g_t_002d_002dinvert_002dmatch_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-656"></a>Output only the messages that do not match any selection criterion, instead
  4714. of the messages that match a selection criterion.
  4715. </dl>
  4716. <h4 class="subsection">9.3.4 Input file syntax</h4>
  4717. <dl>
  4718. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-657"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-658"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  4719. syntax, not in PO file syntax.
  4720. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-659"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  4721. <code>.strings</code> syntax, not in PO file syntax.
  4722. </dl>
  4723. <h4 class="subsection">9.3.5 Output details</h4>
  4724. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  4725. <dl>
  4726. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-660"></a>Specify whether or when to use colors and other text attributes.
  4727. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  4728. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-661"></a>Specify the CSS style rule file to use for <code>--color</code>.
  4729. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  4730. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-662"></a>Always write an output file even if it contains no message.
  4731. <br><dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-663"></a>Write the .po file using indented style.
  4732. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-664"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  4733. <br><dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-665"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  4734. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-666"></a>Write out a strict Uniforum conforming PO file. Note that this
  4735. Uniforum format should be avoided because it doesn't support the
  4736. GNU extensions.
  4737. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-667"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-668"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  4738. that this file format doesn't support plural forms and silently drops
  4739. obsolete messages.
  4740. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-669"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  4741. Note that this file format doesn't support plural forms.
  4742. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-670"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-671"></a>Set the output page width. Long strings in the output files will be
  4743. split across multiple lines in order to ensure that each line's width
  4744. (= number of screen columns) is less or equal to the given <var>number</var>.
  4745. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-672"></a>Do not break long message lines. Message lines whose width exceeds the
  4746. output page width will not be split into several lines. Only file reference
  4747. lines which are wider than the output page width will be split.
  4748. <br><dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-673"></a>Generate sorted output. Note that using this option makes it much harder
  4749. for the translator to understand each message's context.
  4750. <br><dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-674"></a>Sort output by file location.
  4751. </dl>
  4752. <h4 class="subsection">9.3.6 Informative output</h4>
  4753. <dl>
  4754. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-675"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-676"></a>Display this help and exit.
  4755. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-677"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-678"></a>Output version information and exit.
  4756. </dl>
  4757. <h4 class="subsection">9.3.7 Examples</h4>
  4758. <p>To extract the messages that come from the source files
  4759. <code>gnulib-lib/error.c</code> and <code>gnulib-lib/getopt.c</code>:
  4760. <pre class="smallexample"> msggrep -N gnulib-lib/error.c -N gnulib-lib/getopt.c input.po
  4761. </pre>
  4762. <p>To extract the messages that contain the string &ldquo;Please specify&rdquo; in the
  4763. original string:
  4764. <pre class="smallexample"> msggrep --msgid -F -e 'Please specify' input.po
  4765. </pre>
  4766. <p>To extract the messages that have a context specifier of either &ldquo;Menu&gt;File&rdquo;
  4767. or &ldquo;Menu&gt;Edit&rdquo; or a submenu of them:
  4768. <pre class="smallexample"> msggrep --msgctxt -E -e '^Menu&gt;(File|Edit)' input.po
  4769. </pre>
  4770. <p>To extract the messages whose translation contains one of the strings in the
  4771. file <code>wordlist.txt</code>:
  4772. <pre class="smallexample"> msggrep --msgstr -F -f wordlist.txt input.po
  4773. </pre>
  4774. <div class="node">
  4775. <a name="msgfilter-Invocation"></a>
  4776. <p><hr>
  4777. Next:&nbsp;<a rel="next" accesskey="n" href="#msguniq-Invocation">msguniq Invocation</a>,
  4778. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msggrep-Invocation">msggrep Invocation</a>,
  4779. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  4780. </div>
  4781. <h3 class="section">9.4 Invoking the <code>msgfilter</code> Program</h3>
  4782. <p><a name="index-msgfilter-679"></a><a name="index-g_t_0040code_007bmsgfilter_007d-program_002c-usage-680"></a>
  4783. <pre class="example"> msgfilter [<var>option</var>] <var>filter</var> [<var>filter-option</var>]
  4784. </pre>
  4785. <p><a name="index-apply-a-filter-to-translations-681"></a>The <code>msgfilter</code> program applies a filter to all translations of a
  4786. translation catalog.
  4787. <p><a name="index-MSGFILTER_005fMSGCTXT_0040r_007b_002c-environment-variable_007d-682"></a><a name="index-MSGFILTER_005fMSGID_0040r_007b_002c-environment-variable_007d-683"></a><a name="index-MSGFILTER_005fLOCATION_0040r_007b_002c-environment-variable_007d-684"></a>During each <var>filter</var> invocation, the environment variable
  4788. <code>MSGFILTER_MSGID</code> is bound to the message's msgid, and the environment
  4789. variable <code>MSGFILTER_LOCATION</code> is bound to the location in the PO file
  4790. of the message. If the message has a context, the environment variable
  4791. <code>MSGFILTER_MSGCTXT</code> is bound to the message's msgctxt, otherwise it is
  4792. unbound.
  4793. <h4 class="subsection">9.4.1 Input file location</h4>
  4794. <dl>
  4795. <dt>&lsquo;<samp><span class="samp">-i </span><var>inputfile</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--input=</span><var>inputfile</var></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-685"></a><a name="index-g_t_002d_002dinput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-686"></a>Input PO file.
  4796. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-687"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-688"></a>Add <var>directory</var> to the list of directories. Source files are
  4797. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  4798. file will be written relative to the current directory, though.
  4799. </dl>
  4800. <p>If no <var>inputfile</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  4801. <h4 class="subsection">9.4.2 Output file location</h4>
  4802. <dl>
  4803. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-689"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-690"></a>Write output to specified file.
  4804. </dl>
  4805. <p>The results are written to standard output if no output file is specified
  4806. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  4807. <h4 class="subsection">9.4.3 The filter</h4>
  4808. <p>The <var>filter</var> can be any program that reads a translation from standard
  4809. input and writes a modified translation to standard output. A frequently
  4810. used filter is &lsquo;<samp><span class="samp">sed</span></samp>&rsquo;. A few particular built-in filters are also
  4811. recognized.
  4812. <p><a name="index-g_t_0040code_007bmsgfilter_007d-filter-and-catalog-encoding-691"></a>Note: If the filter is not a built-in filter, you have to care about encodings:
  4813. It is your responsibility to ensure that the <var>filter</var> can cope
  4814. with input encoded in the translation catalog's encoding. If the
  4815. <var>filter</var> wants input in a particular encoding, you can in a first step
  4816. convert the translation catalog to that encoding using the &lsquo;<samp><span class="samp">msgconv</span></samp>&rsquo;
  4817. program, before invoking &lsquo;<samp><span class="samp">msgfilter</span></samp>&rsquo;. If the <var>filter</var> wants input
  4818. in the locale's encoding, but you want to avoid the locale's encoding, then
  4819. you can first convert the translation catalog to UTF-8 using the
  4820. &lsquo;<samp><span class="samp">msgconv</span></samp>&rsquo; program and then make &lsquo;<samp><span class="samp">msgfilter</span></samp>&rsquo; work in an UTF-8
  4821. locale, by using the <code>LC_ALL</code> environment variable.
  4822. <p><a name="index-portability-problems-with-_0040code_007bsed_007d-692"></a>Note: Most translations in a translation catalog don't end with a newline
  4823. character. For this reason, it is important that the <var>filter</var>
  4824. recognizes its last input line even if it ends without a newline, and that
  4825. it doesn't add an undesired trailing newline at the end. The &lsquo;<samp><span class="samp">sed</span></samp>&rsquo;
  4826. program on some platforms is known to ignore the last line of input if it
  4827. is not terminated with a newline. You can use GNU <code>sed</code> instead; it
  4828. does not have this limitation.
  4829. <h4 class="subsection">9.4.4 Useful <var>filter-option</var>s when the <var>filter</var> is &lsquo;<samp><span class="samp">sed</span></samp>&rsquo;</h4>
  4830. <dl>
  4831. <dt>&lsquo;<samp><span class="samp">-e </span><var>script</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--expression=</span><var>script</var></samp>&rsquo;<dd><a name="index-g_t_002de_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-693"></a><a name="index-g_t_002d_002dexpression_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-694"></a>Add <var>script</var> to the commands to be executed.
  4832. <br><dt>&lsquo;<samp><span class="samp">-f </span><var>scriptfile</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--file=</span><var>scriptfile</var></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-695"></a><a name="index-g_t_002d_002dfile_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-696"></a>Add the contents of <var>scriptfile</var> to the commands to be executed.
  4833. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--quiet</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--silent</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-697"></a><a name="index-g_t_002d_002dquiet_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-698"></a><a name="index-g_t_002d_002dsilent_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-699"></a>Suppress automatic printing of pattern space.
  4834. </dl>
  4835. <h4 class="subsection">9.4.5 Built-in <var>filter</var>s</h4>
  4836. <p><a name="index-recode_002dsr_002dlatin-700"></a><a name="index-g_t_0040code_007brecode_002dsr_002dlatin_007d-program-701"></a>The filter &lsquo;<samp><span class="samp">recode-sr-latin</span></samp>&rsquo; is recognized as a built-in filter.
  4837. The command &lsquo;<samp><span class="samp">recode-sr-latin</span></samp>&rsquo; converts Serbian text, written in the
  4838. Cyrillic script, to the Latin script.
  4839. The command &lsquo;<samp><span class="samp">msgfilter recode-sr-latin</span></samp>&rsquo; applies this conversion to the
  4840. translations of a PO file. Thus, it can be used to convert an <samp><span class="file">sr.po</span></samp>
  4841. file to an <samp><span class="file">sr@latin.po</span></samp> file.
  4842. <p>The use of built-in filters is not sensitive to the current locale's encoding.
  4843. Moreover, when used with a built-in filter, &lsquo;<samp><span class="samp">msgfilter</span></samp>&rsquo; can automatically
  4844. convert the message catalog to the UTF-8 encoding when needed.
  4845. <h4 class="subsection">9.4.6 Input file syntax</h4>
  4846. <dl>
  4847. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-702"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-703"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  4848. syntax, not in PO file syntax.
  4849. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-704"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  4850. <code>.strings</code> syntax, not in PO file syntax.
  4851. </dl>
  4852. <h4 class="subsection">9.4.7 Output details</h4>
  4853. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  4854. <dl>
  4855. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-705"></a>Specify whether or when to use colors and other text attributes.
  4856. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  4857. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-706"></a>Specify the CSS style rule file to use for <code>--color</code>.
  4858. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  4859. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-707"></a>Always write an output file even if it contains no message.
  4860. <br><dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-708"></a>Write the .po file using indented style.
  4861. <br><dt>&lsquo;<samp><span class="samp">--keep-header</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dkeep_002dheader_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-709"></a>Keep the header entry, i.e. the message with &lsquo;<samp><span class="samp">msgid ""</span></samp>&rsquo;, unmodified,
  4862. instead of filtering it. By default, the header entry is subject to
  4863. filtering like any other message.
  4864. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-710"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  4865. <br><dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-711"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  4866. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-712"></a>Write out a strict Uniforum conforming PO file. Note that this
  4867. Uniforum format should be avoided because it doesn't support the
  4868. GNU extensions.
  4869. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-713"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-714"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  4870. that this file format doesn't support plural forms and silently drops
  4871. obsolete messages.
  4872. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-715"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  4873. Note that this file format doesn't support plural forms.
  4874. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-716"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-717"></a>Set the output page width. Long strings in the output files will be
  4875. split across multiple lines in order to ensure that each line's width
  4876. (= number of screen columns) is less or equal to the given <var>number</var>.
  4877. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-718"></a>Do not break long message lines. Message lines whose width exceeds the
  4878. output page width will not be split into several lines. Only file reference
  4879. lines which are wider than the output page width will be split.
  4880. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-719"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-720"></a>Generate sorted output. Note that using this option makes it much harder
  4881. for the translator to understand each message's context.
  4882. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-721"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-722"></a>Sort output by file location.
  4883. </dl>
  4884. <h4 class="subsection">9.4.8 Informative output</h4>
  4885. <dl>
  4886. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-723"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-724"></a>Display this help and exit.
  4887. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-725"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-726"></a>Output version information and exit.
  4888. </dl>
  4889. <h4 class="subsection">9.4.9 Examples</h4>
  4890. <p>To convert German translations to Swiss orthography (in an UTF-8 locale):
  4891. <pre class="smallexample"> msgconv -t UTF-8 de.po | msgfilter sed -e 's/&szlig;/ss/g'
  4892. </pre>
  4893. <p>To convert Serbian translations in Cyrillic script to Latin script:
  4894. <pre class="smallexample"> msgfilter recode-sr-latin &lt; sr.po
  4895. </pre>
  4896. <div class="node">
  4897. <a name="msguniq-Invocation"></a>
  4898. <p><hr>
  4899. Next:&nbsp;<a rel="next" accesskey="n" href="#msgcomm-Invocation">msgcomm Invocation</a>,
  4900. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgfilter-Invocation">msgfilter Invocation</a>,
  4901. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  4902. </div>
  4903. <h3 class="section">9.5 Invoking the <code>msguniq</code> Program</h3>
  4904. <p><a name="index-msguniq-727"></a><a name="index-g_t_0040code_007bmsguniq_007d-program_002c-usage-728"></a>
  4905. <pre class="example"> msguniq [<var>option</var>] [<var>inputfile</var>]
  4906. </pre>
  4907. <p><a name="index-unify-duplicate-translations-729"></a><a name="index-duplicate-removal-730"></a>The <code>msguniq</code> program unifies duplicate translations in a translation
  4908. catalog. It finds duplicate translations of the same message ID. Such
  4909. duplicates are invalid input for other programs like <code>msgfmt</code>,
  4910. <code>msgmerge</code> or <code>msgcat</code>. By default, duplicates are merged
  4911. together. When using the &lsquo;<samp><span class="samp">--repeated</span></samp>&rsquo; option, only duplicates are
  4912. output, and all other messages are discarded. Comments and extracted
  4913. comments will be cumulated, except that if &lsquo;<samp><span class="samp">--use-first</span></samp>&rsquo; is
  4914. specified, they will be taken from the first translation. File positions
  4915. will be cumulated. When using the &lsquo;<samp><span class="samp">--unique</span></samp>&rsquo; option, duplicates are
  4916. discarded.
  4917. <h4 class="subsection">9.5.1 Input file location</h4>
  4918. <dl>
  4919. <dt>&lsquo;<samp><var>inputfile</var></samp>&rsquo;<dd>Input PO file.
  4920. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-731"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-732"></a>Add <var>directory</var> to the list of directories. Source files are
  4921. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  4922. file will be written relative to the current directory, though.
  4923. </dl>
  4924. <p>If no <var>inputfile</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  4925. <h4 class="subsection">9.5.2 Output file location</h4>
  4926. <dl>
  4927. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-733"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-734"></a>Write output to specified file.
  4928. </dl>
  4929. <p>The results are written to standard output if no output file is specified
  4930. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  4931. <h4 class="subsection">9.5.3 Message selection</h4>
  4932. <dl>
  4933. <dt>&lsquo;<samp><span class="samp">-d</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--repeated</span></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-735"></a><a name="index-g_t_002d_002drepeated_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-736"></a>Print only duplicates.
  4934. <br><dt>&lsquo;<samp><span class="samp">-u</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--unique</span></samp>&rsquo;<dd><a name="index-g_t_002du_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-737"></a><a name="index-g_t_002d_002dunique_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-738"></a>Print only unique messages, discard duplicates.
  4935. </dl>
  4936. <h4 class="subsection">9.5.4 Input file syntax</h4>
  4937. <dl>
  4938. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-739"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-740"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  4939. syntax, not in PO file syntax.
  4940. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-741"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  4941. <code>.strings</code> syntax, not in PO file syntax.
  4942. </dl>
  4943. <h4 class="subsection">9.5.5 Output details</h4>
  4944. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  4945. <dl>
  4946. <dt>&lsquo;<samp><span class="samp">-t</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--to-code=</span><var>name</var></samp>&rsquo;<dd><a name="index-g_t_002dt_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-742"></a><a name="index-g_t_002d_002dto_002dcode_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-743"></a>Specify encoding for output.
  4947. <br><dt>&lsquo;<samp><span class="samp">--use-first</span></samp>&rsquo;<dd><a name="index-g_t_002d_002duse_002dfirst_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-744"></a>Use first available translation for each message. Don't merge several
  4948. translations into one.
  4949. <br><dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-745"></a>Specify whether or when to use colors and other text attributes.
  4950. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  4951. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-746"></a>Specify the CSS style rule file to use for <code>--color</code>.
  4952. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  4953. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-747"></a>Always write an output file even if it contains no message.
  4954. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-748"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-749"></a>Write the .po file using indented style.
  4955. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-750"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  4956. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-751"></a><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-752"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  4957. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-753"></a>Write out a strict Uniforum conforming PO file. Note that this
  4958. Uniforum format should be avoided because it doesn't support the
  4959. GNU extensions.
  4960. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-754"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-755"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  4961. that this file format doesn't support plural forms and silently drops
  4962. obsolete messages.
  4963. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-756"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  4964. Note that this file format doesn't support plural forms.
  4965. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-757"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-758"></a>Set the output page width. Long strings in the output files will be
  4966. split across multiple lines in order to ensure that each line's width
  4967. (= number of screen columns) is less or equal to the given <var>number</var>.
  4968. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-759"></a>Do not break long message lines. Message lines whose width exceeds the
  4969. output page width will not be split into several lines. Only file reference
  4970. lines which are wider than the output page width will be split.
  4971. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-760"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-761"></a>Generate sorted output. Note that using this option makes it much harder
  4972. for the translator to understand each message's context.
  4973. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-762"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-763"></a>Sort output by file location.
  4974. </dl>
  4975. <h4 class="subsection">9.5.6 Informative output</h4>
  4976. <dl>
  4977. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-764"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-765"></a>Display this help and exit.
  4978. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-766"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-767"></a>Output version information and exit.
  4979. </dl>
  4980. <div class="node">
  4981. <a name="msgcomm-Invocation"></a>
  4982. <p><hr>
  4983. Next:&nbsp;<a rel="next" accesskey="n" href="#msgcmp-Invocation">msgcmp Invocation</a>,
  4984. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msguniq-Invocation">msguniq Invocation</a>,
  4985. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  4986. </div>
  4987. <h3 class="section">9.6 Invoking the <code>msgcomm</code> Program</h3>
  4988. <p><a name="index-msgcomm-768"></a><a name="index-g_t_0040code_007bmsgcomm_007d-program_002c-usage-769"></a>
  4989. <pre class="example"> msgcomm [<var>option</var>] [<var>inputfile</var>]...
  4990. </pre>
  4991. <p><a name="index-find-common-messages-770"></a>The <code>msgcomm</code> program finds messages which are common to two or more
  4992. of the specified PO files.
  4993. By using the <code>--more-than</code> option, greater commonality may be requested
  4994. before messages are printed. Conversely, the <code>--less-than</code> option may be
  4995. used to specify less commonality before messages are printed (i.e.
  4996. &lsquo;<samp><span class="samp">--less-than=2</span></samp>&rsquo; will only print the unique messages). Translations,
  4997. comments and extract comments will be preserved, but only from the first
  4998. PO file to define them. File positions from all PO files will be
  4999. cumulated.
  5000. <h4 class="subsection">9.6.1 Input file location</h4>
  5001. <dl>
  5002. <dt>&lsquo;<samp><var>inputfile</var><span class="samp"> ...</span></samp>&rsquo;<dd>Input files.
  5003. <br><dt>&lsquo;<samp><span class="samp">-f </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--files-from=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-771"></a><a name="index-g_t_002d_002dfiles_002dfrom_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-772"></a>Read the names of the input files from <var>file</var> instead of getting
  5004. them from the command line.
  5005. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-773"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-774"></a>Add <var>directory</var> to the list of directories. Source files are
  5006. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  5007. file will be written relative to the current directory, though.
  5008. </dl>
  5009. <p>If <var>inputfile</var> is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  5010. <h4 class="subsection">9.6.2 Output file location</h4>
  5011. <dl>
  5012. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-775"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-776"></a>Write output to specified file.
  5013. </dl>
  5014. <p>The results are written to standard output if no output file is specified
  5015. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  5016. <h4 class="subsection">9.6.3 Message selection</h4>
  5017. <dl>
  5018. <dt>&lsquo;<samp><span class="samp">-&lt; </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--less-than=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002d_003c_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-777"></a><a name="index-g_t_002d_002dless_002dthan_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-778"></a>Print messages with less than <var>number</var> definitions, defaults to infinite
  5019. if not set.
  5020. <br><dt>&lsquo;<samp><span class="samp">-&gt; </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--more-than=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002d_003e_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-779"></a><a name="index-g_t_002d_002dmore_002dthan_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-780"></a>Print messages with more than <var>number</var> definitions, defaults to 1 if not
  5021. set.
  5022. <br><dt>&lsquo;<samp><span class="samp">-u</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--unique</span></samp>&rsquo;<dd><a name="index-g_t_002du_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-781"></a><a name="index-g_t_002d_002dunique_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-782"></a>Shorthand for &lsquo;<samp><span class="samp">--less-than=2</span></samp>&rsquo;. Requests that only unique messages be
  5023. printed.
  5024. </dl>
  5025. <h4 class="subsection">9.6.4 Input file syntax</h4>
  5026. <dl>
  5027. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-783"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-784"></a>Assume the input files are Java ResourceBundles in Java <code>.properties</code>
  5028. syntax, not in PO file syntax.
  5029. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-785"></a>Assume the input files are NeXTstep/GNUstep localized resource files in
  5030. <code>.strings</code> syntax, not in PO file syntax.
  5031. </dl>
  5032. <h4 class="subsection">9.6.5 Output details</h4>
  5033. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  5034. <dl>
  5035. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-786"></a>Specify whether or when to use colors and other text attributes.
  5036. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  5037. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-787"></a>Specify the CSS style rule file to use for <code>--color</code>.
  5038. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  5039. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-788"></a>Always write an output file even if it contains no message.
  5040. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-789"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-790"></a>Write the .po file using indented style.
  5041. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-791"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  5042. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-792"></a><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-793"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  5043. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-794"></a>Write out a strict Uniforum conforming PO file. Note that this
  5044. Uniforum format should be avoided because it doesn't support the
  5045. GNU extensions.
  5046. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-795"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-796"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  5047. that this file format doesn't support plural forms and silently drops
  5048. obsolete messages.
  5049. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-797"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  5050. Note that this file format doesn't support plural forms.
  5051. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-798"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-799"></a>Set the output page width. Long strings in the output files will be
  5052. split across multiple lines in order to ensure that each line's width
  5053. (= number of screen columns) is less or equal to the given <var>number</var>.
  5054. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-800"></a>Do not break long message lines. Message lines whose width exceeds the
  5055. output page width will not be split into several lines. Only file reference
  5056. lines which are wider than the output page width will be split.
  5057. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-801"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-802"></a>Generate sorted output. Note that using this option makes it much harder
  5058. for the translator to understand each message's context.
  5059. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-803"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-804"></a>Sort output by file location.
  5060. <br><dt>&lsquo;<samp><span class="samp">--omit-header</span></samp>&rsquo;<dd><a name="index-g_t_002d_002domit_002dheader_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-805"></a>Don't write header with &lsquo;<samp><span class="samp">msgid ""</span></samp>&rsquo; entry.
  5061. </dl>
  5062. <h4 class="subsection">9.6.6 Informative output</h4>
  5063. <dl>
  5064. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-806"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-807"></a>Display this help and exit.
  5065. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-808"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-809"></a>Output version information and exit.
  5066. </dl>
  5067. <div class="node">
  5068. <a name="msgcmp-Invocation"></a>
  5069. <p><hr>
  5070. Next:&nbsp;<a rel="next" accesskey="n" href="#msgattrib-Invocation">msgattrib Invocation</a>,
  5071. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgcomm-Invocation">msgcomm Invocation</a>,
  5072. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  5073. </div>
  5074. <h3 class="section">9.7 Invoking the <code>msgcmp</code> Program</h3>
  5075. <p><a name="index-msgcmp-810"></a><a name="index-g_t_0040code_007bmsgcmp_007d-program_002c-usage-811"></a>
  5076. <pre class="example"> msgcmp [<var>option</var>] <var>def</var>.po <var>ref</var>.pot
  5077. </pre>
  5078. <p><a name="index-compare-PO-files-812"></a>The <code>msgcmp</code> program compares two Uniforum style .po files to check that
  5079. both contain the same set of msgid strings. The <var>def</var>.po file is an
  5080. existing PO file with the translations. The <var>ref</var>.pot file is the last
  5081. created PO file, or a PO Template file (generally created by <code>xgettext</code>).
  5082. This is useful for checking that you have translated each and every message
  5083. in your program. Where an exact match cannot be found, fuzzy matching is
  5084. used to produce better diagnostics.
  5085. <h4 class="subsection">9.7.1 Input file location</h4>
  5086. <dl>
  5087. <dt>&lsquo;<samp><var>def</var><span class="samp">.po</span></samp>&rsquo;<dd>Translations.
  5088. <br><dt>&lsquo;<samp><var>ref</var><span class="samp">.pot</span></samp>&rsquo;<dd>References to the sources.
  5089. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-813"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-814"></a>Add <var>directory</var> to the list of directories. Source files are
  5090. searched relative to this list of directories.
  5091. </dl>
  5092. <h4 class="subsection">9.7.2 Operation modifiers</h4>
  5093. <dl>
  5094. <dt>&lsquo;<samp><span class="samp">-m</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--multi-domain</span></samp>&rsquo;<dd><a name="index-g_t_002dm_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-815"></a><a name="index-g_t_002d_002dmulti_002ddomain_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-816"></a>Apply <var>ref</var>.pot to each of the domains in <var>def</var>.po.
  5095. <br><dt>&lsquo;<samp><span class="samp">-N</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--no-fuzzy-matching</span></samp>&rsquo;<dd><a name="index-g_t_002dN_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-817"></a><a name="index-g_t_002d_002dno_002dfuzzy_002dmatching_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-818"></a>Do not use fuzzy matching when an exact match is not found. This may speed
  5096. up the operation considerably.
  5097. <br><dt>&lsquo;<samp><span class="samp">--use-fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002d_002duse_002dfuzzy_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-819"></a>Consider fuzzy messages in the <var>def</var>.po file like translated messages.
  5098. Note that using this option is usually wrong, because fuzzy messages are
  5099. exactly those which have not been validated by a human translator.
  5100. <br><dt>&lsquo;<samp><span class="samp">--use-untranslated</span></samp>&rsquo;<dd><a name="index-g_t_002d_002duse_002duntranslated_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-820"></a>Consider untranslated messages in the <var>def</var>.po file like translated
  5101. messages. Note that using this option is usually wrong.
  5102. </dl>
  5103. <h4 class="subsection">9.7.3 Input file syntax</h4>
  5104. <dl>
  5105. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-821"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-822"></a>Assume the input files are Java ResourceBundles in Java <code>.properties</code>
  5106. syntax, not in PO file syntax.
  5107. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-823"></a>Assume the input files are NeXTstep/GNUstep localized resource files in
  5108. <code>.strings</code> syntax, not in PO file syntax.
  5109. </dl>
  5110. <h4 class="subsection">9.7.4 Informative output</h4>
  5111. <dl>
  5112. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-824"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-825"></a>Display this help and exit.
  5113. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-826"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-827"></a>Output version information and exit.
  5114. </dl>
  5115. <div class="node">
  5116. <a name="msgattrib-Invocation"></a>
  5117. <p><hr>
  5118. Next:&nbsp;<a rel="next" accesskey="n" href="#msgen-Invocation">msgen Invocation</a>,
  5119. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgcmp-Invocation">msgcmp Invocation</a>,
  5120. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  5121. </div>
  5122. <h3 class="section">9.8 Invoking the <code>msgattrib</code> Program</h3>
  5123. <p><a name="index-msgattrib-828"></a><a name="index-g_t_0040code_007bmsgattrib_007d-program_002c-usage-829"></a>
  5124. <pre class="example"> msgattrib [<var>option</var>] [<var>inputfile</var>]
  5125. </pre>
  5126. <p><a name="index-filter-messages-according-to-attributes-830"></a><a name="index-attribute-manipulation-831"></a>The <code>msgattrib</code> program filters the messages of a translation catalog
  5127. according to their attributes, and manipulates the attributes.
  5128. <h4 class="subsection">9.8.1 Input file location</h4>
  5129. <dl>
  5130. <dt>&lsquo;<samp><var>inputfile</var></samp>&rsquo;<dd>Input PO file.
  5131. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-832"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-833"></a>Add <var>directory</var> to the list of directories. Source files are
  5132. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  5133. file will be written relative to the current directory, though.
  5134. </dl>
  5135. <p>If no <var>inputfile</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  5136. <h4 class="subsection">9.8.2 Output file location</h4>
  5137. <dl>
  5138. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-834"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-835"></a>Write output to specified file.
  5139. </dl>
  5140. <p>The results are written to standard output if no output file is specified
  5141. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  5142. <h4 class="subsection">9.8.3 Message selection</h4>
  5143. <dl>
  5144. <dt>&lsquo;<samp><span class="samp">--translated</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dtranslated_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-836"></a>Keep translated messages, remove untranslated messages.
  5145. <br><dt>&lsquo;<samp><span class="samp">--untranslated</span></samp>&rsquo;<dd><a name="index-g_t_002d_002duntranslated_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-837"></a>Keep untranslated messages, remove translated messages.
  5146. <br><dt>&lsquo;<samp><span class="samp">--no-fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-838"></a>Remove
  5147. ‘fuzzy’
  5148. marked messages.
  5149. <br><dt>&lsquo;<samp><span class="samp">--only-fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002d_002donly_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-839"></a>Keep
  5150. ‘fuzzy’
  5151. marked messages, remove all other messages.
  5152. <br><dt>&lsquo;<samp><span class="samp">--no-obsolete</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-840"></a>Remove obsolete #~ messages.
  5153. <br><dt>&lsquo;<samp><span class="samp">--only-obsolete</span></samp>&rsquo;<dd><a name="index-g_t_002d_002donly_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-841"></a>Keep obsolete #~ messages, remove all other messages.
  5154. </dl>
  5155. <h4 class="subsection">9.8.4 Attribute manipulation</h4>
  5156. <p><a name="index-modify-message-attributes-842"></a>Attributes are modified after the message selection/removal has been
  5157. performed. If the &lsquo;<samp><span class="samp">--only-file</span></samp>&rsquo; or &lsquo;<samp><span class="samp">--ignore-file</span></samp>&rsquo; option is
  5158. specified, the attribute modification is applied only to those messages
  5159. that are listed in the <var>only-file</var> and not listed in the
  5160. <var>ignore-file</var>.
  5161. <dl>
  5162. <dt>&lsquo;<samp><span class="samp">--set-fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dset_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-843"></a>Set all messages
  5163. ‘fuzzy’.
  5164. <br><dt>&lsquo;<samp><span class="samp">--clear-fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dclear_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-844"></a>Set all messages
  5165. non-‘fuzzy’.
  5166. <br><dt>&lsquo;<samp><span class="samp">--set-obsolete</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dset_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-845"></a>Set all messages obsolete.
  5167. <br><dt>&lsquo;<samp><span class="samp">--clear-obsolete</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dclear_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-846"></a>Set all messages non-obsolete.
  5168. <br><dt>&lsquo;<samp><span class="samp">--clear-previous</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dclear_002dprevious_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-847"></a>Remove the &ldquo;previous msgid&rdquo; (&lsquo;<samp><span class="samp">#|</span></samp>&rsquo;) comments from all messages.
  5169. <br><dt>&lsquo;<samp><span class="samp">--only-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002donly_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-848"></a>Limit the attribute changes to entries that are listed in <var>file</var>.
  5170. <var>file</var> should be a PO or POT file.
  5171. <br><dt>&lsquo;<samp><span class="samp">--ignore-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dignore_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-849"></a>Limit the attribute changes to entries that are not listed in <var>file</var>.
  5172. <var>file</var> should be a PO or POT file.
  5173. <br><dt>&lsquo;<samp><span class="samp">--fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-850"></a>Synonym for &lsquo;<samp><span class="samp">--only-fuzzy --clear-fuzzy</span></samp>&rsquo;: It keeps only the fuzzy
  5174. messages and removes their
  5175. ‘fuzzy’
  5176. mark.
  5177. <br><dt>&lsquo;<samp><span class="samp">--obsolete</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-851"></a>Synonym for &lsquo;<samp><span class="samp">--only-obsolete --clear-obsolete</span></samp>&rsquo;: It keeps only the
  5178. obsolete messages and makes them non-obsolete.
  5179. </dl>
  5180. <h4 class="subsection">9.8.5 Input file syntax</h4>
  5181. <dl>
  5182. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-852"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-853"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  5183. syntax, not in PO file syntax.
  5184. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-854"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  5185. <code>.strings</code> syntax, not in PO file syntax.
  5186. </dl>
  5187. <h4 class="subsection">9.8.6 Output details</h4>
  5188. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  5189. <dl>
  5190. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-855"></a>Specify whether or when to use colors and other text attributes.
  5191. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  5192. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-856"></a>Specify the CSS style rule file to use for <code>--color</code>.
  5193. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  5194. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-857"></a>Always write an output file even if it contains no message.
  5195. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-858"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-859"></a>Write the .po file using indented style.
  5196. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-860"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  5197. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-861"></a><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-862"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  5198. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-863"></a>Write out a strict Uniforum conforming PO file. Note that this
  5199. Uniforum format should be avoided because it doesn't support the
  5200. GNU extensions.
  5201. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-864"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-865"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  5202. that this file format doesn't support plural forms and silently drops
  5203. obsolete messages.
  5204. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-866"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  5205. Note that this file format doesn't support plural forms.
  5206. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-867"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-868"></a>Set the output page width. Long strings in the output files will be
  5207. split across multiple lines in order to ensure that each line's width
  5208. (= number of screen columns) is less or equal to the given <var>number</var>.
  5209. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-869"></a>Do not break long message lines. Message lines whose width exceeds the
  5210. output page width will not be split into several lines. Only file reference
  5211. lines which are wider than the output page width will be split.
  5212. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-870"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-871"></a>Generate sorted output. Note that using this option makes it much harder
  5213. for the translator to understand each message's context.
  5214. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-872"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-873"></a>Sort output by file location.
  5215. </dl>
  5216. <h4 class="subsection">9.8.7 Informative output</h4>
  5217. <dl>
  5218. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-874"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-875"></a>Display this help and exit.
  5219. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-876"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-877"></a>Output version information and exit.
  5220. </dl>
  5221. <div class="node">
  5222. <a name="msgen-Invocation"></a>
  5223. <p><hr>
  5224. Next:&nbsp;<a rel="next" accesskey="n" href="#msgexec-Invocation">msgexec Invocation</a>,
  5225. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgattrib-Invocation">msgattrib Invocation</a>,
  5226. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  5227. </div>
  5228. <h3 class="section">9.9 Invoking the <code>msgen</code> Program</h3>
  5229. <p><a name="index-msgen-878"></a><a name="index-g_t_0040code_007bmsgen_007d-program_002c-usage-879"></a>
  5230. <pre class="example"> msgen [<var>option</var>] <var>inputfile</var>
  5231. </pre>
  5232. <p><a name="index-generate-translation-catalog-in-English-880"></a>The <code>msgen</code> program creates an English translation catalog. The
  5233. input file is the last created English PO file, or a PO Template file
  5234. (generally created by xgettext). Untranslated entries are assigned a
  5235. translation that is identical to the msgid.
  5236. <p>Note: &lsquo;<samp><span class="samp">msginit --no-translator --locale=en</span></samp>&rsquo; performs a very similar
  5237. task. The main difference is that <code>msginit</code> cares specially about
  5238. the header entry, whereas <code>msgen</code> doesn't.
  5239. <h4 class="subsection">9.9.1 Input file location</h4>
  5240. <dl>
  5241. <dt>&lsquo;<samp><var>inputfile</var></samp>&rsquo;<dd>Input PO or POT file.
  5242. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-881"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-882"></a>Add <var>directory</var> to the list of directories. Source files are
  5243. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  5244. file will be written relative to the current directory, though.
  5245. </dl>
  5246. <p>If <var>inputfile</var> is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  5247. <h4 class="subsection">9.9.2 Output file location</h4>
  5248. <dl>
  5249. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-883"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-884"></a>Write output to specified file.
  5250. </dl>
  5251. <p>The results are written to standard output if no output file is specified
  5252. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  5253. <h4 class="subsection">9.9.3 Input file syntax</h4>
  5254. <dl>
  5255. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-885"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-886"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  5256. syntax, not in PO file syntax.
  5257. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-887"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  5258. <code>.strings</code> syntax, not in PO file syntax.
  5259. </dl>
  5260. <h4 class="subsection">9.9.4 Output details</h4>
  5261. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  5262. <dl>
  5263. <dt>&lsquo;<samp><span class="samp">--lang=</span><var>catalogname</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dlang_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-888"></a>Specify the &lsquo;<samp><span class="samp">Language</span></samp>&rsquo; field to be used in the header entry. See
  5264. <a href="#Header-Entry">Header Entry</a> for the meaning of this field. Note: The
  5265. &lsquo;<samp><span class="samp">Language-Team</span></samp>&rsquo; and &lsquo;<samp><span class="samp">Plural-Forms</span></samp>&rsquo; fields are not set by this
  5266. option.
  5267. <br><dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-889"></a>Specify whether or when to use colors and other text attributes.
  5268. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  5269. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-890"></a>Specify the CSS style rule file to use for <code>--color</code>.
  5270. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  5271. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-891"></a>Always write an output file even if it contains no message.
  5272. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-892"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-893"></a>Write the .po file using indented style.
  5273. <br><dt>&lsquo;<samp><span class="samp">--no-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-894"></a>Do not write &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines.
  5274. <br><dt>&lsquo;<samp><span class="samp">--add-location</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-895"></a>Generate &lsquo;<samp><span class="samp">#: </span><var>filename</var><span class="samp">:</span><var>line</var></samp>&rsquo; lines (default).
  5275. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-896"></a>Write out a strict Uniforum conforming PO file. Note that this
  5276. Uniforum format should be avoided because it doesn't support the
  5277. GNU extensions.
  5278. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-897"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-898"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  5279. that this file format doesn't support plural forms and silently drops
  5280. obsolete messages.
  5281. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-899"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  5282. Note that this file format doesn't support plural forms.
  5283. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-900"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-901"></a>Set the output page width. Long strings in the output files will be
  5284. split across multiple lines in order to ensure that each line's width
  5285. (= number of screen columns) is less or equal to the given <var>number</var>.
  5286. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-902"></a>Do not break long message lines. Message lines whose width exceeds the
  5287. output page width will not be split into several lines. Only file reference
  5288. lines which are wider than the output page width will be split.
  5289. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-903"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-904"></a>Generate sorted output. Note that using this option makes it much harder
  5290. for the translator to understand each message's context.
  5291. <br><dt>&lsquo;<samp><span class="samp">-F</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-by-file</span></samp>&rsquo;<dd><a name="index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-905"></a><a name="index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-906"></a>Sort output by file location.
  5292. </dl>
  5293. <h4 class="subsection">9.9.5 Informative output</h4>
  5294. <dl>
  5295. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-907"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-908"></a>Display this help and exit.
  5296. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-909"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-910"></a>Output version information and exit.
  5297. </dl>
  5298. <div class="node">
  5299. <a name="msgexec-Invocation"></a>
  5300. <p><hr>
  5301. Next:&nbsp;<a rel="next" accesskey="n" href="#Colorizing">Colorizing</a>,
  5302. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgen-Invocation">msgen Invocation</a>,
  5303. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  5304. </div>
  5305. <h3 class="section">9.10 Invoking the <code>msgexec</code> Program</h3>
  5306. <p><a name="index-msgexec-911"></a><a name="index-g_t_0040code_007bmsgexec_007d-program_002c-usage-912"></a>
  5307. <pre class="example"> msgexec [<var>option</var>] <var>command</var> [<var>command-option</var>]
  5308. </pre>
  5309. <p><a name="index-apply-command-to-all-translations-in-a-catalog-913"></a>The <code>msgexec</code> program applies a command to all translations of a
  5310. translation catalog.
  5311. The <var>command</var> can be any program that reads a translation from standard
  5312. input. It is invoked once for each translation. Its output becomes
  5313. msgexec's output. <code>msgexec</code>'s return code is the maximum return code
  5314. across all invocations.
  5315. <p><a name="index-g_t_0040code_007bxargs_007d_002c-and-output-from-_0040code_007bmsgexec_007d-914"></a>A special builtin command called &lsquo;<samp><span class="samp">0</span></samp>&rsquo; outputs the translation, followed
  5316. by a null byte. The output of &lsquo;<samp><span class="samp">msgexec 0</span></samp>&rsquo; is suitable as input for
  5317. &lsquo;<samp><span class="samp">xargs -0</span></samp>&rsquo;.
  5318. <p><a name="index-MSGEXEC_005fMSGCTXT_0040r_007b_002c-environment-variable_007d-915"></a><a name="index-MSGEXEC_005fMSGID_0040r_007b_002c-environment-variable_007d-916"></a><a name="index-MSGEXEC_005fLOCATION_0040r_007b_002c-environment-variable_007d-917"></a>During each <var>command</var> invocation, the environment variable
  5319. <code>MSGEXEC_MSGID</code> is bound to the message's msgid, and the environment
  5320. variable <code>MSGEXEC_LOCATION</code> is bound to the location in the PO file
  5321. of the message. If the message has a context, the environment variable
  5322. <code>MSGEXEC_MSGCTXT</code> is bound to the message's msgctxt, otherwise it is
  5323. unbound.
  5324. <p><a name="index-catalog-encoding-and-_0040code_007bmsgexec_007d-output-918"></a>Note: It is your responsibility to ensure that the <var>command</var> can cope
  5325. with input encoded in the translation catalog's encoding. If the
  5326. <var>command</var> wants input in a particular encoding, you can in a first step
  5327. convert the translation catalog to that encoding using the &lsquo;<samp><span class="samp">msgconv</span></samp>&rsquo;
  5328. program, before invoking &lsquo;<samp><span class="samp">msgexec</span></samp>&rsquo;. If the <var>command</var> wants input
  5329. in the locale's encoding, but you want to avoid the locale's encoding, then
  5330. you can first convert the translation catalog to UTF-8 using the
  5331. &lsquo;<samp><span class="samp">msgconv</span></samp>&rsquo; program and then make &lsquo;<samp><span class="samp">msgexec</span></samp>&rsquo; work in an UTF-8
  5332. locale, by using the <code>LC_ALL</code> environment variable.
  5333. <h4 class="subsection">9.10.1 Input file location</h4>
  5334. <dl>
  5335. <dt>&lsquo;<samp><span class="samp">-i </span><var>inputfile</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--input=</span><var>inputfile</var></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-919"></a><a name="index-g_t_002d_002dinput_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-920"></a>Input PO file.
  5336. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-921"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-922"></a>Add <var>directory</var> to the list of directories. Source files are
  5337. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  5338. file will be written relative to the current directory, though.
  5339. </dl>
  5340. <p>If no <var>inputfile</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  5341. <h4 class="subsection">9.10.2 Input file syntax</h4>
  5342. <dl>
  5343. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-923"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-924"></a>Assume the input file is a Java ResourceBundle in Java <code>.properties</code>
  5344. syntax, not in PO file syntax.
  5345. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-925"></a>Assume the input file is a NeXTstep/GNUstep localized resource file in
  5346. <code>.strings</code> syntax, not in PO file syntax.
  5347. </dl>
  5348. <h4 class="subsection">9.10.3 Informative output</h4>
  5349. <dl>
  5350. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-926"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-927"></a>Display this help and exit.
  5351. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-928"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-929"></a>Output version information and exit.
  5352. </dl>
  5353. <div class="node">
  5354. <a name="Colorizing"></a>
  5355. <p><hr>
  5356. Next:&nbsp;<a rel="next" accesskey="n" href="#libgettextpo">libgettextpo</a>,
  5357. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgexec-Invocation">msgexec Invocation</a>,
  5358. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  5359. </div>
  5360. <h3 class="section">9.11 Highlighting parts of PO files</h3>
  5361. <p>Translators are usually only interested in seeing the untranslated and
  5362. fuzzy messages of a PO file. Also, when a message is set fuzzy because
  5363. the msgid changed, they want to see the differences between the previous
  5364. msgid and the current one (especially if the msgid is long and only few
  5365. words in it have changed). Finally, it's always welcome to highlight the
  5366. different sections of a message in a PO file (comments, msgid, msgstr, etc.).
  5367. <p>Such highlighting is possible through the <code>msgcat</code> options
  5368. &lsquo;<samp><span class="samp">--color</span></samp>&rsquo; and &lsquo;<samp><span class="samp">--style</span></samp>&rsquo;.
  5369. <ul class="menu">
  5370. <li><a accesskey="1" href="#The-_002d_002dcolor-option">The --color option</a>: Triggering colorized output
  5371. <li><a accesskey="2" href="#The-TERM-variable">The TERM variable</a>: The environment variable <code>TERM</code>
  5372. <li><a accesskey="3" href="#The-_002d_002dstyle-option">The --style option</a>: The <code>--style</code> option
  5373. <li><a accesskey="4" href="#Style-rules">Style rules</a>: Style rules for PO files
  5374. <li><a accesskey="5" href="#Customizing-less">Customizing less</a>: Customizing <code>less</code> for viewing PO files
  5375. </ul>
  5376. <div class="node">
  5377. <a name="The---color-option"></a>
  5378. <a name="The-_002d_002dcolor-option"></a>
  5379. <p><hr>
  5380. Next:&nbsp;<a rel="next" accesskey="n" href="#The-TERM-variable">The TERM variable</a>,
  5381. Up:&nbsp;<a rel="up" accesskey="u" href="#Colorizing">Colorizing</a>
  5382. </div>
  5383. <h4 class="subsection">9.11.1 The <code>--color</code> option</h4>
  5384. <p><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-930"></a>The &lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo; option specifies under which conditions
  5385. colorized output should be generated. The <var>when</var> part can be one of
  5386. the following:
  5387. <dl>
  5388. <dt><code>always</code><dt><code>yes</code><dd>The output will be colorized.
  5389. <br><dt><code>never</code><dt><code>no</code><dd>The output will not be colorized.
  5390. <br><dt><code>auto</code><dt><code>tty</code><dd>The output will be colorized if the output device is a tty, i.e. when the
  5391. output goes directly to a text screen or terminal emulator window.
  5392. <br><dt><code>html</code><dd>The output will be colorized and be in HTML format.
  5393. </dl>
  5394. <p class="noindent">&lsquo;<samp><span class="samp">--color</span></samp>&rsquo; is equivalent to &lsquo;<samp><span class="samp">--color=yes</span></samp>&rsquo;. The default is
  5395. &lsquo;<samp><span class="samp">--color=auto</span></samp>&rsquo;.
  5396. <p>Thus, a command like &lsquo;<samp><span class="samp">msgcat vi.po</span></samp>&rsquo; will produce colorized output
  5397. when called by itself in a command window. Whereas in a pipe, such as
  5398. &lsquo;<samp><span class="samp">msgcat vi.po | less -R</span></samp>&rsquo;, it will not produce colorized output. To
  5399. get colorized output in this situation nevertheless, use the command
  5400. &lsquo;<samp><span class="samp">msgcat --color vi.po | less -R</span></samp>&rsquo;.
  5401. <p>The &lsquo;<samp><span class="samp">--color=html</span></samp>&rsquo; option will produce output that can be viewed in
  5402. a browser. This can be useful, for example, for Indic languages,
  5403. because the renderic of Indic scripts in browser is usually better than
  5404. in terminal emulators.
  5405. <p>Note that the output produced with the <code>--color</code> option is <em>not</em>
  5406. a valid PO file in itself. It contains additional terminal-specific escape
  5407. sequences or HTML tags. A PO file reader will give a syntax error when
  5408. confronted with such content. Except for the &lsquo;<samp><span class="samp">--color=html</span></samp>&rsquo; case,
  5409. you therefore normally don't need to save output produced with the
  5410. <code>--color</code> option in a file.
  5411. <div class="node">
  5412. <a name="The-TERM-variable"></a>
  5413. <p><hr>
  5414. Next:&nbsp;<a rel="next" accesskey="n" href="#The-_002d_002dstyle-option">The --style option</a>,
  5415. Previous:&nbsp;<a rel="previous" accesskey="p" href="#The-_002d_002dcolor-option">The --color option</a>,
  5416. Up:&nbsp;<a rel="up" accesskey="u" href="#Colorizing">Colorizing</a>
  5417. </div>
  5418. <h4 class="subsection">9.11.2 The environment variable <code>TERM</code></h4>
  5419. <p><a name="index-TERM_0040r_007b_002c-environment-variable_007d-931"></a>The environment variable <code>TERM</code> contains a identifier for the text
  5420. window's capabilities. You can get a detailed list of these cababilities
  5421. by using the &lsquo;<samp><span class="samp">infocmp</span></samp>&rsquo; command, using &lsquo;<samp><span class="samp">man 5 terminfo</span></samp>&rsquo; as a
  5422. reference.
  5423. <p>When producing text with embedded color directives, <code>msgcat</code> looks
  5424. at the <code>TERM</code> variable. Text windows today typically support at least
  5425. 8 colors. Often, however, the text window supports 16 or more colors,
  5426. even though the <code>TERM</code> variable is set to a identifier denoting only
  5427. 8 supported colors. It can be worth setting the <code>TERM</code> variable to
  5428. a different value in these cases:
  5429. <dl>
  5430. <dt><code>xterm</code><dd><code>xterm</code> is in most cases built with support for 16 colors. It can also
  5431. be built with support for 88 or 256 colors (but not both). You can try to
  5432. set <code>TERM</code> to either <code>xterm-16color</code>, <code>xterm-88color</code>, or
  5433. <code>xterm-256color</code>.
  5434. <br><dt><code>rxvt</code><dd><code>rxvt</code> is often built with support for 16 colors. You can try to set
  5435. <code>TERM</code> to <code>rxvt-16color</code>.
  5436. <br><dt><code>konsole</code><dd><code>konsole</code> too is often built with support for 16 colors. You can try to
  5437. set <code>TERM</code> to <code>konsole-16color</code> or <code>xterm-16color</code>.
  5438. </dl>
  5439. <p>After setting <code>TERM</code>, you can verify it by invoking
  5440. &lsquo;<samp><span class="samp">msgcat --color=test</span></samp>&rsquo; and seeing whether the output looks like a
  5441. reasonable color map.
  5442. <div class="node">
  5443. <a name="The---style-option"></a>
  5444. <a name="The-_002d_002dstyle-option"></a>
  5445. <p><hr>
  5446. Next:&nbsp;<a rel="next" accesskey="n" href="#Style-rules">Style rules</a>,
  5447. Previous:&nbsp;<a rel="previous" accesskey="p" href="#The-TERM-variable">The TERM variable</a>,
  5448. Up:&nbsp;<a rel="up" accesskey="u" href="#Colorizing">Colorizing</a>
  5449. </div>
  5450. <h4 class="subsection">9.11.3 The <code>--style</code> option</h4>
  5451. <p><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-932"></a>The &lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo; option specifies the style file to use
  5452. when colorizing. It has an effect only when the <code>--color</code> option is
  5453. effective.
  5454. <p><a name="index-PO_005fSTYLE_0040r_007b_002c-environment-variable_007d-933"></a>If the <code>--style</code> option is not specified, the environment variable
  5455. <code>PO_STYLE</code> is considered. It is meant to point to the user's
  5456. preferred style for PO files.
  5457. <p>The default style file is <samp><span class="file">$prefix/share/gettext/styles/po-default.css</span></samp>,
  5458. where <code>$prefix</code> is the installation location.
  5459. <p>A few style files are predefined:
  5460. <dl>
  5461. <dt><samp><span class="file">po-vim.css</span></samp><dd>This style imitates the look used by vim 7.
  5462. <br><dt><samp><span class="file">po-emacs-x.css</span></samp><dd>This style imitates the look used by GNU Emacs 21 and 22 in an X11 window.
  5463. <br><dt><samp><span class="file">po-emacs-xterm.css</span></samp><dt><samp><span class="file">po-emacs-xterm16.css</span></samp><dt><samp><span class="file">po-emacs-xterm256.css</span></samp><dd>This style imitates the look used by GNU Emacs 22 in a terminal of type
  5464. &lsquo;<samp><span class="samp">xterm</span></samp>&rsquo; (8 colors) or &lsquo;<samp><span class="samp">xterm-16color</span></samp>&rsquo; (16 colors) or
  5465. &lsquo;<samp><span class="samp">xterm-256color</span></samp>&rsquo; (256 colors), respectively.
  5466. </dl>
  5467. <p class="noindent">You can use these styles without specifying a directory. They are actually
  5468. located in <samp><span class="file">$prefix/share/gettext/styles/</span></samp>, where <code>$prefix</code> is the
  5469. installation location.
  5470. <p>You can also design your own styles. This is described in the next section.
  5471. <div class="node">
  5472. <a name="Style-rules"></a>
  5473. <p><hr>
  5474. Next:&nbsp;<a rel="next" accesskey="n" href="#Customizing-less">Customizing less</a>,
  5475. Previous:&nbsp;<a rel="previous" accesskey="p" href="#The-_002d_002dstyle-option">The --style option</a>,
  5476. Up:&nbsp;<a rel="up" accesskey="u" href="#Colorizing">Colorizing</a>
  5477. </div>
  5478. <h4 class="subsection">9.11.4 Style rules for PO files</h4>
  5479. <p>The same style file can be used for styling of a PO file, for terminal
  5480. output and for HTML output. It is written in CSS (Cascading Style Sheet)
  5481. syntax. See <a href="http://www.w3.org/TR/css2/cover.html">http://www.w3.org/TR/css2/cover.html</a> for a formal
  5482. definition of CSS. Many HTML authoring tutorials also contain explanations
  5483. of CSS.
  5484. <p>In the case of HTML output, the style file is embedded in the HTML output.
  5485. In the case of text output, the style file is interpreted by the
  5486. <code>msgcat</code> program. This means, in particular, that when
  5487. <code>@import</code> is used with relative file names, the file names are
  5488. <ul>
  5489. <li>relative to the resulting HTML file, in the case of HTML output,
  5490. <li>relative to the style sheet containing the <code>@import</code>, in the case of
  5491. text output. (Actually, <code>@import</code>s are not yet supported in this case,
  5492. due to a limitation in <code>libcroco</code>.)
  5493. </ul>
  5494. <p>CSS rules are built up from selectors and declarations. The declarations
  5495. specify graphical properties; the selectors specify specify when they apply.
  5496. <p>In PO files, the following simple selectors (based on "CSS classes", see
  5497. the CSS2 spec, section 5.8.3) are supported.
  5498. <ul>
  5499. <li>Selectors that apply to entire messages:
  5500. <dl>
  5501. <dt><code>.header</code><dd>This matches the header entry of a PO file.
  5502. <br><dt><code>.translated</code><dd>This matches a translated message.
  5503. <br><dt><code>.untranslated</code><dd>This matches an untranslated message (i.e. a message with empty translation).
  5504. <br><dt><code>.fuzzy</code><dd>This matches a fuzzy message (i.e. a message which has a translation that
  5505. needs review by the translator).
  5506. <br><dt><code>.obsolete</code><dd>This matches an obsolete message (i.e. a message that was translated but is
  5507. not needed by the current POT file any more).
  5508. </dl>
  5509. <li>Selectors that apply to parts of a message in PO syntax. Recall the general
  5510. structure of a message in PO syntax:
  5511. <pre class="example"> <var>white-space</var>
  5512. # <var>translator-comments</var>
  5513. #. <var>extracted-comments</var>
  5514. #: <var>reference</var>...
  5515. #, <var>flag</var>...
  5516. #| msgid <var>previous-untranslated-string</var>
  5517. msgid <var>untranslated-string</var>
  5518. msgstr <var>translated-string</var>
  5519. </pre>
  5520. <dl>
  5521. <dt><code>.comment</code><dd>This matches all comments (translator comments, extracted comments,
  5522. source file reference comments, flag comments, previous message comments,
  5523. as well as the entire obsolete messages).
  5524. <br><dt><code>.translator-comment</code><dd>This matches the translator comments.
  5525. <br><dt><code>.extracted-comment</code><dd>This matches the extracted comments, i.e. the comments placed by the
  5526. programmer at the attention of the translator.
  5527. <br><dt><code>.reference-comment</code><dd>This matches the source file reference comments (entire lines).
  5528. <br><dt><code>.reference</code><dd>This matches the individual source file references inside the source file
  5529. reference comment lines.
  5530. <br><dt><code>.flag-comment</code><dd>This matches the flag comment lines (entire lines).
  5531. <br><dt><code>.flag</code><dd>This matches the individual flags inside flag comment lines.
  5532. <br><dt><code>.fuzzy-flag</code><dd>This matches the `fuzzy' flag inside flag comment lines.
  5533. <br><dt><code>.previous-comment</code><dd>This matches the comments containing the previous untranslated string (entire
  5534. lines).
  5535. <br><dt><code>.previous</code><dd>This matches the previous untranslated string including the string delimiters,
  5536. the associated keywords (<code>msgid</code> etc.) and the spaces between them.
  5537. <br><dt><code>.msgid</code><dd>This matches the untranslated string including the string delimiters,
  5538. the associated keywords (<code>msgid</code> etc.) and the spaces between them.
  5539. <br><dt><code>.msgstr</code><dd>This matches the translated string including the string delimiters,
  5540. the associated keywords (<code>msgstr</code> etc.) and the spaces between them.
  5541. <br><dt><code>.keyword</code><dd>This matches the keywords (<code>msgid</code>, <code>msgstr</code>, etc.).
  5542. <br><dt><code>.string</code><dd>This matches strings, including the string delimiters (double quotes).
  5543. </dl>
  5544. <li>Selectors that apply to parts of strings:
  5545. <dl>
  5546. <dt><code>.text</code><dd>This matches the entire contents of a string (excluding the string delimiters,
  5547. i.e. the double quotes).
  5548. <br><dt><code>.escape-sequence</code><dd>This matches an escape sequence (starting with a backslash).
  5549. <br><dt><code>.format-directive</code><dd>This matches a format string directive (starting with a &lsquo;<samp><span class="samp">%</span></samp>&rsquo; sign in the
  5550. case of most programming languages, with a &lsquo;<samp><span class="samp">{</span></samp>&rsquo; in the case of
  5551. <code>java-format</code> and <code>csharp-format</code>, with a &lsquo;<samp><span class="samp">~</span></samp>&rsquo; in the case of
  5552. <code>lisp-format</code> and <code>scheme-format</code>, or with &lsquo;<samp><span class="samp">$</span></samp>&rsquo; in the case of
  5553. <code>sh-format</code>).
  5554. <br><dt><code>.invalid-format-directive</code><dd>This matches an invalid format string directive.
  5555. <br><dt><code>.added</code><dd>In an untranslated string, this matches a part of the string that was not
  5556. present in the previous untranslated string. (Not yet implemented in this
  5557. release.)
  5558. <br><dt><code>.changed</code><dd>In an untranslated string or in a previous untranslated string, this matches
  5559. a part of the string that is changed or replaced. (Not yet implemented in
  5560. this release.)
  5561. <br><dt><code>.removed</code><dd>In a previous untranslated string, this matches a part of the string that
  5562. is not present in the current untranslated string. (Not yet implemented in
  5563. this release.)
  5564. </dl>
  5565. </ul>
  5566. <p>These selectors can be combined to hierarchical selectors. For example,
  5567. <pre class="smallexample"> .msgstr .invalid-format-directive { color: red; }
  5568. </pre>
  5569. <p class="noindent">will highlight the invalid format directives in the translated strings.
  5570. <p>In text mode, pseudo-classes (CSS2 spec, section 5.11) and pseudo-elements
  5571. (CSS2 spec, section 5.12) are not supported.
  5572. <p>The declarations in HTML mode are not limited; any graphical attribute
  5573. supported by the browsers can be used.
  5574. <p>The declarations in text mode are limited to the following properties. Other
  5575. properties will be silently ignored.
  5576. <dl>
  5577. <dt><code>color</code> (CSS2 spec, section 14.1)<dt><code>background-color</code> (CSS2 spec, section 14.2.1)<dd>These properties is supported. Colors will be adjusted to match the terminal's
  5578. capabilities. Note that many terminals support only 8 colors.
  5579. <br><dt><code>font-weight</code> (CSS2 spec, section 15.2.3)<dd>This property is supported, but most terminals can only render two different
  5580. weights: <code>normal</code> and <code>bold</code>. Values &gt;= 600 are rendered as
  5581. <code>bold</code>.
  5582. <br><dt><code>font-style</code> (CSS2 spec, section 15.2.3)<dd>This property is supported. The values <code>italic</code> and <code>oblique</code> are
  5583. rendered the same way.
  5584. <br><dt><code>text-decoration</code> (CSS2 spec, section 16.3.1)<dd>This property is supported, limited to the values <code>none</code> and
  5585. <code>underline</code>.
  5586. </dl>
  5587. <div class="node">
  5588. <a name="Customizing-less"></a>
  5589. <p><hr>
  5590. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Style-rules">Style rules</a>,
  5591. Up:&nbsp;<a rel="up" accesskey="u" href="#Colorizing">Colorizing</a>
  5592. </div>
  5593. <h4 class="subsection">9.11.5 Customizing <code>less</code> for viewing PO files</h4>
  5594. <p>The &lsquo;<samp><span class="samp">less</span></samp>&rsquo; program is a popular text file browser for use in a text
  5595. screen or terminal emulator. It also supports text with embedded escape
  5596. sequences for colors and text decorations.
  5597. <p>You can use <code>less</code> to view a PO file like this (assuming an UTF-8
  5598. environment):
  5599. <pre class="smallexample"> msgcat --to-code=UTF-8 --color xyz.po | less -R
  5600. </pre>
  5601. <p>You can simplify this to this simple command:
  5602. <pre class="smallexample"> less xyz.po
  5603. </pre>
  5604. <p class="noindent">after these three preparations:
  5605. <ol type=1 start=1>
  5606. <li>Add the options &lsquo;<samp><span class="samp">-R</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-f</span></samp>&rsquo; to the <code>LESS</code> environment
  5607. variable. In sh shells:
  5608. <pre class="smallexample"> $ LESS="$LESS -R -f"
  5609. $ export LESS
  5610. </pre>
  5611. <li>If your system does not already have the <samp><span class="file">lessopen.sh</span></samp> and
  5612. <samp><span class="file">lessclose.sh</span></samp> scripts, create them and set the <code>LESSOPEN</code> and
  5613. <code>LESSCLOSE</code> environment variables, as indicated in the manual page
  5614. (&lsquo;<samp><span class="samp">man less</span></samp>&rsquo;).
  5615. <li>Add to <samp><span class="file">lessopen.sh</span></samp> a piece of script that recognizes PO files
  5616. through their file extension and invokes <code>msgcat</code> on them, producing
  5617. a temporary file. Like this:
  5618. <pre class="smallexample"> case "$1" in
  5619. *.po)
  5620. tmpfile=`mktemp "${TMPDIR-/tmp}/less.XXXXXX"`
  5621. msgcat --to-code=UTF-8 --color "$1" &gt; "$tmpfile"
  5622. echo "$tmpfile"
  5623. exit 0
  5624. ;;
  5625. esac
  5626. </pre>
  5627. </ol>
  5628. <div class="node">
  5629. <a name="libgettextpo"></a>
  5630. <p><hr>
  5631. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Colorizing">Colorizing</a>,
  5632. Up:&nbsp;<a rel="up" accesskey="u" href="#Manipulating">Manipulating</a>
  5633. </div>
  5634. <h3 class="section">9.12 Writing your own programs that process PO files</h3>
  5635. <p>For the tasks for which a combination of &lsquo;<samp><span class="samp">msgattrib</span></samp>&rsquo;, &lsquo;<samp><span class="samp">msgcat</span></samp>&rsquo; etc.
  5636. is not sufficient, a set of C functions is provided in a library, to make it
  5637. possible to process PO files in your own programs. When you use this library,
  5638. you don't need to write routines to parse the PO file; instead, you retrieve
  5639. a pointer in memory to each of messages contained in the PO file. Functions
  5640. for writing PO files are not provided at this time.
  5641. <p>The functions are declared in the header file &lsquo;<samp><span class="samp">&lt;gettext-po.h&gt;</span></samp>&rsquo;, and are
  5642. defined in a library called &lsquo;<samp><span class="samp">libgettextpo</span></samp>&rsquo;.
  5643. <div class="defun">
  5644. &mdash; Data Type: <b>po_file_t</b><var><a name="index-po_005ffile_005ft-934"></a></var><br>
  5645. <blockquote><p>This is a pointer type that refers to the contents of a PO file, after it has
  5646. been read into memory.
  5647. </p></blockquote></div>
  5648. <div class="defun">
  5649. &mdash; Data Type: <b>po_message_iterator_t</b><var><a name="index-po_005fmessage_005fiterator_005ft-935"></a></var><br>
  5650. <blockquote><p>This is a pointer type that refers to an iterator that produces a sequence of
  5651. messages.
  5652. </p></blockquote></div>
  5653. <div class="defun">
  5654. &mdash; Data Type: <b>po_message_t</b><var><a name="index-po_005fmessage_005ft-936"></a></var><br>
  5655. <blockquote><p>This is a pointer type that refers to a message of a PO file, including its
  5656. translation.
  5657. </p></blockquote></div>
  5658. <div class="defun">
  5659. &mdash; Function: po_file_t <b>po_file_read</b> (<var>const char *filename</var>)<var><a name="index-po_005ffile_005fread-937"></a></var><br>
  5660. <blockquote><p>The <code>po_file_read</code> function reads a PO file into memory. The file name
  5661. is given as argument. The return value is a handle to the PO file's contents,
  5662. valid until <code>po_file_free</code> is called on it. In case of error, the return
  5663. value is <code>NULL</code>, and <code>errno</code> is set.
  5664. </p></blockquote></div>
  5665. <div class="defun">
  5666. &mdash; Function: void <b>po_file_free</b> (<var>po_file_t file</var>)<var><a name="index-po_005ffile_005ffree-938"></a></var><br>
  5667. <blockquote><p>The <code>po_file_free</code> function frees a PO file's contents from memory,
  5668. including all messages that are only implicitly accessible through iterators.
  5669. </p></blockquote></div>
  5670. <div class="defun">
  5671. &mdash; Function: const char * const * <b>po_file_domains</b> (<var>po_file_t file</var>)<var><a name="index-po_005ffile_005fdomains-939"></a></var><br>
  5672. <blockquote><p>The <code>po_file_domains</code> function returns the domains for which the given
  5673. PO file has messages. The return value is a <code>NULL</code> terminated array
  5674. which is valid as long as the <var>file</var> handle is valid. For PO files which
  5675. contain no &lsquo;<samp><span class="samp">domain</span></samp>&rsquo; directive, the return value contains only one domain,
  5676. namely the default domain <code>"messages"</code>.
  5677. </p></blockquote></div>
  5678. <div class="defun">
  5679. &mdash; Function: po_message_iterator_t <b>po_message_iterator</b> (<var>po_file_t file, const char *domain</var>)<var><a name="index-po_005fmessage_005fiterator-940"></a></var><br>
  5680. <blockquote><p>The <code>po_message_iterator</code> returns an iterator that will produce the
  5681. messages of <var>file</var> that belong to the given <var>domain</var>. If <var>domain</var>
  5682. is <code>NULL</code>, the default domain is used instead. To list the messages,
  5683. use the function <code>po_next_message</code> repeatedly.
  5684. </p></blockquote></div>
  5685. <div class="defun">
  5686. &mdash; Function: void <b>po_message_iterator_free</b> (<var>po_message_iterator_t iterator</var>)<var><a name="index-po_005fmessage_005fiterator_005ffree-941"></a></var><br>
  5687. <blockquote><p>The <code>po_message_iterator_free</code> function frees an iterator previously
  5688. allocated through the <code>po_message_iterator</code> function.
  5689. </p></blockquote></div>
  5690. <div class="defun">
  5691. &mdash; Function: po_message_t <b>po_next_message</b> (<var>po_message_iterator_t iterator</var>)<var><a name="index-po_005fnext_005fmessage-942"></a></var><br>
  5692. <blockquote><p>The <code>po_next_message</code> function returns the next message from
  5693. <var>iterator</var> and advances the iterator. It returns <code>NULL</code> when the
  5694. iterator has reached the end of its message list.
  5695. </p></blockquote></div>
  5696. <p>The following functions returns details of a <code>po_message_t</code>. Recall
  5697. that the results are valid as long as the <var>file</var> handle is valid.
  5698. <div class="defun">
  5699. &mdash; Function: const char * <b>po_message_msgid</b> (<var>po_message_t message</var>)<var><a name="index-po_005fmessage_005fmsgid-943"></a></var><br>
  5700. <blockquote><p>The <code>po_message_msgid</code> function returns the <code>msgid</code> (untranslated
  5701. English string) of a message. This is guaranteed to be non-<code>NULL</code>.
  5702. </p></blockquote></div>
  5703. <div class="defun">
  5704. &mdash; Function: const char * <b>po_message_msgid_plural</b> (<var>po_message_t message</var>)<var><a name="index-po_005fmessage_005fmsgid_005fplural-944"></a></var><br>
  5705. <blockquote><p>The <code>po_message_msgid_plural</code> function returns the <code>msgid_plural</code>
  5706. (untranslated English plural string) of a message with plurals, or <code>NULL</code>
  5707. for a message without plural.
  5708. </p></blockquote></div>
  5709. <div class="defun">
  5710. &mdash; Function: const char * <b>po_message_msgstr</b> (<var>po_message_t message</var>)<var><a name="index-po_005fmessage_005fmsgstr-945"></a></var><br>
  5711. <blockquote><p>The <code>po_message_msgstr</code> function returns the <code>msgstr</code> (translation)
  5712. of a message. For an untranslated message, the return value is an empty
  5713. string.
  5714. </p></blockquote></div>
  5715. <div class="defun">
  5716. &mdash; Function: const char * <b>po_message_msgstr_plural</b> (<var>po_message_t message, int index</var>)<var><a name="index-po_005fmessage_005fmsgstr_005fplural-946"></a></var><br>
  5717. <blockquote><p>The <code>po_message_msgstr_plural</code> function returns the
  5718. <code>msgstr[</code><var>index</var><code>]</code> of a message with plurals, or <code>NULL</code> when
  5719. the <var>index</var> is out of range or for a message without plural.
  5720. </p></blockquote></div>
  5721. <p>Here is an example code how these functions can be used.
  5722. <pre class="example"> const char *filename = ...;
  5723. po_file_t file = po_file_read (filename);
  5724. if (file == NULL)
  5725. error (EXIT_FAILURE, errno, "couldn't open the PO file %s", filename);
  5726. {
  5727. const char * const *domains = po_file_domains (file);
  5728. const char * const *domainp;
  5729. for (domainp = domains; *domainp; domainp++)
  5730. {
  5731. const char *domain = *domainp;
  5732. po_message_iterator_t iterator = po_message_iterator (file, domain);
  5733. for (;;)
  5734. {
  5735. po_message_t *message = po_next_message (iterator);
  5736. if (message == NULL)
  5737. break;
  5738. {
  5739. const char *msgid = po_message_msgid (message);
  5740. const char *msgstr = po_message_msgstr (message);
  5741. ...
  5742. }
  5743. }
  5744. po_message_iterator_free (iterator);
  5745. }
  5746. }
  5747. po_file_free (file);
  5748. </pre>
  5749. <div class="node">
  5750. <a name="Binaries"></a>
  5751. <p><hr>
  5752. Next:&nbsp;<a rel="next" accesskey="n" href="#Programmers">Programmers</a>,
  5753. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Manipulating">Manipulating</a>,
  5754. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  5755. </div>
  5756. <h2 class="chapter">10 Producing Binary MO Files</h2>
  5757. <!-- FIXME: Rewrite. -->
  5758. <ul class="menu">
  5759. <li><a accesskey="1" href="#msgfmt-Invocation">msgfmt Invocation</a>: Invoking the <code>msgfmt</code> Program
  5760. <li><a accesskey="2" href="#msgunfmt-Invocation">msgunfmt Invocation</a>: Invoking the <code>msgunfmt</code> Program
  5761. <li><a accesskey="3" href="#MO-Files">MO Files</a>: The Format of GNU MO Files
  5762. </ul>
  5763. <div class="node">
  5764. <a name="msgfmt-Invocation"></a>
  5765. <p><hr>
  5766. Next:&nbsp;<a rel="next" accesskey="n" href="#msgunfmt-Invocation">msgunfmt Invocation</a>,
  5767. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Binaries">Binaries</a>,
  5768. Up:&nbsp;<a rel="up" accesskey="u" href="#Binaries">Binaries</a>
  5769. </div>
  5770. <h3 class="section">10.1 Invoking the <code>msgfmt</code> Program</h3>
  5771. <p><a name="index-msgfmt-947"></a><a name="index-g_t_0040code_007bmsgfmt_007d-program_002c-usage-948"></a>
  5772. <pre class="example"> msgfmt [<var>option</var>] <var>filename</var>.po ...
  5773. </pre>
  5774. <p><a name="index-generate-binary-message-catalog-from-PO-file-949"></a>The <code>msgfmt</code> programs generates a binary message catalog from a textual
  5775. translation description.
  5776. <h4 class="subsection">10.1.1 Input file location</h4>
  5777. <dl>
  5778. <dt>&lsquo;<samp><var>filename</var><span class="samp">.po ...</span></samp>&rsquo;
  5779. <br><dt>&lsquo;<samp><span class="samp">-D </span><var>directory</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--directory=</span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-950"></a><a name="index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-951"></a>Add <var>directory</var> to the list of directories. Source files are
  5780. searched relative to this list of directories. The resulting <samp><span class="file">.po</span></samp>
  5781. file will be written relative to the current directory, though.
  5782. </dl>
  5783. <p>If an input file is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  5784. <h4 class="subsection">10.1.2 Operation mode</h4>
  5785. <dl>
  5786. <dt>&lsquo;<samp><span class="samp">-j</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--java</span></samp>&rsquo;<dd><a name="index-g_t_002dj_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-952"></a><a name="index-g_t_002d_002djava_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-953"></a><a name="index-Java-mode_002c-and-_0040code_007bmsgfmt_007d-program-954"></a>Java mode: generate a Java <code>ResourceBundle</code> class.
  5787. <br><dt>&lsquo;<samp><span class="samp">--java2</span></samp>&rsquo;<dd><a name="index-g_t_002d_002djava2_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-955"></a>Like &ndash;java, and assume Java2 (JDK 1.2 or higher).
  5788. <br><dt>&lsquo;<samp><span class="samp">--csharp</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcsharp_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-956"></a><a name="index-C_0023-mode_002c-and-_0040code_007bmsgfmt_007d-program-957"></a>C# mode: generate a .NET .dll file containing a subclass of
  5789. <code>GettextResourceSet</code>.
  5790. <br><dt>&lsquo;<samp><span class="samp">--csharp-resources</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcsharp_002dresources_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-958"></a><a name="index-C_0023-resources-mode_002c-and-_0040code_007bmsgfmt_007d-program-959"></a>C# resources mode: generate a .NET <samp><span class="file">.resources</span></samp> file.
  5791. <br><dt>&lsquo;<samp><span class="samp">--tcl</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dtcl_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-960"></a><a name="index-Tcl-mode_002c-and-_0040code_007bmsgfmt_007d-program-961"></a>Tcl mode: generate a tcl/msgcat <samp><span class="file">.msg</span></samp> file.
  5792. <br><dt>&lsquo;<samp><span class="samp">--qt</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dqt_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-962"></a><a name="index-Qt-mode_002c-and-_0040code_007bmsgfmt_007d-program-963"></a>Qt mode: generate a Qt <samp><span class="file">.qm</span></samp> file.
  5793. </dl>
  5794. <h4 class="subsection">10.1.3 Output file location</h4>
  5795. <dl>
  5796. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-964"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-965"></a>Write output to specified file.
  5797. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-966"></a>Direct the program to work strictly following the Uniforum/Sun
  5798. implementation. Currently this only affects the naming of the output
  5799. file. If this option is not given the name of the output file is the
  5800. same as the domain name. If the strict Uniforum mode is enabled the
  5801. suffix <samp><span class="file">.mo</span></samp> is added to the file name if it is not already
  5802. present.
  5803. <p>We find this behaviour of Sun's implementation rather silly and so by
  5804. default this mode is <em>not</em> selected.
  5805. </dl>
  5806. <p>If the output <var>file</var> is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, output is written to standard output.
  5807. <h4 class="subsection">10.1.4 Output file location in Java mode</h4>
  5808. <dl>
  5809. <dt>&lsquo;<samp><span class="samp">-r </span><var>resource</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--resource=</span><var>resource</var></samp>&rsquo;<dd><a name="index-g_t_002dr_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-967"></a><a name="index-g_t_002d_002dresource_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-968"></a>Specify the resource name.
  5810. <br><dt>&lsquo;<samp><span class="samp">-l </span><var>locale</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>locale</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-969"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-970"></a>Specify the locale name, either a language specification of the form <var>ll</var>
  5811. or a combined language and country specification of the form <var>ll_CC</var>.
  5812. <br><dt>&lsquo;<samp><span class="samp">-d </span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-971"></a>Specify the base directory of classes directory hierarchy.
  5813. </dl>
  5814. <p>The class name is determined by appending the locale name to the resource name,
  5815. separated with an underscore. The &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; option is mandatory. The class
  5816. is written under the specified directory.
  5817. <h4 class="subsection">10.1.5 Output file location in C# mode</h4>
  5818. <dl>
  5819. <dt>&lsquo;<samp><span class="samp">-r </span><var>resource</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--resource=</span><var>resource</var></samp>&rsquo;<dd><a name="index-g_t_002dr_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-972"></a><a name="index-g_t_002d_002dresource_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-973"></a>Specify the resource name.
  5820. <br><dt>&lsquo;<samp><span class="samp">-l </span><var>locale</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>locale</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-974"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-975"></a>Specify the locale name, either a language specification of the form <var>ll</var>
  5821. or a combined language and country specification of the form <var>ll_CC</var>.
  5822. <br><dt>&lsquo;<samp><span class="samp">-d </span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-976"></a>Specify the base directory for locale dependent <samp><span class="file">.dll</span></samp> files.
  5823. </dl>
  5824. <p>The &lsquo;<samp><span class="samp">-l</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; options are mandatory. The <samp><span class="file">.dll</span></samp> file is
  5825. written in a subdirectory of the specified directory whose name depends on the
  5826. locale.
  5827. <h4 class="subsection">10.1.6 Output file location in Tcl mode</h4>
  5828. <dl>
  5829. <dt>&lsquo;<samp><span class="samp">-l </span><var>locale</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>locale</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-977"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-978"></a>Specify the locale name, either a language specification of the form <var>ll</var>
  5830. or a combined language and country specification of the form <var>ll_CC</var>.
  5831. <br><dt>&lsquo;<samp><span class="samp">-d </span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-979"></a>Specify the base directory of <samp><span class="file">.msg</span></samp> message catalogs.
  5832. </dl>
  5833. <p>The &lsquo;<samp><span class="samp">-l</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; options are mandatory. The <samp><span class="file">.msg</span></samp> file is
  5834. written in the specified directory.
  5835. <h4 class="subsection">10.1.7 Input file syntax</h4>
  5836. <dl>
  5837. <dt>&lsquo;<samp><span class="samp">-P</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-input</span></samp>&rsquo;<dd><a name="index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-980"></a><a name="index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-981"></a>Assume the input files are Java ResourceBundles in Java <code>.properties</code>
  5838. syntax, not in PO file syntax.
  5839. <br><dt>&lsquo;<samp><span class="samp">--stringtable-input</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-982"></a>Assume the input files are NeXTstep/GNUstep localized resource files in
  5840. <code>.strings</code> syntax, not in PO file syntax.
  5841. </dl>
  5842. <h4 class="subsection">10.1.8 Input file interpretation</h4>
  5843. <dl>
  5844. <dt>&lsquo;<samp><span class="samp">-c</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--check</span></samp>&rsquo;<dd><a name="index-g_t_002dc_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-983"></a><a name="index-g_t_002d_002dcheck_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-984"></a>Perform all the checks implied by <code>--check-format</code>, <code>--check-header</code>,
  5845. <code>--check-domain</code>.
  5846. <br><dt>&lsquo;<samp><span class="samp">--check-format</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcheck_002dformat_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-985"></a><a name="index-check-format-strings-986"></a>Check language dependent format strings.
  5847. <p>If the string represents a format string used in a
  5848. <code>printf</code>-like function both strings should have the same number of
  5849. &lsquo;<samp><span class="samp">%</span></samp>&rsquo; format specifiers, with matching types. If the flag
  5850. <code>c-format</code> or <code>possible-c-format</code> appears in the special
  5851. comment &lt;#,&gt; for this entry a check is performed. For example, the
  5852. check will diagnose using &lsquo;<samp><span class="samp">%.*s</span></samp>&rsquo; against &lsquo;<samp><span class="samp">%s</span></samp>&rsquo;, or &lsquo;<samp><span class="samp">%d</span></samp>&rsquo;
  5853. against &lsquo;<samp><span class="samp">%s</span></samp>&rsquo;, or &lsquo;<samp><span class="samp">%d</span></samp>&rsquo; against &lsquo;<samp><span class="samp">%x</span></samp>&rsquo;. It can even handle
  5854. positional parameters.
  5855. <p>Normally the <code>xgettext</code> program automatically decides whether a
  5856. string is a format string or not. This algorithm is not perfect,
  5857. though. It might regard a string as a format string though it is not
  5858. used in a <code>printf</code>-like function and so <code>msgfmt</code> might report
  5859. errors where there are none.
  5860. <p>To solve this problem the programmer can dictate the decision to the
  5861. <code>xgettext</code> program (see <a href="#c_002dformat">c-format</a>). The translator should not
  5862. consider removing the flag from the &lt;#,&gt; line. This "fix" would be
  5863. reversed again as soon as <code>msgmerge</code> is called the next time.
  5864. <br><dt>&lsquo;<samp><span class="samp">--check-header</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcheck_002dheader_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-987"></a>Verify presence and contents of the header entry. See <a href="#Header-Entry">Header Entry</a>,
  5865. for a description of the various fields in the header entry.
  5866. <br><dt>&lsquo;<samp><span class="samp">--check-domain</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcheck_002ddomain_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-988"></a>Check for conflicts between domain directives and the <code>--output-file</code>
  5867. option
  5868. <br><dt>&lsquo;<samp><span class="samp">-C</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--check-compatibility</span></samp>&rsquo;<dd><a name="index-g_t_002dC_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-989"></a><a name="index-g_t_002d_002dcheck_002dcompatibility_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-990"></a><a name="index-compatibility-with-X_002fOpen-_0040code_007bmsgfmt_007d-991"></a>Check that GNU msgfmt behaves like X/Open msgfmt. This will give an error
  5869. when attempting to use the GNU extensions.
  5870. <br><dt>&lsquo;<samp><span class="samp">--check-accelerators[=</span><var>char</var><span class="samp">]</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcheck_002daccelerators_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-992"></a><a name="index-keyboard-accelerator-checking-993"></a><a name="index-menu_002c-keyboard-accelerator-support-994"></a><a name="index-mnemonics-of-menu-entries-995"></a>Check presence of keyboard accelerators for menu items. This is based on
  5871. the convention used in some GUIs that a keyboard accelerator in a menu
  5872. item string is designated by an immediately preceding &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; character.
  5873. Sometimes a keyboard accelerator is also called "keyboard mnemonic".
  5874. This check verifies that if the untranslated string has exactly one
  5875. &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; character, the translated string has exactly one &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; as well.
  5876. If this option is given with a <var>char</var> argument, this <var>char</var> should
  5877. be a non-alphanumeric character and is used as keyboard accelerator mark
  5878. instead of &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo;.
  5879. <br><dt>&lsquo;<samp><span class="samp">-f</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--use-fuzzy</span></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-996"></a><a name="index-g_t_002d_002duse_002dfuzzy_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-997"></a><a name="index-force-use-of-fuzzy-entries-998"></a>Use fuzzy entries in output. Note that using this option is usually wrong,
  5880. because fuzzy messages are exactly those which have not been validated by
  5881. a human translator.
  5882. </dl>
  5883. <h4 class="subsection">10.1.9 Output details</h4>
  5884. <dl>
  5885. <dt>&lsquo;<samp><span class="samp">-a </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--alignment=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002da_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-999"></a><a name="index-g_t_002d_002dalignment_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1000"></a>Align strings to <var>number</var> bytes (default: 1).
  5886. <!-- Currently the README mentions that this constant could be changed by -->
  5887. <!-- the installer by changing the value in config.h. Should this go away? -->
  5888. <br><dt>&lsquo;<samp><span class="samp">--no-hash</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dhash_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1001"></a>Don't include a hash table in the binary file. Lookup will be more expensive
  5889. at run time (binary search instead of hash table lookup).
  5890. </dl>
  5891. <h4 class="subsection">10.1.10 Informative output</h4>
  5892. <dl>
  5893. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1002"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1003"></a>Display this help and exit.
  5894. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1004"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1005"></a>Output version information and exit.
  5895. <br><dt>&lsquo;<samp><span class="samp">--statistics</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstatistics_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1006"></a>Print statistics about translations. When the option <code>--verbose</code> is used
  5896. in combination with <code>--statistics</code>, the input file name is printed in
  5897. front of the statistics line.
  5898. <br><dt>&lsquo;<samp><span class="samp">-v</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--verbose</span></samp>&rsquo;<dd><a name="index-g_t_002dv_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1007"></a><a name="index-g_t_002d_002dverbose_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1008"></a>Increase verbosity level.
  5899. </dl>
  5900. <div class="node">
  5901. <a name="msgunfmt-Invocation"></a>
  5902. <p><hr>
  5903. Next:&nbsp;<a rel="next" accesskey="n" href="#MO-Files">MO Files</a>,
  5904. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgfmt-Invocation">msgfmt Invocation</a>,
  5905. Up:&nbsp;<a rel="up" accesskey="u" href="#Binaries">Binaries</a>
  5906. </div>
  5907. <h3 class="section">10.2 Invoking the <code>msgunfmt</code> Program</h3>
  5908. <p><a name="index-msgunfmt-1009"></a><a name="index-g_t_0040code_007bmsgunfmt_007d-program_002c-usage-1010"></a>
  5909. <pre class="example"> msgunfmt [<var>option</var>] [<var>file</var>]...
  5910. </pre>
  5911. <p><a name="index-convert-binary-message-catalog-into-PO-file-1011"></a>The <code>msgunfmt</code> program converts a binary message catalog to a
  5912. Uniforum style .po file.
  5913. <h4 class="subsection">10.2.1 Operation mode</h4>
  5914. <dl>
  5915. <dt>&lsquo;<samp><span class="samp">-j</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--java</span></samp>&rsquo;<dd><a name="index-g_t_002dj_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1012"></a><a name="index-g_t_002d_002djava_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1013"></a><a name="index-Java-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1014"></a>Java mode: input is a Java <code>ResourceBundle</code> class.
  5916. <br><dt>&lsquo;<samp><span class="samp">--csharp</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcsharp_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1015"></a><a name="index-C_0023-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1016"></a>C# mode: input is a .NET .dll file containing a subclass of
  5917. <code>GettextResourceSet</code>.
  5918. <br><dt>&lsquo;<samp><span class="samp">--csharp-resources</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dcsharp_002dresources_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1017"></a><a name="index-C_0023-resources-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1018"></a>C# resources mode: input is a .NET <samp><span class="file">.resources</span></samp> file.
  5919. <br><dt>&lsquo;<samp><span class="samp">--tcl</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dtcl_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1019"></a><a name="index-Tcl-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1020"></a>Tcl mode: input is a tcl/msgcat <samp><span class="file">.msg</span></samp> file.
  5920. </dl>
  5921. <h4 class="subsection">10.2.2 Input file location</h4>
  5922. <dl>
  5923. <dt>&lsquo;<samp><var>file</var><span class="samp"> ...</span></samp>&rsquo;<dd>Input .mo files.
  5924. </dl>
  5925. <p>If no input <var>file</var> is given or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;, standard input is read.
  5926. <h4 class="subsection">10.2.3 Input file location in Java mode</h4>
  5927. <dl>
  5928. <dt>&lsquo;<samp><span class="samp">-r </span><var>resource</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--resource=</span><var>resource</var></samp>&rsquo;<dd><a name="index-g_t_002dr_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1021"></a><a name="index-g_t_002d_002dresource_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1022"></a>Specify the resource name.
  5929. <br><dt>&lsquo;<samp><span class="samp">-l </span><var>locale</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>locale</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1023"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1024"></a>Specify the locale name, either a language specification of the form <var>ll</var>
  5930. or a combined language and country specification of the form <var>ll_CC</var>.
  5931. </dl>
  5932. <p>The class name is determined by appending the locale name to the resource name,
  5933. separated with an underscore. The class is located using the <code>CLASSPATH</code>.
  5934. <h4 class="subsection">10.2.4 Input file location in C# mode</h4>
  5935. <dl>
  5936. <dt>&lsquo;<samp><span class="samp">-r </span><var>resource</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--resource=</span><var>resource</var></samp>&rsquo;<dd><a name="index-g_t_002dr_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1025"></a><a name="index-g_t_002d_002dresource_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1026"></a>Specify the resource name.
  5937. <br><dt>&lsquo;<samp><span class="samp">-l </span><var>locale</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>locale</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1027"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1028"></a>Specify the locale name, either a language specification of the form <var>ll</var>
  5938. or a combined language and country specification of the form <var>ll_CC</var>.
  5939. <br><dt>&lsquo;<samp><span class="samp">-d </span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1029"></a>Specify the base directory for locale dependent <samp><span class="file">.dll</span></samp> files.
  5940. </dl>
  5941. <p>The &lsquo;<samp><span class="samp">-l</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; options are mandatory. The <samp><span class="file">.msg</span></samp> file is
  5942. located in a subdirectory of the specified directory whose name depends on the
  5943. locale.
  5944. <h4 class="subsection">10.2.5 Input file location in Tcl mode</h4>
  5945. <dl>
  5946. <dt>&lsquo;<samp><span class="samp">-l </span><var>locale</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--locale=</span><var>locale</var></samp>&rsquo;<dd><a name="index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1030"></a><a name="index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1031"></a>Specify the locale name, either a language specification of the form <var>ll</var>
  5947. or a combined language and country specification of the form <var>ll_CC</var>.
  5948. <br><dt>&lsquo;<samp><span class="samp">-d </span><var>directory</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1032"></a>Specify the base directory of <samp><span class="file">.msg</span></samp> message catalogs.
  5949. </dl>
  5950. <p>The &lsquo;<samp><span class="samp">-l</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-d</span></samp>&rsquo; options are mandatory. The <samp><span class="file">.msg</span></samp> file is
  5951. located in the specified directory.
  5952. <h4 class="subsection">10.2.6 Output file location</h4>
  5953. <dl>
  5954. <dt>&lsquo;<samp><span class="samp">-o </span><var>file</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--output-file=</span><var>file</var></samp>&rsquo;<dd><a name="index-g_t_002do_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1033"></a><a name="index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1034"></a>Write output to specified file.
  5955. </dl>
  5956. <p>The results are written to standard output if no output file is specified
  5957. or if it is &lsquo;<samp><span class="samp">-</span></samp>&rsquo;.
  5958. <h4 class="subsection">10.2.7 Output details</h4>
  5959. <!-- no-escape and -escape omitted on purpose. They are not useful. -->
  5960. <dl>
  5961. <dt>&lsquo;<samp><span class="samp">--color</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--color=</span><var>when</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1035"></a>Specify whether or when to use colors and other text attributes.
  5962. See <a href="#The-_002d_002dcolor-option">The &ndash;color option</a> for details.
  5963. <br><dt>&lsquo;<samp><span class="samp">--style=</span><var>style_file</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1036"></a>Specify the CSS style rule file to use for <code>--color</code>.
  5964. See <a href="#The-_002d_002dstyle-option">The &ndash;style option</a> for details.
  5965. <br><dt>&lsquo;<samp><span class="samp">--force-po</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1037"></a>Always write an output file even if it contains no message.
  5966. <br><dt>&lsquo;<samp><span class="samp">-i</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--indent</span></samp>&rsquo;<dd><a name="index-g_t_002di_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1038"></a><a name="index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1039"></a>Write the .po file using indented style.
  5967. <br><dt>&lsquo;<samp><span class="samp">--strict</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1040"></a>Write out a strict Uniforum conforming PO file. Note that this
  5968. Uniforum format should be avoided because it doesn't support the
  5969. GNU extensions.
  5970. <br><dt>&lsquo;<samp><span class="samp">-p</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--properties-output</span></samp>&rsquo;<dd><a name="index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1041"></a><a name="index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1042"></a>Write out a Java ResourceBundle in Java <code>.properties</code> syntax. Note
  5971. that this file format doesn't support plural forms and silently drops
  5972. obsolete messages.
  5973. <br><dt>&lsquo;<samp><span class="samp">--stringtable-output</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1043"></a>Write out a NeXTstep/GNUstep localized resource file in <code>.strings</code> syntax.
  5974. Note that this file format doesn't support plural forms.
  5975. <br><dt>&lsquo;<samp><span class="samp">-w </span><var>number</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--width=</span><var>number</var></samp>&rsquo;<dd><a name="index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1044"></a><a name="index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1045"></a>Set the output page width. Long strings in the output files will be
  5976. split across multiple lines in order to ensure that each line's width
  5977. (= number of screen columns) is less or equal to the given <var>number</var>.
  5978. <br><dt>&lsquo;<samp><span class="samp">--no-wrap</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1046"></a>Do not break long message lines. Message lines whose width exceeds the
  5979. output page width will not be split into several lines. Only file reference
  5980. lines which are wider than the output page width will be split.
  5981. <br><dt>&lsquo;<samp><span class="samp">-s</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--sort-output</span></samp>&rsquo;<dd><a name="index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1047"></a><a name="index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1048"></a><a name="index-sorting-_0040code_007bmsgunfmt_007d-output-1049"></a>Generate sorted output. Note that using this option makes it much harder
  5982. for the translator to understand each message's context.
  5983. </dl>
  5984. <h4 class="subsection">10.2.8 Informative output</h4>
  5985. <dl>
  5986. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1050"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1051"></a>Display this help and exit.
  5987. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1052"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1053"></a>Output version information and exit.
  5988. <br><dt>&lsquo;<samp><span class="samp">-v</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--verbose</span></samp>&rsquo;<dd><a name="index-g_t_002dv_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1054"></a><a name="index-g_t_002d_002dverbose_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1055"></a>Increase verbosity level.
  5989. </dl>
  5990. <div class="node">
  5991. <a name="MO-Files"></a>
  5992. <p><hr>
  5993. Previous:&nbsp;<a rel="previous" accesskey="p" href="#msgunfmt-Invocation">msgunfmt Invocation</a>,
  5994. Up:&nbsp;<a rel="up" accesskey="u" href="#Binaries">Binaries</a>
  5995. </div>
  5996. <h3 class="section">10.3 The Format of GNU MO Files</h3>
  5997. <p><a name="index-MO-file_0027s-format-1056"></a><a name="index-file-format_002c-_0040file_007b_002emo_007d-1057"></a>
  5998. The format of the generated MO files is best described by a picture,
  5999. which appears below.
  6000. <p><a name="index-magic-signature-of-MO-files-1058"></a>The first two words serve the identification of the file. The magic
  6001. number will always signal GNU MO files. The number is stored in the
  6002. byte order of the generating machine, so the magic number really is
  6003. two numbers: <code>0x950412de</code> and <code>0xde120495</code>.
  6004. <p>The second word describes the current revision of the file format,
  6005. composed of a major and a minor revision number. The revision numbers
  6006. ensure that the readers of MO files can distinguish new formats from
  6007. old ones and handle their contents, as far as possible. For now the
  6008. major revision is 0 or 1, and the minor revision is also 0 or 1. More
  6009. revisions might be added in the future. A program seeing an unexpected
  6010. major revision number should stop reading the MO file entirely; whereas
  6011. an unexpected minor revision number means that the file can be read but
  6012. will not reveal its full contents, when parsed by a program that
  6013. supports only smaller minor revision numbers.
  6014. <p>The version is kept
  6015. separate from the magic number, instead of using different magic
  6016. numbers for different formats, mainly because <samp><span class="file">/etc/magic</span></samp> is
  6017. not updated often.
  6018. <p>Follow a number of pointers to later tables in the file, allowing
  6019. for the extension of the prefix part of MO files without having to
  6020. recompile programs reading them. This might become useful for later
  6021. inserting a few flag bits, indication about the charset used, new
  6022. tables, or other things.
  6023. <p>Then, at offset <var>O</var> and offset <var>T</var> in the picture, two tables
  6024. of string descriptors can be found. In both tables, each string
  6025. descriptor uses two 32 bits integers, one for the string length,
  6026. another for the offset of the string in the MO file, counting in bytes
  6027. from the start of the file. The first table contains descriptors
  6028. for the original strings, and is sorted so the original strings
  6029. are in increasing lexicographical order. The second table contains
  6030. descriptors for the translated strings, and is parallel to the first
  6031. table: to find the corresponding translation one has to access the
  6032. array slot in the second array with the same index.
  6033. <p>Having the original strings sorted enables the use of simple binary
  6034. search, for when the MO file does not contain an hashing table, or
  6035. for when it is not practical to use the hashing table provided in
  6036. the MO file. This also has another advantage, as the empty string
  6037. in a PO file GNU <code>gettext</code> is usually <em>translated</em> into
  6038. some system information attached to that particular MO file, and the
  6039. empty string necessarily becomes the first in both the original and
  6040. translated tables, making the system information very easy to find.
  6041. <p><a name="index-hash-table_002c-inside-MO-files-1059"></a>The size <var>S</var> of the hash table can be zero. In this case, the
  6042. hash table itself is not contained in the MO file. Some people might
  6043. prefer this because a precomputed hashing table takes disk space, and
  6044. does not win <em>that</em> much speed. The hash table contains indices
  6045. to the sorted array of strings in the MO file. Conflict resolution is
  6046. done by double hashing. The precise hashing algorithm used is fairly
  6047. dependent on GNU <code>gettext</code> code, and is not documented here.
  6048. <p>As for the strings themselves, they follow the hash file, and each
  6049. is terminated with a &lt;NUL&gt;, and this &lt;NUL&gt; is not counted in
  6050. the length which appears in the string descriptor. The <code>msgfmt</code>
  6051. program has an option selecting the alignment for MO file strings.
  6052. With this option, each string is separately aligned so it starts at
  6053. an offset which is a multiple of the alignment value. On some RISC
  6054. machines, a correct alignment will speed things up.
  6055. <p><a name="index-context_002c-in-MO-files-1060"></a>Contexts are stored by storing the concatenation of the context, a
  6056. &lt;EOT&gt; byte, and the original string, instead of the original string.
  6057. <p><a name="index-plural-forms_002c-in-MO-files-1061"></a>Plural forms are stored by letting the plural of the original string
  6058. follow the singular of the original string, separated through a
  6059. &lt;NUL&gt; byte. The length which appears in the string descriptor
  6060. includes both. However, only the singular of the original string
  6061. takes part in the hash table lookup. The plural variants of the
  6062. translation are all stored consecutively, separated through a
  6063. &lt;NUL&gt; byte. Here also, the length in the string descriptor
  6064. includes all of them.
  6065. <p>Nothing prevents a MO file from having embedded &lt;NUL&gt;s in strings.
  6066. However, the program interface currently used already presumes
  6067. that strings are &lt;NUL&gt; terminated, so embedded &lt;NUL&gt;s are
  6068. somewhat useless. But the MO file format is general enough so other
  6069. interfaces would be later possible, if for example, we ever want to
  6070. implement wide characters right in MO files, where &lt;NUL&gt; bytes may
  6071. accidentally appear. (No, we don't want to have wide characters in MO
  6072. files. They would make the file unnecessarily large, and the
  6073. &lsquo;<samp><span class="samp">wchar_t</span></samp>&rsquo; type being platform dependent, MO files would be
  6074. platform dependent as well.)
  6075. <p>This particular issue has been strongly debated in the GNU
  6076. <code>gettext</code> development forum, and it is expectable that MO file
  6077. format will evolve or change over time. It is even possible that many
  6078. formats may later be supported concurrently. But surely, we have to
  6079. start somewhere, and the MO file format described here is a good start.
  6080. Nothing is cast in concrete, and the format may later evolve fairly
  6081. easily, so we should feel comfortable with the current approach.
  6082. <pre class="example"> byte
  6083. +------------------------------------------+
  6084. 0 | magic number = 0x950412de |
  6085. | |
  6086. 4 | file format revision = 0 |
  6087. | |
  6088. 8 | number of strings | == N
  6089. | |
  6090. 12 | offset of table with original strings | == O
  6091. | |
  6092. 16 | offset of table with translation strings | == T
  6093. | |
  6094. 20 | size of hashing table | == S
  6095. | |
  6096. 24 | offset of hashing table | == H
  6097. | |
  6098. . .
  6099. . (possibly more entries later) .
  6100. . .
  6101. | |
  6102. O | length &amp; offset 0th string ----------------.
  6103. O + 8 | length &amp; offset 1st string ------------------.
  6104. ... ... | |
  6105. O + ((N-1)*8)| length &amp; offset (N-1)th string | | |
  6106. | | | |
  6107. T | length &amp; offset 0th translation ---------------.
  6108. T + 8 | length &amp; offset 1st translation -----------------.
  6109. ... ... | | | |
  6110. T + ((N-1)*8)| length &amp; offset (N-1)th translation | | | | |
  6111. | | | | | |
  6112. H | start hash table | | | | |
  6113. ... ... | | | |
  6114. H + S * 4 | end hash table | | | | |
  6115. | | | | | |
  6116. | NUL terminated 0th string &lt;----------------' | | |
  6117. | | | | |
  6118. | NUL terminated 1st string &lt;------------------' | |
  6119. | | | |
  6120. ... ... | |
  6121. | | | |
  6122. | NUL terminated 0th translation &lt;---------------' |
  6123. | | |
  6124. | NUL terminated 1st translation &lt;-----------------'
  6125. | |
  6126. ... ...
  6127. | |
  6128. +------------------------------------------+
  6129. </pre>
  6130. <div class="node">
  6131. <a name="Programmers"></a>
  6132. <p><hr>
  6133. Next:&nbsp;<a rel="next" accesskey="n" href="#Translators">Translators</a>,
  6134. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Binaries">Binaries</a>,
  6135. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  6136. </div>
  6137. <h2 class="chapter">11 The Programmer's View</h2>
  6138. <!-- FIXME: Reorganize whole chapter. -->
  6139. <p>One aim of the current message catalog implementation provided by
  6140. GNU <code>gettext</code> was to use the system's message catalog handling, if the
  6141. installer wishes to do so. So we perhaps should first take a look at
  6142. the solutions we know about. The people in the POSIX committee did not
  6143. manage to agree on one of the semi-official standards which we'll
  6144. describe below. In fact they couldn't agree on anything, so they decided
  6145. only to include an example of an interface. The major Unix vendors
  6146. are split in the usage of the two most important specifications: X/Open's
  6147. catgets vs. Uniforum's gettext interface. We'll describe them both and
  6148. later explain our solution of this dilemma.
  6149. <ul class="menu">
  6150. <li><a accesskey="1" href="#catgets">catgets</a>: About <code>catgets</code>
  6151. <li><a accesskey="2" href="#gettext">gettext</a>: About <code>gettext</code>
  6152. <li><a accesskey="3" href="#Comparison">Comparison</a>: Comparing the two interfaces
  6153. <li><a accesskey="4" href="#Using-libintl_002ea">Using libintl.a</a>: Using libintl.a in own programs
  6154. <li><a accesskey="5" href="#gettext-grok">gettext grok</a>: Being a <code>gettext</code> grok
  6155. <li><a accesskey="6" href="#Temp-Programmers">Temp Programmers</a>: Temporary Notes for the Programmers Chapter
  6156. </ul>
  6157. <div class="node">
  6158. <a name="catgets"></a>
  6159. <p><hr>
  6160. Next:&nbsp;<a rel="next" accesskey="n" href="#gettext">gettext</a>,
  6161. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programmers">Programmers</a>,
  6162. Up:&nbsp;<a rel="up" accesskey="u" href="#Programmers">Programmers</a>
  6163. </div>
  6164. <h3 class="section">11.1 About <code>catgets</code></h3>
  6165. <p><a name="index-g_t_0040code_007bcatgets_007d_002c-X_002fOpen-specification-1062"></a>
  6166. The <code>catgets</code> implementation is defined in the X/Open Portability
  6167. Guide, Volume 3, XSI Supplementary Definitions, Chapter 5. But the
  6168. process of creating this standard seemed to be too slow for some of
  6169. the Unix vendors so they created their implementations on preliminary
  6170. versions of the standard. Of course this leads again to problems while
  6171. writing platform independent programs: even the usage of <code>catgets</code>
  6172. does not guarantee a unique interface.
  6173. <p>Another, personal comment on this that only a bunch of committee members
  6174. could have made this interface. They never really tried to program
  6175. using this interface. It is a fast, memory-saving implementation, an
  6176. user can happily live with it. But programmers hate it (at least I and
  6177. some others do<small class="dots">...</small>)
  6178. <p>But we must not forget one point: after all the trouble with transferring
  6179. the rights on Unix(tm) they at last came to X/Open, the very same who
  6180. published this specification. This leads me to making the prediction
  6181. that this interface will be in future Unix standards (e.g. Spec1170) and
  6182. therefore part of all Unix implementation (implementations, which are
  6183. <em>allowed</em> to wear this name).
  6184. <ul class="menu">
  6185. <li><a accesskey="1" href="#Interface-to-catgets">Interface to catgets</a>: The interface
  6186. <li><a accesskey="2" href="#Problems-with-catgets">Problems with catgets</a>: Problems with the <code>catgets</code> interface?!
  6187. </ul>
  6188. <div class="node">
  6189. <a name="Interface-to-catgets"></a>
  6190. <p><hr>
  6191. Next:&nbsp;<a rel="next" accesskey="n" href="#Problems-with-catgets">Problems with catgets</a>,
  6192. Previous:&nbsp;<a rel="previous" accesskey="p" href="#catgets">catgets</a>,
  6193. Up:&nbsp;<a rel="up" accesskey="u" href="#catgets">catgets</a>
  6194. </div>
  6195. <h4 class="subsection">11.1.1 The Interface</h4>
  6196. <p><a name="index-interface-to-_0040code_007bcatgets_007d-1063"></a>
  6197. The interface to the <code>catgets</code> implementation consists of three
  6198. functions which correspond to those used in file access: <code>catopen</code>
  6199. to open the catalog for using, <code>catgets</code> for accessing the message
  6200. tables, and <code>catclose</code> for closing after work is done. Prototypes
  6201. for the functions and the needed definitions are in the
  6202. <code>&lt;nl_types.h&gt;</code> header file.
  6203. <p><a name="index-g_t_0040code_007bcatopen_007d_002c-a-_0040code_007bcatgets_007d-function-1064"></a><code>catopen</code> is used like in this:
  6204. <pre class="example"> nl_catd catd = catopen ("catalog_name", 0);
  6205. </pre>
  6206. <p>The function takes as the argument the name of the catalog. This usual
  6207. refers to the name of the program or the package. The second parameter
  6208. is not further specified in the standard. I don't even know whether it
  6209. is implemented consistently among various systems. So the common advice
  6210. is to use <code>0</code> as the value. The return value is a handle to the
  6211. message catalog, equivalent to handles to file returned by <code>open</code>.
  6212. <p><a name="index-g_t_0040code_007bcatgets_007d_002c-a-_0040code_007bcatgets_007d-function-1065"></a>This handle is of course used in the <code>catgets</code> function which can
  6213. be used like this:
  6214. <pre class="example"> char *translation = catgets (catd, set_no, msg_id, "original string");
  6215. </pre>
  6216. <p>The first parameter is this catalog descriptor. The second parameter
  6217. specifies the set of messages in this catalog, in which the message
  6218. described by <code>msg_id</code> is obtained. <code>catgets</code> therefore uses a
  6219. three-stage addressing:
  6220. <pre class="display"> catalog name &rArr; set number &rArr; message ID &rArr; translation
  6221. </pre>
  6222. <!-- Anybody else loving Haskell??? :-) - Uli -->
  6223. <p>The fourth argument is not used to address the translation. It is given
  6224. as a default value in case when one of the addressing stages fail. One
  6225. important thing to remember is that although the return type of catgets
  6226. is <code>char *</code> the resulting string <em>must not</em> be changed. It
  6227. should better be <code>const char *</code>, but the standard is published in
  6228. 1988, one year before ANSI C.
  6229. <p class="noindent"><a name="index-g_t_0040code_007bcatclose_007d_002c-a-_0040code_007bcatgets_007d-function-1066"></a>The last of these functions is used and behaves as expected:
  6230. <pre class="example"> catclose (catd);
  6231. </pre>
  6232. <p>After this no <code>catgets</code> call using the descriptor is legal anymore.
  6233. <div class="node">
  6234. <a name="Problems-with-catgets"></a>
  6235. <p><hr>
  6236. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Interface-to-catgets">Interface to catgets</a>,
  6237. Up:&nbsp;<a rel="up" accesskey="u" href="#catgets">catgets</a>
  6238. </div>
  6239. <h4 class="subsection">11.1.2 Problems with the <code>catgets</code> Interface?!</h4>
  6240. <p><a name="index-problems-with-_0040code_007bcatgets_007d-interface-1067"></a>
  6241. Now that this description seemed to be really easy &mdash; where are the
  6242. problems we speak of? In fact the interface could be used in a
  6243. reasonable way, but constructing the message catalogs is a pain. The
  6244. reason for this lies in the third argument of <code>catgets</code>: the unique
  6245. message ID. This has to be a numeric value for all messages in a single
  6246. set. Perhaps you could imagine the problems keeping such a list while
  6247. changing the source code. Add a new message here, remove one there. Of
  6248. course there have been developed a lot of tools helping to organize this
  6249. chaos but one as the other fails in one aspect or the other. We don't
  6250. want to say that the other approach has no problems but they are far
  6251. more easy to manage.
  6252. <div class="node">
  6253. <a name="gettext"></a>
  6254. <p><hr>
  6255. Next:&nbsp;<a rel="next" accesskey="n" href="#Comparison">Comparison</a>,
  6256. Previous:&nbsp;<a rel="previous" accesskey="p" href="#catgets">catgets</a>,
  6257. Up:&nbsp;<a rel="up" accesskey="u" href="#Programmers">Programmers</a>
  6258. </div>
  6259. <h3 class="section">11.2 About <code>gettext</code></h3>
  6260. <p><a name="index-g_t_0040code_007bgettext_007d_002c-a-programmer_0027s-view-1068"></a>
  6261. The definition of the <code>gettext</code> interface comes from a Uniforum
  6262. proposal. It was submitted there by Sun, who had implemented the
  6263. <code>gettext</code> function in SunOS 4, around 1990. Nowadays, the
  6264. <code>gettext</code> interface is specified by the OpenI18N standard.
  6265. <p>The main point about this solution is that it does not follow the
  6266. method of normal file handling (open-use-close) and that it does not
  6267. burden the programmer with so many tasks, especially the unique key handling.
  6268. Of course here also a unique key is needed, but this key is the message
  6269. itself (how long or short it is). See <a href="#Comparison">Comparison</a> for a more
  6270. detailed comparison of the two methods.
  6271. <p>The following section contains a rather detailed description of the
  6272. interface. We make it that detailed because this is the interface
  6273. we chose for the GNU <code>gettext</code> Library. Programmers interested
  6274. in using this library will be interested in this description.
  6275. <ul class="menu">
  6276. <li><a accesskey="1" href="#Interface-to-gettext">Interface to gettext</a>: The interface
  6277. <li><a accesskey="2" href="#Ambiguities">Ambiguities</a>: Solving ambiguities
  6278. <li><a accesskey="3" href="#Locating-Catalogs">Locating Catalogs</a>: Locating message catalog files
  6279. <li><a accesskey="4" href="#Charset-conversion">Charset conversion</a>: How to request conversion to Unicode
  6280. <li><a accesskey="5" href="#Contexts">Contexts</a>: Solving ambiguities in GUI programs
  6281. <li><a accesskey="6" href="#Plural-forms">Plural forms</a>: Additional functions for handling plurals
  6282. <li><a accesskey="7" href="#Optimized-gettext">Optimized gettext</a>: Optimization of the *gettext functions
  6283. </ul>
  6284. <div class="node">
  6285. <a name="Interface-to-gettext"></a>
  6286. <p><hr>
  6287. Next:&nbsp;<a rel="next" accesskey="n" href="#Ambiguities">Ambiguities</a>,
  6288. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gettext">gettext</a>,
  6289. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6290. </div>
  6291. <h4 class="subsection">11.2.1 The Interface</h4>
  6292. <p><a name="index-g_t_0040code_007bgettext_007d-interface-1069"></a>
  6293. The minimal functionality an interface must have is a) to select a
  6294. domain the strings are coming from (a single domain for all programs is
  6295. not reasonable because its construction and maintenance is difficult,
  6296. perhaps impossible) and b) to access a string in a selected domain.
  6297. <p>This is principally the description of the <code>gettext</code> interface. It
  6298. has a global domain which unqualified usages reference. Of course this
  6299. domain is selectable by the user.
  6300. <pre class="example"> char *textdomain (const char *domain_name);
  6301. </pre>
  6302. <p>This provides the possibility to change or query the current status of
  6303. the current global domain of the <code>LC_MESSAGE</code> category. The
  6304. argument is a null-terminated string, whose characters must be legal in
  6305. the use in filenames. If the <var>domain_name</var> argument is <code>NULL</code>,
  6306. the function returns the current value. If no value has been set
  6307. before, the name of the default domain is returned: <em>messages</em>.
  6308. Please note that although the return value of <code>textdomain</code> is of
  6309. type <code>char *</code> no changing is allowed. It is also important to know
  6310. that no checks of the availability are made. If the name is not
  6311. available you will see this by the fact that no translations are provided.
  6312. <p class="noindent">To use a domain set by <code>textdomain</code> the function
  6313. <pre class="example"> char *gettext (const char *msgid);
  6314. </pre>
  6315. <p class="noindent">is to be used. This is the simplest reasonable form one can imagine.
  6316. The translation of the string <var>msgid</var> is returned if it is available
  6317. in the current domain. If it is not available, the argument itself is
  6318. returned. If the argument is <code>NULL</code> the result is undefined.
  6319. <p>One thing which should come into mind is that no explicit dependency to
  6320. the used domain is given. The current value of the domain is used.
  6321. If this changes between two
  6322. executions of the same <code>gettext</code> call in the program, both calls
  6323. reference a different message catalog.
  6324. <p>For the easiest case, which is normally used in internationalized
  6325. packages, once at the beginning of execution a call to <code>textdomain</code>
  6326. is issued, setting the domain to a unique name, normally the package
  6327. name. In the following code all strings which have to be translated are
  6328. filtered through the gettext function. That's all, the package speaks
  6329. your language.
  6330. <div class="node">
  6331. <a name="Ambiguities"></a>
  6332. <p><hr>
  6333. Next:&nbsp;<a rel="next" accesskey="n" href="#Locating-Catalogs">Locating Catalogs</a>,
  6334. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Interface-to-gettext">Interface to gettext</a>,
  6335. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6336. </div>
  6337. <h4 class="subsection">11.2.2 Solving Ambiguities</h4>
  6338. <p><a name="index-several-domains-1070"></a><a name="index-domain-ambiguities-1071"></a><a name="index-large-package-1072"></a>
  6339. While this single name domain works well for most applications there
  6340. might be the need to get translations from more than one domain. Of
  6341. course one could switch between different domains with calls to
  6342. <code>textdomain</code>, but this is really not convenient nor is it fast. A
  6343. possible situation could be one case subject to discussion during this
  6344. writing: all
  6345. error messages of functions in the set of common used functions should
  6346. go into a separate domain <code>error</code>. By this mean we would only need
  6347. to translate them once.
  6348. Another case are messages from a library, as these <em>have</em> to be
  6349. independent of the current domain set by the application.
  6350. <p class="noindent">For this reasons there are two more functions to retrieve strings:
  6351. <pre class="example"> char *dgettext (const char *domain_name, const char *msgid);
  6352. char *dcgettext (const char *domain_name, const char *msgid,
  6353. int category);
  6354. </pre>
  6355. <p>Both take an additional argument at the first place, which corresponds
  6356. to the argument of <code>textdomain</code>. The third argument of
  6357. <code>dcgettext</code> allows to use another locale category but <code>LC_MESSAGES</code>.
  6358. But I really don't know where this can be useful. If the
  6359. <var>domain_name</var> is <code>NULL</code> or <var>category</var> has an value beside
  6360. the known ones, the result is undefined. It should also be noted that
  6361. this function is not part of the second known implementation of this
  6362. function family, the one found in Solaris.
  6363. <p>A second ambiguity can arise by the fact, that perhaps more than one
  6364. domain has the same name. This can be solved by specifying where the
  6365. needed message catalog files can be found.
  6366. <pre class="example"> char *bindtextdomain (const char *domain_name,
  6367. const char *dir_name);
  6368. </pre>
  6369. <p>Calling this function binds the given domain to a file in the specified
  6370. directory (how this file is determined follows below). Especially a
  6371. file in the systems default place is not favored against the specified
  6372. file anymore (as it would be by solely using <code>textdomain</code>). A
  6373. <code>NULL</code> pointer for the <var>dir_name</var> parameter returns the binding
  6374. associated with <var>domain_name</var>. If <var>domain_name</var> itself is
  6375. <code>NULL</code> nothing happens and a <code>NULL</code> pointer is returned. Here
  6376. again as for all the other functions is true that none of the return
  6377. value must be changed!
  6378. <p>It is important to remember that relative path names for the
  6379. <var>dir_name</var> parameter can be trouble. Since the path is always
  6380. computed relative to the current directory different results will be
  6381. achieved when the program executes a <code>chdir</code> command. Relative
  6382. paths should always be avoided to avoid dependencies and
  6383. unreliabilities.
  6384. <div class="node">
  6385. <a name="Locating-Catalogs"></a>
  6386. <p><hr>
  6387. Next:&nbsp;<a rel="next" accesskey="n" href="#Charset-conversion">Charset conversion</a>,
  6388. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Ambiguities">Ambiguities</a>,
  6389. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6390. </div>
  6391. <h4 class="subsection">11.2.3 Locating Message Catalog Files</h4>
  6392. <p><a name="index-message-catalog-files-location-1073"></a>
  6393. Because many different languages for many different packages have to be
  6394. stored we need some way to add these information to file message catalog
  6395. files. The way usually used in Unix environments is have this encoding
  6396. in the file name. This is also done here. The directory name given in
  6397. <code>bindtextdomain</code>s second argument (or the default directory),
  6398. followed by the name of the locale, the locale category, and the domain name
  6399. are concatenated:
  6400. <pre class="example"> <var>dir_name</var>/<var>locale</var>/LC_<var>category</var>/<var>domain_name</var>.mo
  6401. </pre>
  6402. <p>The default value for <var>dir_name</var> is system specific. For the GNU
  6403. library, and for packages adhering to its conventions, it's:
  6404. <pre class="example"> /usr/local/share/locale
  6405. </pre>
  6406. <p class="noindent"><var>locale</var> is the name of the locale category which is designated by
  6407. <code>LC_</code><var>category</var>. For <code>gettext</code> and <code>dgettext</code> this
  6408. <code>LC_</code><var>category</var> is always <code>LC_MESSAGES</code>.<a rel="footnote" href="#fn-3" name="fnd-3"><sup>3</sup></a>
  6409. The name of the locale category is determined through
  6410. <code>setlocale (LC_</code><var>category</var><code>, NULL)</code>.
  6411. <a rel="footnote" href="#fn-4" name="fnd-4"><sup>4</sup></a>
  6412. When using the function <code>dcgettext</code>, you can specify the locale category
  6413. through the third argument.
  6414. <div class="node">
  6415. <a name="Charset-conversion"></a>
  6416. <p><hr>
  6417. Next:&nbsp;<a rel="next" accesskey="n" href="#Contexts">Contexts</a>,
  6418. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Locating-Catalogs">Locating Catalogs</a>,
  6419. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6420. </div>
  6421. <h4 class="subsection">11.2.4 How to specify the output character set <code>gettext</code> uses</h4>
  6422. <p><a name="index-charset-conversion-at-runtime-1074"></a><a name="index-encoding-conversion-at-runtime-1075"></a>
  6423. <code>gettext</code> not only looks up a translation in a message catalog. It
  6424. also converts the translation on the fly to the desired output character
  6425. set. This is useful if the user is working in a different character set
  6426. than the translator who created the message catalog, because it avoids
  6427. distributing variants of message catalogs which differ only in the
  6428. character set.
  6429. <p>The output character set is, by default, the value of <code>nl_langinfo
  6430. (CODESET)</code>, which depends on the <code>LC_CTYPE</code> part of the current
  6431. locale. But programs which store strings in a locale independent way
  6432. (e.g. UTF-8) can request that <code>gettext</code> and related functions
  6433. return the translations in that encoding, by use of the
  6434. <code>bind_textdomain_codeset</code> function.
  6435. <p>Note that the <var>msgid</var> argument to <code>gettext</code> is not subject to
  6436. character set conversion. Also, when <code>gettext</code> does not find a
  6437. translation for <var>msgid</var>, it returns <var>msgid</var> unchanged &ndash;
  6438. independently of the current output character set. It is therefore
  6439. recommended that all <var>msgid</var>s be US-ASCII strings.
  6440. <div class="defun">
  6441. &mdash; Function: char * <b>bind_textdomain_codeset</b> (<var>const char *domainname, const char *codeset</var>)<var><a name="index-bind_005ftextdomain_005fcodeset-1076"></a></var><br>
  6442. <blockquote><p>The <code>bind_textdomain_codeset</code> function can be used to specify the
  6443. output character set for message catalogs for domain <var>domainname</var>.
  6444. The <var>codeset</var> argument must be a valid codeset name which can be used
  6445. for the <code>iconv_open</code> function, or a null pointer.
  6446. <p>If the <var>codeset</var> parameter is the null pointer,
  6447. <code>bind_textdomain_codeset</code> returns the currently selected codeset
  6448. for the domain with the name <var>domainname</var>. It returns <code>NULL</code> if
  6449. no codeset has yet been selected.
  6450. <p>The <code>bind_textdomain_codeset</code> function can be used several times.
  6451. If used multiple times with the same <var>domainname</var> argument, the
  6452. later call overrides the settings made by the earlier one.
  6453. <p>The <code>bind_textdomain_codeset</code> function returns a pointer to a
  6454. string containing the name of the selected codeset. The string is
  6455. allocated internally in the function and must not be changed by the
  6456. user. If the system went out of core during the execution of
  6457. <code>bind_textdomain_codeset</code>, the return value is <code>NULL</code> and the
  6458. global variable <var>errno</var> is set accordingly.
  6459. </p></blockquote></div>
  6460. <div class="node">
  6461. <a name="Contexts"></a>
  6462. <p><hr>
  6463. Next:&nbsp;<a rel="next" accesskey="n" href="#Plural-forms">Plural forms</a>,
  6464. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Charset-conversion">Charset conversion</a>,
  6465. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6466. </div>
  6467. <h4 class="subsection">11.2.5 Using contexts for solving ambiguities</h4>
  6468. <p><a name="index-context-1077"></a><a name="index-GUI-programs-1078"></a><a name="index-translating-menu-entries-1079"></a><a name="index-menu-entries-1080"></a>
  6469. One place where the <code>gettext</code> functions, if used normally, have big
  6470. problems is within programs with graphical user interfaces (GUIs). The
  6471. problem is that many of the strings which have to be translated are very
  6472. short. They have to appear in pull-down menus which restricts the
  6473. length. But strings which are not containing entire sentences or at
  6474. least large fragments of a sentence may appear in more than one
  6475. situation in the program but might have different translations. This is
  6476. especially true for the one-word strings which are frequently used in
  6477. GUI programs.
  6478. <p>As a consequence many people say that the <code>gettext</code> approach is
  6479. wrong and instead <code>catgets</code> should be used which indeed does not
  6480. have this problem. But there is a very simple and powerful method to
  6481. handle this kind of problems with the <code>gettext</code> functions.
  6482. <p>Contexts can be added to strings to be translated. A context dependent
  6483. translation lookup is when a translation for a given string is searched,
  6484. that is limited to a given context. The translation for the same string
  6485. in a different context can be different. The different translations of
  6486. the same string in different contexts can be stored in the in the same
  6487. MO file, and can be edited by the translator in the same PO file.
  6488. <p>The <samp><span class="file">gettext.h</span></samp> include file contains the lookup macros for strings
  6489. with contexts. They are implemented as thin macros and inline functions
  6490. over the functions from <code>&lt;libintl.h&gt;</code>.
  6491. <p><a name="index-pgettext-1081"></a>
  6492. <pre class="example"> const char *pgettext (const char *msgctxt, const char *msgid);
  6493. </pre>
  6494. <p>In a call of this macro, <var>msgctxt</var> and <var>msgid</var> must be string
  6495. literals. The macro returns the translation of <var>msgid</var>, restricted
  6496. to the context given by <var>msgctxt</var>.
  6497. <p>The <var>msgctxt</var> string is visible in the PO file to the translator.
  6498. You should try to make it somehow canonical and never changing. Because
  6499. every time you change an <var>msgctxt</var>, the translator will have to review
  6500. the translation of <var>msgid</var>.
  6501. <p>Finding a canonical <var>msgctxt</var> string that doesn't change over time can
  6502. be hard. But you shouldn't use the file name or class name containing the
  6503. <code>pgettext</code> call &ndash; because it is a common development task to rename
  6504. a file or a class, and it shouldn't cause translator work. Also you shouldn't
  6505. use a comment in the form of a complete English sentence as <var>msgctxt</var> &ndash;
  6506. because orthography or grammar changes are often applied to such sentences,
  6507. and again, it shouldn't force the translator to do a review.
  6508. <p>The &lsquo;<samp><span class="samp">p</span></samp>&rsquo; in &lsquo;<samp><span class="samp">pgettext</span></samp>&rsquo; stands for &ldquo;particular&rdquo;: <code>pgettext</code>
  6509. fetches a particular translation of the <var>msgid</var>.
  6510. <p><a name="index-dpgettext-1082"></a><a name="index-dcpgettext-1083"></a>
  6511. <pre class="example"> const char *dpgettext (const char *domain_name,
  6512. const char *msgctxt, const char *msgid);
  6513. const char *dcpgettext (const char *domain_name,
  6514. const char *msgctxt, const char *msgid,
  6515. int category);
  6516. </pre>
  6517. <p>These are generalizations of <code>pgettext</code>. They behave similarly to
  6518. <code>dgettext</code> and <code>dcgettext</code>, respectively. The <var>domain_name</var>
  6519. argument defines the translation domain. The <var>category</var> argument
  6520. allows to use another locale category than <code>LC_MESSAGES</code>.
  6521. <p>As as example consider the following fictional situation. A GUI program
  6522. has a menu bar with the following entries:
  6523. <pre class="smallexample"> +------------+------------+--------------------------------------+
  6524. | File | Printer | |
  6525. +------------+------------+--------------------------------------+
  6526. | Open | | Select |
  6527. | New | | Open |
  6528. +----------+ | Connect |
  6529. +----------+
  6530. </pre>
  6531. <p>To have the strings <code>File</code>, <code>Printer</code>, <code>Open</code>,
  6532. <code>New</code>, <code>Select</code>, and <code>Connect</code> translated there has to be
  6533. at some point in the code a call to a function of the <code>gettext</code>
  6534. family. But in two places the string passed into the function would be
  6535. <code>Open</code>. The translations might not be the same and therefore we
  6536. are in the dilemma described above.
  6537. <p>What distinguishes the two places is the menu path from the menu root to
  6538. the particular menu entries:
  6539. <pre class="smallexample"> Menu|File
  6540. Menu|Printer
  6541. Menu|File|Open
  6542. Menu|File|New
  6543. Menu|Printer|Select
  6544. Menu|Printer|Open
  6545. Menu|Printer|Connect
  6546. </pre>
  6547. <p>The context is thus the menu path without its last part. So, the calls
  6548. look like this:
  6549. <pre class="smallexample"> pgettext ("Menu|", "File")
  6550. pgettext ("Menu|", "Printer")
  6551. pgettext ("Menu|File|", "Open")
  6552. pgettext ("Menu|File|", "New")
  6553. pgettext ("Menu|Printer|", "Select")
  6554. pgettext ("Menu|Printer|", "Open")
  6555. pgettext ("Menu|Printer|", "Connect")
  6556. </pre>
  6557. <p>Whether or not to use the &lsquo;<samp><span class="samp">|</span></samp>&rsquo; character at the end of the context is a
  6558. matter of style.
  6559. <p>For more complex cases, where the <var>msgctxt</var> or <var>msgid</var> are not
  6560. string literals, more general macros are available:
  6561. <p><a name="index-pgettext_005fexpr-1084"></a><a name="index-dpgettext_005fexpr-1085"></a><a name="index-dcpgettext_005fexpr-1086"></a>
  6562. <pre class="example"> const char *pgettext_expr (const char *msgctxt, const char *msgid);
  6563. const char *dpgettext_expr (const char *domain_name,
  6564. const char *msgctxt, const char *msgid);
  6565. const char *dcpgettext_expr (const char *domain_name,
  6566. const char *msgctxt, const char *msgid,
  6567. int category);
  6568. </pre>
  6569. <p>Here <var>msgctxt</var> and <var>msgid</var> can be arbitrary string-valued expressions.
  6570. These macros are more general. But in the case that both argument expressions
  6571. are string literals, the macros without the &lsquo;<samp><span class="samp">_expr</span></samp>&rsquo; suffix are more
  6572. efficient.
  6573. <div class="node">
  6574. <a name="Plural-forms"></a>
  6575. <p><hr>
  6576. Next:&nbsp;<a rel="next" accesskey="n" href="#Optimized-gettext">Optimized gettext</a>,
  6577. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Contexts">Contexts</a>,
  6578. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6579. </div>
  6580. <h4 class="subsection">11.2.6 Additional functions for plural forms</h4>
  6581. <p><a name="index-plural-forms-1087"></a>
  6582. The functions of the <code>gettext</code> family described so far (and all the
  6583. <code>catgets</code> functions as well) have one problem in the real world
  6584. which have been neglected completely in all existing approaches. What
  6585. is meant here is the handling of plural forms.
  6586. <p>Looking through Unix source code before the time anybody thought about
  6587. internationalization (and, sadly, even afterwards) one can often find
  6588. code similar to the following:
  6589. <pre class="smallexample"> printf ("%d file%s deleted", n, n == 1 ? "" : "s");
  6590. </pre>
  6591. <p class="noindent">After the first complaints from people internationalizing the code people
  6592. either completely avoided formulations like this or used strings like
  6593. <code>"file(s)"</code>. Both look unnatural and should be avoided. First
  6594. tries to solve the problem correctly looked like this:
  6595. <pre class="smallexample"> if (n == 1)
  6596. printf ("%d file deleted", n);
  6597. else
  6598. printf ("%d files deleted", n);
  6599. </pre>
  6600. <p>But this does not solve the problem. It helps languages where the
  6601. plural form of a noun is not simply constructed by adding an
  6602. ‘s’
  6603. but that is all. Once again people fell into the trap of believing the
  6604. rules their language is using are universal. But the handling of plural
  6605. forms differs widely between the language families. For example,
  6606. Rafal Maszkowski <code>&lt;rzm@mat.uni.torun.pl&gt;</code> reports:
  6607. <blockquote>
  6608. In Polish we use e.g. plik (file) this way:
  6609. <pre class="example"> 1 plik
  6610. 2,3,4 pliki
  6611. 5-21 pliko'w
  6612. 22-24 pliki
  6613. 25-31 pliko'w
  6614. </pre>
  6615. <p>and so on (o' means 8859-2 oacute which should be rather okreska,
  6616. similar to aogonek).
  6617. </blockquote>
  6618. <p>There are two things which can differ between languages (and even inside
  6619. language families);
  6620. <ul>
  6621. <li>The form how plural forms are built differs. This is a problem with
  6622. languages which have many irregularities. German, for instance, is a
  6623. drastic case. Though English and German are part of the same language
  6624. family (Germanic), the almost regular forming of plural noun forms
  6625. (appending an
  6626. ‘s’)
  6627. is hardly found in German.
  6628. <li>The number of plural forms differ. This is somewhat surprising for
  6629. those who only have experiences with Romanic and Germanic languages
  6630. since here the number is the same (there are two).
  6631. <p>But other language families have only one form or many forms. More
  6632. information on this in an extra section.
  6633. </ul>
  6634. <p>The consequence of this is that application writers should not try to
  6635. solve the problem in their code. This would be localization since it is
  6636. only usable for certain, hardcoded language environments. Instead the
  6637. extended <code>gettext</code> interface should be used.
  6638. <p>These extra functions are taking instead of the one key string two
  6639. strings and a numerical argument. The idea behind this is that using
  6640. the numerical argument and the first string as a key, the implementation
  6641. can select using rules specified by the translator the right plural
  6642. form. The two string arguments then will be used to provide a return
  6643. value in case no message catalog is found (similar to the normal
  6644. <code>gettext</code> behavior). In this case the rules for Germanic language
  6645. is used and it is assumed that the first string argument is the singular
  6646. form, the second the plural form.
  6647. <p>This has the consequence that programs without language catalogs can
  6648. display the correct strings only if the program itself is written using
  6649. a Germanic language. This is a limitation but since the GNU C library
  6650. (as well as the GNU <code>gettext</code> package) are written as part of the
  6651. GNU package and the coding standards for the GNU project require program
  6652. being written in English, this solution nevertheless fulfills its
  6653. purpose.
  6654. <div class="defun">
  6655. &mdash; Function: char * <b>ngettext</b> (<var>const char *msgid1, const char *msgid2, unsigned long int n</var>)<var><a name="index-ngettext-1088"></a></var><br>
  6656. <blockquote><p>The <code>ngettext</code> function is similar to the <code>gettext</code> function
  6657. as it finds the message catalogs in the same way. But it takes two
  6658. extra arguments. The <var>msgid1</var> parameter must contain the singular
  6659. form of the string to be converted. It is also used as the key for the
  6660. search in the catalog. The <var>msgid2</var> parameter is the plural form.
  6661. The parameter <var>n</var> is used to determine the plural form. If no
  6662. message catalog is found <var>msgid1</var> is returned if <code>n == 1</code>,
  6663. otherwise <code>msgid2</code>.
  6664. <p>An example for the use of this function is:
  6665. <pre class="smallexample"> printf (ngettext ("%d file removed", "%d files removed", n), n);
  6666. </pre>
  6667. <p>Please note that the numeric value <var>n</var> has to be passed to the
  6668. <code>printf</code> function as well. It is not sufficient to pass it only to
  6669. <code>ngettext</code>.
  6670. <p>In the English singular case, the number &ndash; always 1 &ndash; can be replaced with
  6671. "one":
  6672. <pre class="smallexample"> printf (ngettext ("One file removed", "%d files removed", n), n);
  6673. </pre>
  6674. <p class="noindent">This works because the &lsquo;<samp><span class="samp">printf</span></samp>&rsquo; function discards excess arguments that
  6675. are not consumed by the format string.
  6676. <p>If this function is meant to yield a format string that takes two or more
  6677. arguments, you can not use it like this:
  6678. <pre class="smallexample"> printf (ngettext ("%d file removed from directory %s",
  6679. "%d files removed from directory %s",
  6680. n, dir),
  6681. n);
  6682. </pre>
  6683. <p class="noindent">because in many languages the translators want to replace the &lsquo;<samp><span class="samp">%d</span></samp>&rsquo;
  6684. with an explicit word in the singular case, just like &ldquo;one&rdquo; in English,
  6685. and C format strings cannot consume the second argument but skip the first
  6686. argument. Instead, you have to reorder the arguments so that &lsquo;<samp><span class="samp">n</span></samp>&rsquo;
  6687. comes last:
  6688. <pre class="smallexample"> printf (ngettext ("%$2d file removed from directory %$1s",
  6689. "%$2d files removed from directory %$1s",
  6690. dir, n),
  6691. n);
  6692. </pre>
  6693. <p class="noindent">See <a href="#c_002dformat">c-format</a> for details about this argument reordering syntax.
  6694. <p>When you know that the value of <code>n</code> is within a given range, you can
  6695. specify it as a comment directed to the <code>xgettext</code> tool. This
  6696. information may help translators to use more adequate translations. Like
  6697. this:
  6698. <pre class="smallexample"> if (days &gt; 7 &amp;&amp; days &lt; 14)
  6699. /* xgettext: range: 1..6 */
  6700. printf (ngettext ("one week and one day", "one week and %d days",
  6701. days - 7),
  6702. days - 7);
  6703. </pre>
  6704. <p>It is also possible to use this function when the strings don't contain a
  6705. cardinal number:
  6706. <pre class="smallexample"> puts (ngettext ("Delete the selected file?",
  6707. "Delete the selected files?",
  6708. n));
  6709. </pre>
  6710. <p>In this case the number <var>n</var> is only used to choose the plural form.
  6711. </p></blockquote></div>
  6712. <div class="defun">
  6713. &mdash; Function: char * <b>dngettext</b> (<var>const char *domain, const char *msgid1, const char *msgid2, unsigned long int n</var>)<var><a name="index-dngettext-1089"></a></var><br>
  6714. <blockquote><p>The <code>dngettext</code> is similar to the <code>dgettext</code> function in the
  6715. way the message catalog is selected. The difference is that it takes
  6716. two extra parameter to provide the correct plural form. These two
  6717. parameters are handled in the same way <code>ngettext</code> handles them.
  6718. </p></blockquote></div>
  6719. <div class="defun">
  6720. &mdash; Function: char * <b>dcngettext</b> (<var>const char *domain, const char *msgid1, const char *msgid2, unsigned long int n, int category</var>)<var><a name="index-dcngettext-1090"></a></var><br>
  6721. <blockquote><p>The <code>dcngettext</code> is similar to the <code>dcgettext</code> function in the
  6722. way the message catalog is selected. The difference is that it takes
  6723. two extra parameter to provide the correct plural form. These two
  6724. parameters are handled in the same way <code>ngettext</code> handles them.
  6725. </p></blockquote></div>
  6726. <p>Now, how do these functions solve the problem of the plural forms?
  6727. Without the input of linguists (which was not available) it was not
  6728. possible to determine whether there are only a few different forms in
  6729. which plural forms are formed or whether the number can increase with
  6730. every new supported language.
  6731. <p>Therefore the solution implemented is to allow the translator to specify
  6732. the rules of how to select the plural form. Since the formula varies
  6733. with every language this is the only viable solution except for
  6734. hardcoding the information in the code (which still would require the
  6735. possibility of extensions to not prevent the use of new languages).
  6736. <p><a name="index-specifying-plural-form-in-a-PO-file-1091"></a><a name="index-nplurals_0040r_007b_002c-in-a-PO-file-header_007d-1092"></a><a name="index-plural_0040r_007b_002c-in-a-PO-file-header_007d-1093"></a>The information about the plural form selection has to be stored in the
  6737. header entry of the PO file (the one with the empty <code>msgid</code> string).
  6738. The plural form information looks like this:
  6739. <pre class="smallexample"> Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;
  6740. </pre>
  6741. <p>The <code>nplurals</code> value must be a decimal number which specifies how
  6742. many different plural forms exist for this language. The string
  6743. following <code>plural</code> is an expression which is using the C language
  6744. syntax. Exceptions are that no negative numbers are allowed, numbers
  6745. must be decimal, and the only variable allowed is <code>n</code>. Spaces are
  6746. allowed in the expression, but backslash-newlines are not; in the
  6747. examples below the backslash-newlines are present for formatting purposes
  6748. only. This expression will be evaluated whenever one of the functions
  6749. <code>ngettext</code>, <code>dngettext</code>, or <code>dcngettext</code> is called. The
  6750. numeric value passed to these functions is then substituted for all uses
  6751. of the variable <code>n</code> in the expression. The resulting value then
  6752. must be greater or equal to zero and smaller than the value given as the
  6753. value of <code>nplurals</code>.
  6754. <p class="noindent"><a name="index-plural-form-formulas-1094"></a>The following rules are known at this point. The language with families
  6755. are listed. But this does not necessarily mean the information can be
  6756. generalized for the whole family (as can be easily seen in the table
  6757. below).<a rel="footnote" href="#fn-5" name="fnd-5"><sup>5</sup></a>
  6758. <dl>
  6759. <dt>Only one form:<dd>Some languages only require one single form. There is no distinction
  6760. between the singular and plural form. An appropriate header entry
  6761. would look like this:
  6762. <pre class="smallexample"> Plural-Forms: nplurals=1; plural=0;
  6763. </pre>
  6764. <p class="noindent">Languages with this property include:
  6765. <dl>
  6766. <dt>Asian family<dd>Japanese, <!-- 122.1 million speakers -->
  6767. Vietnamese, <!-- 68.6 million speakers -->
  6768. Korean <!-- 66.3 million speakers -->
  6769. </dl>
  6770. <br><dt>Two forms, singular used for one only<dd>This is the form used in most existing programs since it is what English
  6771. is using. A header entry would look like this:
  6772. <pre class="smallexample"> Plural-Forms: nplurals=2; plural=n != 1;
  6773. </pre>
  6774. <p>(Note: this uses the feature of C expressions that boolean expressions
  6775. have to value zero or one.)
  6776. <p class="noindent">Languages with this property include:
  6777. <dl>
  6778. <dt>Germanic family<dd>English, <!-- 328.0 million speakers -->
  6779. German, <!-- 96.9 million speakers -->
  6780. Dutch, <!-- 21.7 million speakers -->
  6781. Swedish, <!-- 8.3 million speakers -->
  6782. Danish, <!-- 5.6 million speakers -->
  6783. Norwegian, <!-- 4.6 million speakers -->
  6784. Faroese <!-- 0.05 million speakers -->
  6785. <br><dt>Romanic family<dd>Spanish, <!-- 328.5 million speakers -->
  6786. Portuguese, <!-- 178.0 million speakers - 163 million Brazilian Portuguese -->
  6787. Italian, <!-- 61.7 million speakers -->
  6788. Bulgarian <!-- 9.1 million speakers -->
  6789. <br><dt>Latin/Greek family<dd>Greek <!-- 13.1 million speakers -->
  6790. <br><dt>Finno-Ugric family<dd>Finnish, <!-- 5.0 million speakers -->
  6791. Estonian <!-- 1.0 million speakers -->
  6792. <br><dt>Semitic family<dd>Hebrew <!-- 5.3 million speakers -->
  6793. <br><dt>Artificial<dd>Esperanto <!-- 2 million speakers -->
  6794. </dl>
  6795. <p class="noindent">Other languages using the same header entry are:
  6796. <dl>
  6797. <dt>Finno-Ugric family<dd>Hungarian <!-- 12.5 million speakers -->
  6798. <br><dt>Turkic/Altaic family<dd>Turkish <!-- 50.8 million speakers -->
  6799. </dl>
  6800. <p>Hungarian does not appear to have a plural if you look at sentences involving
  6801. cardinal numbers. For example, &ldquo;1 apple&rdquo; is &ldquo;1 alma&rdquo;, and &ldquo;123 apples&rdquo; is
  6802. &ldquo;123 alma&rdquo;. But when the number is not explicit, the distinction between
  6803. singular and plural exists: &ldquo;the apple&rdquo; is &ldquo;az alma&rdquo;, and &ldquo;the apples&rdquo; is
  6804. &ldquo;az alm&aacute;k&rdquo;. Since <code>ngettext</code> has to support both types of sentences,
  6805. it is classified here, under &ldquo;two forms&rdquo;.
  6806. <p>The same holds for Turkish: &ldquo;1 apple&rdquo; is &ldquo;1 elma&rdquo;, and &ldquo;123 apples&rdquo; is
  6807. &ldquo;123 elma&rdquo;. But when the number is omitted, the distinction between singular
  6808. and plural exists: &ldquo;the apple&rdquo; is &ldquo;elma&rdquo;, and &ldquo;the apples&rdquo; is
  6809. &ldquo;elmalar&rdquo;.
  6810. <br><dt>Two forms, singular used for zero and one<dd>Exceptional case in the language family. The header entry would be:
  6811. <pre class="smallexample"> Plural-Forms: nplurals=2; plural=n&gt;1;
  6812. </pre>
  6813. <p class="noindent">Languages with this property include:
  6814. <dl>
  6815. <dt>Romanic family<dd>Brazilian Portuguese, <!-- 163 million speakers -->
  6816. French <!-- 67.8 million speakers -->
  6817. </dl>
  6818. <br><dt>Three forms, special case for zero<dd>The header entry would be:
  6819. <pre class="smallexample"> Plural-Forms: nplurals=3; plural=n%10==1 &amp;&amp; n%100!=11 ? 0 : n != 0 ? 1 : 2;
  6820. </pre>
  6821. <p class="noindent">Languages with this property include:
  6822. <dl>
  6823. <dt>Baltic family<dd>Latvian <!-- 1.5 million speakers -->
  6824. </dl>
  6825. <br><dt>Three forms, special cases for one and two<dd>The header entry would be:
  6826. <pre class="smallexample"> Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;
  6827. </pre>
  6828. <p class="noindent">Languages with this property include:
  6829. <dl>
  6830. <dt>Celtic<dd>Gaeilge (Irish) <!-- 0.4 million speakers -->
  6831. </dl>
  6832. <br><dt>Three forms, special case for numbers ending in 00 or [2-9][0-9]<dd>The header entry would be:
  6833. <pre class="smallexample"> Plural-Forms: nplurals=3; \
  6834. plural=n==1 ? 0 : (n==0 || (n%100 &gt; 0 &amp;&amp; n%100 &lt; 20)) ? 1 : 2;
  6835. </pre>
  6836. <p class="noindent">Languages with this property include:
  6837. <dl>
  6838. <dt>Romanic family<dd>Romanian <!-- 23.4 million speakers -->
  6839. </dl>
  6840. <br><dt>Three forms, special case for numbers ending in 1[2-9]<dd>The header entry would look like this:
  6841. <pre class="smallexample"> Plural-Forms: nplurals=3; \
  6842. plural=n%10==1 &amp;&amp; n%100!=11 ? 0 : \
  6843. n%10&gt;=2 &amp;&amp; (n%100&lt;10 || n%100&gt;=20) ? 1 : 2;
  6844. </pre>
  6845. <p class="noindent">Languages with this property include:
  6846. <dl>
  6847. <dt>Baltic family<dd>Lithuanian <!-- 3.2 million speakers -->
  6848. </dl>
  6849. <br><dt>Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4]<dd>The header entry would look like this:
  6850. <pre class="smallexample"> Plural-Forms: nplurals=3; \
  6851. plural=n%10==1 &amp;&amp; n%100!=11 ? 0 : \
  6852. n%10&gt;=2 &amp;&amp; n%10&lt;=4 &amp;&amp; (n%100&lt;10 || n%100&gt;=20) ? 1 : 2;
  6853. </pre>
  6854. <p class="noindent">Languages with this property include:
  6855. <dl>
  6856. <dt>Slavic family<dd>Russian, <!-- 143.6 million speakers -->
  6857. Ukrainian, <!-- 37.0 million speakers -->
  6858. Serbian, <!-- 7.0 million speakers -->
  6859. Croatian <!-- 5.5 million speakers -->
  6860. </dl>
  6861. <br><dt>Three forms, special cases for 1 and 2, 3, 4<dd>The header entry would look like this:
  6862. <pre class="smallexample"> Plural-Forms: nplurals=3; \
  6863. plural=(n==1) ? 0 : (n&gt;=2 &amp;&amp; n&lt;=4) ? 1 : 2;
  6864. </pre>
  6865. <p class="noindent">Languages with this property include:
  6866. <dl>
  6867. <dt>Slavic family<dd>Czech, <!-- 9.5 million speakers -->
  6868. Slovak <!-- 5.0 million speakers -->
  6869. </dl>
  6870. <br><dt>Three forms, special case for one and some numbers ending in 2, 3, or 4<dd>The header entry would look like this:
  6871. <pre class="smallexample"> Plural-Forms: nplurals=3; \
  6872. plural=n==1 ? 0 : \
  6873. n%10&gt;=2 &amp;&amp; n%10&lt;=4 &amp;&amp; (n%100&lt;10 || n%100&gt;=20) ? 1 : 2;
  6874. </pre>
  6875. <p class="noindent">Languages with this property include:
  6876. <dl>
  6877. <dt>Slavic family<dd>Polish <!-- 40.0 million speakers -->
  6878. </dl>
  6879. <br><dt>Four forms, special case for one and all numbers ending in 02, 03, or 04<dd>The header entry would look like this:
  6880. <pre class="smallexample"> Plural-Forms: nplurals=4; \
  6881. plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;
  6882. </pre>
  6883. <p class="noindent">Languages with this property include:
  6884. <dl>
  6885. <dt>Slavic family<dd>Slovenian <!-- 1.9 million speakers -->
  6886. </dl>
  6887. </dl>
  6888. <p>You might now ask, <code>ngettext</code> handles only numbers <var>n</var> of type
  6889. &lsquo;<samp><span class="samp">unsigned long</span></samp>&rsquo;. What about larger integer types? What about negative
  6890. numbers? What about floating-point numbers?
  6891. <p>About larger integer types, such as &lsquo;<samp><span class="samp">uintmax_t</span></samp>&rsquo; or
  6892. &lsquo;<samp><span class="samp">unsigned long long</span></samp>&rsquo;: they can be handled by reducing the value to a
  6893. range that fits in an &lsquo;<samp><span class="samp">unsigned long</span></samp>&rsquo;. Simply casting the value to
  6894. &lsquo;<samp><span class="samp">unsigned long</span></samp>&rsquo; would not do the right thing, since it would treat
  6895. <code>ULONG_MAX + 1</code> like zero, <code>ULONG_MAX + 2</code> like singular, and
  6896. the like. Here you can exploit the fact that all mentioned plural form
  6897. formulas eventually become periodic, with a period that is a divisor of 100
  6898. (or 1000 or 1000000). So, when you reduce a large value to another one in
  6899. the range [1000000, 1999999] that ends in the same 6 decimal digits, you
  6900. can assume that it will lead to the same plural form selection. This code
  6901. does this:
  6902. <pre class="smallexample"> #include &lt;inttypes.h&gt;
  6903. uintmax_t nbytes = ...;
  6904. printf (ngettext ("The file has %"PRIuMAX" byte.",
  6905. "The file has %"PRIuMAX" bytes.",
  6906. (nbytes &gt; ULONG_MAX
  6907. ? (nbytes % 1000000) + 1000000
  6908. : nbytes)),
  6909. nbytes);
  6910. </pre>
  6911. <p>Negative and floating-point values usually represent physical entities for
  6912. which singular and plural don't clearly apply. In such cases, there is no
  6913. need to use <code>ngettext</code>; a simple <code>gettext</code> call with a form suitable
  6914. for all values will do. For example:
  6915. <pre class="smallexample"> printf (gettext ("Time elapsed: %.3f seconds"),
  6916. num_milliseconds * 0.001);
  6917. </pre>
  6918. <p class="noindent">Even if <var>num_milliseconds</var> happens to be a multiple of 1000, the output
  6919. <pre class="smallexample"> Time elapsed: 1.000 seconds
  6920. </pre>
  6921. <p class="noindent">is acceptable in English, and similarly for other languages.
  6922. <p>The translators' perspective regarding plural forms is explained in
  6923. <a href="#Translating-plural-forms">Translating plural forms</a>.
  6924. <div class="node">
  6925. <a name="Optimized-gettext"></a>
  6926. <p><hr>
  6927. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Plural-forms">Plural forms</a>,
  6928. Up:&nbsp;<a rel="up" accesskey="u" href="#gettext">gettext</a>
  6929. </div>
  6930. <h4 class="subsection">11.2.7 Optimization of the *gettext functions</h4>
  6931. <p><a name="index-optimization-of-_0040code_007bgettext_007d-functions-1095"></a>
  6932. At this point of the discussion we should talk about an advantage of the
  6933. GNU <code>gettext</code> implementation. Some readers might have pointed out
  6934. that an internationalized program might have a poor performance if some
  6935. string has to be translated in an inner loop. While this is unavoidable
  6936. when the string varies from one run of the loop to the other it is
  6937. simply a waste of time when the string is always the same. Take the
  6938. following example:
  6939. <pre class="example"> {
  6940. while (...)
  6941. {
  6942. puts (gettext ("Hello world"));
  6943. }
  6944. }
  6945. </pre>
  6946. <p class="noindent">When the locale selection does not change between two runs the resulting
  6947. string is always the same. One way to use this is:
  6948. <pre class="example"> {
  6949. str = gettext ("Hello world");
  6950. while (...)
  6951. {
  6952. puts (str);
  6953. }
  6954. }
  6955. </pre>
  6956. <p class="noindent">But this solution is not usable in all situation (e.g. when the locale
  6957. selection changes) nor does it lead to legible code.
  6958. <p>For this reason, GNU <code>gettext</code> caches previous translation results.
  6959. When the same translation is requested twice, with no new message
  6960. catalogs being loaded in between, <code>gettext</code> will, the second time,
  6961. find the result through a single cache lookup.
  6962. <div class="node">
  6963. <a name="Comparison"></a>
  6964. <p><hr>
  6965. Next:&nbsp;<a rel="next" accesskey="n" href="#Using-libintl_002ea">Using libintl.a</a>,
  6966. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gettext">gettext</a>,
  6967. Up:&nbsp;<a rel="up" accesskey="u" href="#Programmers">Programmers</a>
  6968. </div>
  6969. <h3 class="section">11.3 Comparing the Two Interfaces</h3>
  6970. <p><a name="index-g_t_0040code_007bgettext_007d-vs-_0040code_007bcatgets_007d-1096"></a><a name="index-comparison-of-interfaces-1097"></a>
  6971. <!-- FIXME: arguments to catgets vs. gettext -->
  6972. <!-- Partly done 950718 - drepper -->
  6973. <p>The following discussion is perhaps a little bit colored. As said
  6974. above we implemented GNU <code>gettext</code> following the Uniforum
  6975. proposal and this surely has its reasons. But it should show how we
  6976. came to this decision.
  6977. <p>First we take a look at the developing process. When we write an
  6978. application using NLS provided by <code>gettext</code> we proceed as always.
  6979. Only when we come to a string which might be seen by the users and thus
  6980. has to be translated we use <code>gettext("...")</code> instead of
  6981. <code>"..."</code>. At the beginning of each source file (or in a central
  6982. header file) we define
  6983. <pre class="example"> #define gettext(String) (String)
  6984. </pre>
  6985. <p>Even this definition can be avoided when the system supports the
  6986. <code>gettext</code> function in its C library. When we compile this code the
  6987. result is the same as if no NLS code is used. When you take a look at
  6988. the GNU <code>gettext</code> code you will see that we use <code>_("...")</code>
  6989. instead of <code>gettext("...")</code>. This reduces the number of
  6990. additional characters per translatable string to <em>3</em> (in words:
  6991. three).
  6992. <p>When now a production version of the program is needed we simply replace
  6993. the definition
  6994. <pre class="example"> #define _(String) (String)
  6995. </pre>
  6996. <p class="noindent">by
  6997. <p><a name="index-include-file-_0040file_007blibintl_002eh_007d-1098"></a>
  6998. <pre class="example"> #include &lt;libintl.h&gt;
  6999. #define _(String) gettext (String)
  7000. </pre>
  7001. <p class="noindent">Additionally we run the program <samp><span class="file">xgettext</span></samp> on all source code file
  7002. which contain translatable strings and that's it: we have a running
  7003. program which does not depend on translations to be available, but which
  7004. can use any that becomes available.
  7005. <p><a name="index-g_t_0040code_007bN_005f_007d_002c-a-convenience-macro-1099"></a>The same procedure can be done for the <code>gettext_noop</code> invocations
  7006. (see <a href="#Special-cases">Special cases</a>). One usually defines <code>gettext_noop</code> as a
  7007. no-op macro. So you should consider the following code for your project:
  7008. <pre class="example"> #define gettext_noop(String) String
  7009. #define N_(String) gettext_noop (String)
  7010. </pre>
  7011. <p><code>N_</code> is a short form similar to <code>_</code>. The <samp><span class="file">Makefile</span></samp> in
  7012. the <samp><span class="file">po/</span></samp> directory of GNU <code>gettext</code> knows by default both of the
  7013. mentioned short forms so you are invited to follow this proposal for
  7014. your own ease.
  7015. <p>Now to <code>catgets</code>. The main problem is the work for the
  7016. programmer. Every time he comes to a translatable string he has to
  7017. define a number (or a symbolic constant) which has also be defined in
  7018. the message catalog file. He also has to take care for duplicate
  7019. entries, duplicate message IDs etc. If he wants to have the same
  7020. quality in the message catalog as the GNU <code>gettext</code> program
  7021. provides he also has to put the descriptive comments for the strings and
  7022. the location in all source code files in the message catalog. This is
  7023. nearly a Mission: Impossible.
  7024. <p>But there are also some points people might call advantages speaking for
  7025. <code>catgets</code>. If you have a single word in a string and this string
  7026. is used in different contexts it is likely that in one or the other
  7027. language the word has different translations. Example:
  7028. <pre class="example"> printf ("%s: %d", gettext ("number"), number_of_errors)
  7029. printf ("you should see %d %s", number_count,
  7030. number_count == 1 ? gettext ("number") : gettext ("numbers"))
  7031. </pre>
  7032. <p>Here we have to translate two times the string <code>"number"</code>. Even
  7033. if you do not speak a language beside English it might be possible to
  7034. recognize that the two words have a different meaning. In German the
  7035. first appearance has to be translated to <code>"Anzahl"</code> and the second
  7036. to <code>"Zahl"</code>.
  7037. <p>Now you can say that this example is really esoteric. And you are
  7038. right! This is exactly how we felt about this problem and decide that
  7039. it does not weight that much. The solution for the above problem could
  7040. be very easy:
  7041. <pre class="example"> printf ("%s %d", gettext ("number:"), number_of_errors)
  7042. printf (number_count == 1 ? gettext ("you should see %d number")
  7043. : gettext ("you should see %d numbers"),
  7044. number_count)
  7045. </pre>
  7046. <p>We believe that we can solve all conflicts with this method. If it is
  7047. difficult one can also consider changing one of the conflicting string a
  7048. little bit. But it is not impossible to overcome.
  7049. <p><code>catgets</code> allows same original entry to have different translations,
  7050. but <code>gettext</code> has another, scalable approach for solving ambiguities
  7051. of this kind: See <a href="#Ambiguities">Ambiguities</a>.
  7052. <div class="node">
  7053. <a name="Using-libintl.a"></a>
  7054. <a name="Using-libintl_002ea"></a>
  7055. <p><hr>
  7056. Next:&nbsp;<a rel="next" accesskey="n" href="#gettext-grok">gettext grok</a>,
  7057. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Comparison">Comparison</a>,
  7058. Up:&nbsp;<a rel="up" accesskey="u" href="#Programmers">Programmers</a>
  7059. </div>
  7060. <h3 class="section">11.4 Using libintl.a in own programs</h3>
  7061. <p>Starting with version 0.9.4 the library <code>libintl.h</code> should be
  7062. self-contained. I.e., you can use it in your own programs without
  7063. providing additional functions. The <samp><span class="file">Makefile</span></samp> will put the header
  7064. and the library in directories selected using the <code>$(prefix)</code>.
  7065. <div class="node">
  7066. <a name="gettext-grok"></a>
  7067. <p><hr>
  7068. Next:&nbsp;<a rel="next" accesskey="n" href="#Temp-Programmers">Temp Programmers</a>,
  7069. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Using-libintl_002ea">Using libintl.a</a>,
  7070. Up:&nbsp;<a rel="up" accesskey="u" href="#Programmers">Programmers</a>
  7071. </div>
  7072. <h3 class="section">11.5 Being a <code>gettext</code> grok</h3>
  7073. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7074. revised.
  7075. <p>To fully exploit the functionality of the GNU <code>gettext</code> library it
  7076. is surely helpful to read the source code. But for those who don't want
  7077. to spend that much time in reading the (sometimes complicated) code here
  7078. is a list comments:
  7079. <ul>
  7080. <li>Changing the language at runtime
  7081. <a name="index-language-selection-at-runtime-1100"></a>
  7082. For interactive programs it might be useful to offer a selection of the
  7083. used language at runtime. To understand how to do this one need to know
  7084. how the used language is determined while executing the <code>gettext</code>
  7085. function. The method which is presented here only works correctly
  7086. with the GNU implementation of the <code>gettext</code> functions.
  7087. <p>In the function <code>dcgettext</code> at every call the current setting of
  7088. the highest priority environment variable is determined and used.
  7089. Highest priority means here the following list with decreasing
  7090. priority:
  7091. <ol type=1 start=1>
  7092. <a name="index-LANGUAGE_0040r_007b_002c-environment-variable_007d-1101"></a><li><code>LANGUAGE</code>
  7093. <a name="index-LC_005fALL_0040r_007b_002c-environment-variable_007d-1102"></a><li><code>LC_ALL</code>
  7094. <a name="index-LC_005fCTYPE_0040r_007b_002c-environment-variable_007d-1103"></a><a name="index-LC_005fNUMERIC_0040r_007b_002c-environment-variable_007d-1104"></a><a name="index-LC_005fTIME_0040r_007b_002c-environment-variable_007d-1105"></a><a name="index-LC_005fCOLLATE_0040r_007b_002c-environment-variable_007d-1106"></a><a name="index-LC_005fMONETARY_0040r_007b_002c-environment-variable_007d-1107"></a><a name="index-LC_005fMESSAGES_0040r_007b_002c-environment-variable_007d-1108"></a><li><code>LC_xxx</code>, according to selected locale category
  7095. <a name="index-LANG_0040r_007b_002c-environment-variable_007d-1109"></a><li><code>LANG</code>
  7096. </ol>
  7097. <p>Afterwards the path is constructed using the found value and the
  7098. translation file is loaded if available.
  7099. <p>What happens now when the value for, say, <code>LANGUAGE</code> changes? According
  7100. to the process explained above the new value of this variable is found
  7101. as soon as the <code>dcgettext</code> function is called. But this also means
  7102. the (perhaps) different message catalog file is loaded. In other
  7103. words: the used language is changed.
  7104. <p>But there is one little hook. The code for gcc-2.7.0 and up provides
  7105. some optimization. This optimization normally prevents the calling of
  7106. the <code>dcgettext</code> function as long as no new catalog is loaded. But
  7107. if <code>dcgettext</code> is not called the program also cannot find the
  7108. <code>LANGUAGE</code> variable be changed (see <a href="#Optimized-gettext">Optimized gettext</a>). A
  7109. solution for this is very easy. Include the following code in the
  7110. language switching function.
  7111. <pre class="example"> /* Change language. */
  7112. setenv ("LANGUAGE", "fr", 1);
  7113. /* Make change known. */
  7114. {
  7115. extern int _nl_msg_cat_cntr;
  7116. ++_nl_msg_cat_cntr;
  7117. }
  7118. </pre>
  7119. <p><a name="index-g_t_0040code_007b_005fnl_005fmsg_005fcat_005fcntr_007d-1110"></a>The variable <code>_nl_msg_cat_cntr</code> is defined in <samp><span class="file">loadmsgcat.c</span></samp>.
  7120. You don't need to know what this is for. But it can be used to detect
  7121. whether a <code>gettext</code> implementation is GNU gettext and not non-GNU
  7122. system's native gettext implementation.
  7123. </ul>
  7124. <div class="node">
  7125. <a name="Temp-Programmers"></a>
  7126. <p><hr>
  7127. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gettext-grok">gettext grok</a>,
  7128. Up:&nbsp;<a rel="up" accesskey="u" href="#Programmers">Programmers</a>
  7129. </div>
  7130. <h3 class="section">11.6 Temporary Notes for the Programmers Chapter</h3>
  7131. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7132. revised.
  7133. <ul class="menu">
  7134. <li><a accesskey="1" href="#Temp-Implementations">Temp Implementations</a>: Temporary - Two Possible Implementations
  7135. <li><a accesskey="2" href="#Temp-catgets">Temp catgets</a>: Temporary - About <code>catgets</code>
  7136. <li><a accesskey="3" href="#Temp-WSI">Temp WSI</a>: Temporary - Why a single implementation
  7137. <li><a accesskey="4" href="#Temp-Notes">Temp Notes</a>: Temporary - Notes
  7138. </ul>
  7139. <div class="node">
  7140. <a name="Temp-Implementations"></a>
  7141. <p><hr>
  7142. Next:&nbsp;<a rel="next" accesskey="n" href="#Temp-catgets">Temp catgets</a>,
  7143. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Temp-Programmers">Temp Programmers</a>,
  7144. Up:&nbsp;<a rel="up" accesskey="u" href="#Temp-Programmers">Temp Programmers</a>
  7145. </div>
  7146. <h4 class="subsection">11.6.1 Temporary - Two Possible Implementations</h4>
  7147. <p>There are two competing methods for language independent messages:
  7148. the X/Open <code>catgets</code> method, and the Uniforum <code>gettext</code>
  7149. method. The <code>catgets</code> method indexes messages by integers; the
  7150. <code>gettext</code> method indexes them by their English translations.
  7151. The <code>catgets</code> method has been around longer and is supported
  7152. by more vendors. The <code>gettext</code> method is supported by Sun,
  7153. and it has been heard that the COSE multi-vendor initiative is
  7154. supporting it. Neither method is a POSIX standard; the POSIX.1
  7155. committee had a lot of disagreement in this area.
  7156. <p>Neither one is in the POSIX standard. There was much disagreement
  7157. in the POSIX.1 committee about using the <code>gettext</code> routines
  7158. vs. <code>catgets</code> (XPG). In the end the committee couldn't
  7159. agree on anything, so no messaging system was included as part
  7160. of the standard. I believe the informative annex of the standard
  7161. includes the XPG3 messaging interfaces, &ldquo;<small class="dots">...</small>as an example of
  7162. a messaging system that has been implemented<small class="dots">...</small>&rdquo;
  7163. <p>They were very careful not to say anywhere that you should use one
  7164. set of interfaces over the other. For more on this topic please
  7165. see the Programming for Internationalization FAQ.
  7166. <div class="node">
  7167. <a name="Temp-catgets"></a>
  7168. <p><hr>
  7169. Next:&nbsp;<a rel="next" accesskey="n" href="#Temp-WSI">Temp WSI</a>,
  7170. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Temp-Implementations">Temp Implementations</a>,
  7171. Up:&nbsp;<a rel="up" accesskey="u" href="#Temp-Programmers">Temp Programmers</a>
  7172. </div>
  7173. <h4 class="subsection">11.6.2 Temporary - About <code>catgets</code></h4>
  7174. <p>There have been a few discussions of late on the use of
  7175. <code>catgets</code> as a base. I think it important to present both
  7176. sides of the argument and hence am opting to play devil's advocate
  7177. for a little bit.
  7178. <p>I'll not deny the fact that <code>catgets</code> could have been designed
  7179. a lot better. It currently has quite a number of limitations and
  7180. these have already been pointed out.
  7181. <p>However there is a great deal to be said for consistency and
  7182. standardization. A common recurring problem when writing Unix
  7183. software is the myriad portability problems across Unix platforms.
  7184. It seems as if every Unix vendor had a look at the operating system
  7185. and found parts they could improve upon. Undoubtedly, these
  7186. modifications are probably innovative and solve real problems.
  7187. However, software developers have a hard time keeping up with all
  7188. these changes across so many platforms.
  7189. <p>And this has prompted the Unix vendors to begin to standardize their
  7190. systems. Hence the impetus for Spec1170. Every major Unix vendor
  7191. has committed to supporting this standard and every Unix software
  7192. developer waits with glee the day they can write software to this
  7193. standard and simply recompile (without having to use autoconf)
  7194. across different platforms.
  7195. <p>As I understand it, Spec1170 is roughly based upon version 4 of the
  7196. X/Open Portability Guidelines (XPG4). Because <code>catgets</code> and
  7197. friends are defined in XPG4, I'm led to believe that <code>catgets</code>
  7198. is a part of Spec1170 and hence will become a standardized component
  7199. of all Unix systems.
  7200. <div class="node">
  7201. <a name="Temp-WSI"></a>
  7202. <p><hr>
  7203. Next:&nbsp;<a rel="next" accesskey="n" href="#Temp-Notes">Temp Notes</a>,
  7204. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Temp-catgets">Temp catgets</a>,
  7205. Up:&nbsp;<a rel="up" accesskey="u" href="#Temp-Programmers">Temp Programmers</a>
  7206. </div>
  7207. <h4 class="subsection">11.6.3 Temporary - Why a single implementation</h4>
  7208. <p>Now it seems kind of wasteful to me to have two different systems
  7209. installed for accessing message catalogs. If we do want to remedy
  7210. <code>catgets</code> deficiencies why don't we try to expand <code>catgets</code>
  7211. (in a compatible manner) rather than implement an entirely new system.
  7212. Otherwise, we'll end up with two message catalog access systems installed
  7213. with an operating system - one set of routines for packages using GNU
  7214. <code>gettext</code> for their internationalization, and another set of routines
  7215. (catgets) for all other software. Bloated?
  7216. <p>Supposing another catalog access system is implemented. Which do
  7217. we recommend? At least for Linux, we need to attract as many
  7218. software developers as possible. Hence we need to make it as easy
  7219. for them to port their software as possible. Which means supporting
  7220. <code>catgets</code>. We will be implementing the <code>libintl</code> code
  7221. within our <code>libc</code>, but does this mean we also have to incorporate
  7222. another message catalog access scheme within our <code>libc</code> as well?
  7223. And what about people who are going to be using the <code>libintl</code>
  7224. + non-<code>catgets</code> routines. When they port their software to
  7225. other platforms, they're now going to have to include the front-end
  7226. (<code>libintl</code>) code plus the back-end code (the non-<code>catgets</code>
  7227. access routines) with their software instead of just including the
  7228. <code>libintl</code> code with their software.
  7229. <p>Message catalog support is however only the tip of the iceberg.
  7230. What about the data for the other locale categories? They also have
  7231. a number of deficiencies. Are we going to abandon them as well and
  7232. develop another duplicate set of routines (should <code>libintl</code>
  7233. expand beyond message catalog support)?
  7234. <p>Like many parts of Unix that can be improved upon, we're stuck with balancing
  7235. compatibility with the past with useful improvements and innovations for
  7236. the future.
  7237. <div class="node">
  7238. <a name="Temp-Notes"></a>
  7239. <p><hr>
  7240. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Temp-WSI">Temp WSI</a>,
  7241. Up:&nbsp;<a rel="up" accesskey="u" href="#Temp-Programmers">Temp Programmers</a>
  7242. </div>
  7243. <h4 class="subsection">11.6.4 Temporary - Notes</h4>
  7244. <p>X/Open agreed very late on the standard form so that many
  7245. implementations differ from the final form. Both of my system (old
  7246. Linux catgets and Ultrix-4) have a strange variation.
  7247. <p>OK. After incorporating the last changes I have to spend some time on
  7248. making the GNU/Linux <code>libc</code> <code>gettext</code> functions. So in future
  7249. Solaris is not the only system having <code>gettext</code>.
  7250. <div class="node">
  7251. <a name="Translators"></a>
  7252. <p><hr>
  7253. Next:&nbsp;<a rel="next" accesskey="n" href="#Maintainers">Maintainers</a>,
  7254. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programmers">Programmers</a>,
  7255. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  7256. </div>
  7257. <h2 class="chapter">12 The Translator's View</h2>
  7258. <!-- FIXME: Reorganize whole chapter. -->
  7259. <ul class="menu">
  7260. <li><a accesskey="1" href="#Trans-Intro-0">Trans Intro 0</a>: Introduction 0
  7261. <li><a accesskey="2" href="#Trans-Intro-1">Trans Intro 1</a>: Introduction 1
  7262. <li><a accesskey="3" href="#Discussions">Discussions</a>: Discussions
  7263. <li><a accesskey="4" href="#Organization">Organization</a>: Organization
  7264. <li><a accesskey="5" href="#Information-Flow">Information Flow</a>: Information Flow
  7265. <li><a accesskey="6" href="#Translating-plural-forms">Translating plural forms</a>: How to fill in <code>msgstr[0]</code>, <code>msgstr[1]</code>
  7266. <li><a accesskey="7" href="#Prioritizing-messages">Prioritizing messages</a>: How to find which messages to translate first
  7267. </ul>
  7268. <div class="node">
  7269. <a name="Trans-Intro-0"></a>
  7270. <p><hr>
  7271. Next:&nbsp;<a rel="next" accesskey="n" href="#Trans-Intro-1">Trans Intro 1</a>,
  7272. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Translators">Translators</a>,
  7273. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7274. </div>
  7275. <h3 class="section">12.1 Introduction 0</h3>
  7276. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7277. revised.
  7278. <p>Free software is going international! The Translation Project is a way
  7279. to get maintainers, translators and users all together, so free software
  7280. will gradually become able to speak many native languages.
  7281. <p>The GNU <code>gettext</code> tool set contains <em>everything</em> maintainers
  7282. need for internationalizing their packages for messages. It also
  7283. contains quite useful tools for helping translators at localizing
  7284. messages to their native language, once a package has already been
  7285. internationalized.
  7286. <p>To achieve the Translation Project, we need many interested
  7287. people who like their own language and write it well, and who are also
  7288. able to synergize with other translators speaking the same language.
  7289. If you'd like to volunteer to <em>work</em> at translating messages,
  7290. please send mail to your translating team.
  7291. <p>Each team has its own mailing list, courtesy of Linux
  7292. International. You may reach your translating team at the address
  7293. <samp><var>ll</var><span class="file">@li.org</span></samp>, replacing <var>ll</var> by the two-letter ISO&nbsp;639<!-- /@w -->
  7294. code for your language. Language codes are <em>not</em> the same as
  7295. country codes given in ISO&nbsp;3166<!-- /@w -->. The following translating teams
  7296. exist:
  7297. <blockquote>
  7298. Chinese <code>zh</code>, Czech <code>cs</code>, Danish <code>da</code>, Dutch <code>nl</code>,
  7299. Esperanto <code>eo</code>, Finnish <code>fi</code>, French <code>fr</code>, Irish
  7300. <code>ga</code>, German <code>de</code>, Greek <code>el</code>, Italian <code>it</code>,
  7301. Japanese <code>ja</code>, Indonesian <code>in</code>, Norwegian <code>no</code>, Polish
  7302. <code>pl</code>, Portuguese <code>pt</code>, Russian <code>ru</code>, Spanish <code>es</code>,
  7303. Swedish <code>sv</code> and Turkish <code>tr</code>.
  7304. </blockquote>
  7305. <p class="noindent">For example, you may reach the Chinese translating team by writing to
  7306. <samp><span class="file">zh@li.org</span></samp>. When you become a member of the translating team
  7307. for your own language, you may subscribe to its list. For example,
  7308. Swedish people can send a message to <samp><span class="file">sv-request@li.org</span></samp><!-- /@w -->,
  7309. having this message body:
  7310. <pre class="example"> subscribe
  7311. </pre>
  7312. <p>Keep in mind that team members should be interested in <em>working</em>
  7313. at translations, or at solving translational difficulties, rather than
  7314. merely lurking around. If your team does not exist yet and you want to
  7315. start one, please write to <samp><span class="file">coordinator@translationproject.org</span></samp><!-- /@w -->;
  7316. you will then reach the coordinator for all translator teams.
  7317. <p>A handful of GNU packages have already been adapted and provided
  7318. with message translations for several languages. Translation
  7319. teams have begun to organize, using these packages as a starting
  7320. point. But there are many more packages and many languages for
  7321. which we have no volunteer translators. If you would like to
  7322. volunteer to work at translating messages, please send mail to
  7323. <samp><span class="file">coordinator@translationproject.org</span></samp> indicating what language(s)
  7324. you can work on.
  7325. <div class="node">
  7326. <a name="Trans-Intro-1"></a>
  7327. <p><hr>
  7328. Next:&nbsp;<a rel="next" accesskey="n" href="#Discussions">Discussions</a>,
  7329. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Trans-Intro-0">Trans Intro 0</a>,
  7330. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7331. </div>
  7332. <h3 class="section">12.2 Introduction 1</h3>
  7333. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7334. revised.
  7335. <p>This is now official, GNU is going international! Here is the
  7336. announcement submitted for the January 1995 GNU Bulletin:
  7337. <blockquote>
  7338. A handful of GNU packages have already been adapted and provided
  7339. with message translations for several languages. Translation
  7340. teams have begun to organize, using these packages as a starting
  7341. point. But there are many more packages and many languages
  7342. for which we have no volunteer translators. If you'd like to
  7343. volunteer to work at translating messages, please send mail to
  7344. &lsquo;<samp><span class="samp">coordinator@translationproject.org</span></samp>&rsquo; indicating what language(s)
  7345. you can work on.
  7346. </blockquote>
  7347. <p>This document should answer many questions for those who are curious about
  7348. the process or would like to contribute. Please at least skim over it,
  7349. hoping to cut down a little of the high volume of e-mail generated by this
  7350. collective effort towards internationalization of free software.
  7351. <p>Most free programming which is widely shared is done in English, and
  7352. currently, English is used as the main communicating language between
  7353. national communities collaborating to free software. This very document
  7354. is written in English. This will not change in the foreseeable future.
  7355. <p>However, there is a strong appetite from national communities for
  7356. having more software able to write using national language and habits,
  7357. and there is an on-going effort to modify free software in such a way
  7358. that it becomes able to do so. The experiments driven so far raised
  7359. an enthusiastic response from pretesters, so we believe that
  7360. internationalization of free software is dedicated to succeed.
  7361. <p>For suggestion clarifications, additions or corrections to this
  7362. document, please e-mail to <samp><span class="file">coordinator@translationproject.org</span></samp>.
  7363. <div class="node">
  7364. <a name="Discussions"></a>
  7365. <p><hr>
  7366. Next:&nbsp;<a rel="next" accesskey="n" href="#Organization">Organization</a>,
  7367. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Trans-Intro-1">Trans Intro 1</a>,
  7368. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7369. </div>
  7370. <h3 class="section">12.3 Discussions</h3>
  7371. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7372. revised.
  7373. <p>Facing this internationalization effort, a few users expressed their
  7374. concerns. Some of these doubts are presented and discussed, here.
  7375. <ul>
  7376. <li>Smaller groups
  7377. <p>Some languages are not spoken by a very large number of people, so people
  7378. speaking them sometimes consider that there may not be all that much
  7379. demand such versions of free software packages. Moreover, many people
  7380. being <em>into computers</em>, in some countries, generally seem to prefer
  7381. English versions of their software.
  7382. <p>On the other end, people might enjoy their own language a lot, and be
  7383. very motivated at providing to themselves the pleasure of having their
  7384. beloved free software speaking their mother tongue. They do themselves
  7385. a personal favor, and do not pay that much attention to the number of
  7386. people benefiting of their work.
  7387. <li>Misinterpretation
  7388. <p>Other users are shy to push forward their own language, seeing in this
  7389. some kind of misplaced propaganda. Someone thought there must be some
  7390. users of the language over the networks pestering other people with it.
  7391. <p>But any spoken language is worth localization, because there are
  7392. people behind the language for whom the language is important and
  7393. dear to their hearts.
  7394. <li>Odd translations
  7395. <p>The biggest problem is to find the right translations so that
  7396. everybody can understand the messages. Translations are usually a
  7397. little odd. Some people get used to English, to the extent they may
  7398. find translations into their own language &ldquo;rather pushy, obnoxious
  7399. and sometimes even hilarious.&rdquo; As a French speaking man, I have
  7400. the experience of those instruction manuals for goods, so poorly
  7401. translated in French in Korea or Taiwan<small class="dots">...</small>
  7402. <p>The fact is that we sometimes have to create a kind of national
  7403. computer culture, and this is not easy without the collaboration of
  7404. many people liking their mother tongue. This is why translations are
  7405. better achieved by people knowing and loving their own language, and
  7406. ready to work together at improving the results they obtain.
  7407. <li>Dependencies over the GPL or LGPL
  7408. <p>Some people wonder if using GNU <code>gettext</code> necessarily brings their
  7409. package under the protective wing of the GNU General Public License or
  7410. the GNU Library General Public License, when they do not want to make
  7411. their program free, or want other kinds of freedom. The simplest
  7412. answer is &ldquo;normally not&rdquo;.
  7413. <p>The <code>gettext-runtime</code> part of GNU <code>gettext</code>, i.e. the
  7414. contents of <code>libintl</code>, is covered by the GNU Library General Public
  7415. License. The <code>gettext-tools</code> part of GNU <code>gettext</code>, i.e. the
  7416. rest of the GNU <code>gettext</code> package, is covered by the GNU General
  7417. Public License.
  7418. <p>The mere marking of localizable strings in a package, or conditional
  7419. inclusion of a few lines for initialization, is not really including
  7420. GPL'ed or LGPL'ed code. However, since the localization routines in
  7421. <code>libintl</code> are under the LGPL, the LGPL needs to be considered.
  7422. It gives the right to distribute the complete unmodified source of
  7423. <code>libintl</code> even with non-free programs. It also gives the right
  7424. to use <code>libintl</code> as a shared library, even for non-free programs.
  7425. But it gives the right to use <code>libintl</code> as a static library or
  7426. to incorporate <code>libintl</code> into another library only to free
  7427. software.
  7428. </ul>
  7429. <div class="node">
  7430. <a name="Organization"></a>
  7431. <p><hr>
  7432. Next:&nbsp;<a rel="next" accesskey="n" href="#Information-Flow">Information Flow</a>,
  7433. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Discussions">Discussions</a>,
  7434. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7435. </div>
  7436. <h3 class="section">12.4 Organization</h3>
  7437. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7438. revised.
  7439. <p>On a larger scale, the true solution would be to organize some kind of
  7440. fairly precise set up in which volunteers could participate. I gave
  7441. some thought to this idea lately, and realize there will be some
  7442. touchy points. I thought of writing to Richard Stallman to launch
  7443. such a project, but feel it might be good to shake out the ideas
  7444. between ourselves first. Most probably that Linux International has
  7445. some experience in the field already, or would like to orchestrate
  7446. the volunteer work, maybe. Food for thought, in any case!
  7447. <p>I guess we have to setup something early, somehow, that will help
  7448. many possible contributors of the same language to interlock and avoid
  7449. work duplication, and further be put in contact for solving together
  7450. problems particular to their tongue (in most languages, there are many
  7451. difficulties peculiar to translating technical English). My Swedish
  7452. contributor acknowledged these difficulties, and I'm well aware of
  7453. them for French.
  7454. <p>This is surely not a technical issue, but we should manage so the
  7455. effort of locale contributors be maximally useful, despite the national
  7456. team layer interface between contributors and maintainers.
  7457. <p>The Translation Project needs some setup for coordinating language
  7458. coordinators. Localizing evolving programs will surely
  7459. become a permanent and continuous activity in the free software community,
  7460. once well started.
  7461. The setup should be minimally completed and tested before GNU
  7462. <code>gettext</code> becomes an official reality. The e-mail address
  7463. <samp><span class="file">coordinator@translationproject.org</span></samp> has been set up for receiving
  7464. offers from volunteers and general e-mail on these topics. This address
  7465. reaches the Translation Project coordinator.
  7466. <ul class="menu">
  7467. <li><a accesskey="1" href="#Central-Coordination">Central Coordination</a>: Central Coordination
  7468. <li><a accesskey="2" href="#National-Teams">National Teams</a>: National Teams
  7469. <li><a accesskey="3" href="#Mailing-Lists">Mailing Lists</a>: Mailing Lists
  7470. </ul>
  7471. <div class="node">
  7472. <a name="Central-Coordination"></a>
  7473. <p><hr>
  7474. Next:&nbsp;<a rel="next" accesskey="n" href="#National-Teams">National Teams</a>,
  7475. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Organization">Organization</a>,
  7476. Up:&nbsp;<a rel="up" accesskey="u" href="#Organization">Organization</a>
  7477. </div>
  7478. <h4 class="subsection">12.4.1 Central Coordination</h4>
  7479. <p>I also think GNU will need sooner than it thinks, that someone set up
  7480. a way to organize and coordinate these groups. Some kind of group
  7481. of groups. My opinion is that it would be good that GNU delegates
  7482. this task to a small group of collaborating volunteers, shortly.
  7483. Perhaps in <samp><span class="file">gnu.announce</span></samp> a list of this national committee's
  7484. can be published.
  7485. <p>My role as coordinator would simply be to refer to Ulrich any German
  7486. speaking volunteer interested to localization of free software packages, and
  7487. maybe helping national groups to initially organize, while maintaining
  7488. national registries for until national groups are ready to take over.
  7489. In fact, the coordinator should ease volunteers to get in contact with
  7490. one another for creating national teams, which should then select
  7491. one coordinator per language, or country (regionalized language).
  7492. If well done, the coordination should be useful without being an
  7493. overwhelming task, the time to put delegations in place.
  7494. <div class="node">
  7495. <a name="National-Teams"></a>
  7496. <p><hr>
  7497. Next:&nbsp;<a rel="next" accesskey="n" href="#Mailing-Lists">Mailing Lists</a>,
  7498. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Central-Coordination">Central Coordination</a>,
  7499. Up:&nbsp;<a rel="up" accesskey="u" href="#Organization">Organization</a>
  7500. </div>
  7501. <h4 class="subsection">12.4.2 National Teams</h4>
  7502. <p>I suggest we look for volunteer coordinators/editors for individual
  7503. languages. These people will scan contributions of translation files
  7504. for various programs, for their own languages, and will ensure high
  7505. and uniform standards of diction.
  7506. <p>From my current experience with other people in these days, those who
  7507. provide localizations are very enthusiastic about the process, and are
  7508. more interested in the localization process than in the program they
  7509. localize, and want to do many programs, not just one. This seems
  7510. to confirm that having a coordinator/editor for each language is a
  7511. good idea.
  7512. <p>We need to choose someone who is good at writing clear and concise
  7513. prose in the language in question. That is hard&mdash;we can't check
  7514. it ourselves. So we need to ask a few people to judge each others'
  7515. writing and select the one who is best.
  7516. <p>I announce my prerelease to a few dozen people, and you would not
  7517. believe all the discussions it generated already. I shudder to think
  7518. what will happen when this will be launched, for true, officially,
  7519. world wide. Who am I to arbitrate between two Czekolsovak users
  7520. contradicting each other, for example?
  7521. <p>I assume that your German is not much better than my French so that
  7522. I would not be able to judge about these formulations. What I would
  7523. suggest is that for each language there is a group for people who
  7524. maintain the PO files and judge about changes. I suspect there will
  7525. be cultural differences between how such groups of people will behave.
  7526. Some will have relaxed ways, reach consensus easily, and have anyone
  7527. of the group relate to the maintainers, while others will fight to
  7528. death, organize heavy administrations up to national standards, and
  7529. use strict channels.
  7530. <p>The German team is putting out a good example. Right now, they are
  7531. maybe half a dozen people revising translations of each other and
  7532. discussing the linguistic issues. I do not even have all the names.
  7533. Ulrich Drepper is taking care of coordinating the German team.
  7534. He subscribed to all my pretest lists, so I do not even have to warn
  7535. him specifically of incoming releases.
  7536. <p>I'm sure, that is a good idea to get teams for each language working
  7537. on translations. That will make the translations better and more
  7538. consistent.
  7539. <ul class="menu">
  7540. <li><a accesskey="1" href="#Sub_002dCultures">Sub-Cultures</a>: Sub-Cultures
  7541. <li><a accesskey="2" href="#Organizational-Ideas">Organizational Ideas</a>: Organizational Ideas
  7542. </ul>
  7543. <div class="node">
  7544. <a name="Sub-Cultures"></a>
  7545. <a name="Sub_002dCultures"></a>
  7546. <p><hr>
  7547. Next:&nbsp;<a rel="next" accesskey="n" href="#Organizational-Ideas">Organizational Ideas</a>,
  7548. Previous:&nbsp;<a rel="previous" accesskey="p" href="#National-Teams">National Teams</a>,
  7549. Up:&nbsp;<a rel="up" accesskey="u" href="#National-Teams">National Teams</a>
  7550. </div>
  7551. <h5 class="subsubsection">12.4.2.1 Sub-Cultures</h5>
  7552. <p>Taking French for example, there are a few sub-cultures around computers
  7553. which developed diverging vocabularies. Picking volunteers here and
  7554. there without addressing this problem in an organized way, soon in the
  7555. project, might produce a distasteful mix of internationalized programs,
  7556. and possibly trigger endless quarrels among those who really care.
  7557. <p>Keeping some kind of unity in the way French localization of
  7558. internationalized programs is achieved is a difficult (and delicate) job.
  7559. Knowing the latin character of French people (:-), if we take this
  7560. the wrong way, we could end up nowhere, or spoil a lot of energies.
  7561. Maybe we should begin to address this problem seriously <em>before</em>
  7562. GNU <code>gettext</code> become officially published. And I suspect that this
  7563. means soon!
  7564. <div class="node">
  7565. <a name="Organizational-Ideas"></a>
  7566. <p><hr>
  7567. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Sub_002dCultures">Sub-Cultures</a>,
  7568. Up:&nbsp;<a rel="up" accesskey="u" href="#National-Teams">National Teams</a>
  7569. </div>
  7570. <h5 class="subsubsection">12.4.2.2 Organizational Ideas</h5>
  7571. <p>I expect the next big changes after the official release. Please note
  7572. that I use the German translation of the short GPL message. We need
  7573. to set a few good examples before the localization goes out for true
  7574. in the free software community. Here are a few points to discuss:
  7575. <ul>
  7576. <li>Each group should have one FTP server (at least one master).
  7577. <li>The files on the server should reflect the latest version (of
  7578. course!) and it should also contain a RCS directory with the
  7579. corresponding archives (I don't have this now).
  7580. <li>There should also be a ChangeLog file (this is more useful than the
  7581. RCS archive but can be generated automatically from the later by
  7582. Emacs).
  7583. <li>A <dfn>core group</dfn> should judge about questionable changes (for now
  7584. this group consists solely by me but I ask some others occasionally;
  7585. this also seems to work).
  7586. </ul>
  7587. <div class="node">
  7588. <a name="Mailing-Lists"></a>
  7589. <p><hr>
  7590. Previous:&nbsp;<a rel="previous" accesskey="p" href="#National-Teams">National Teams</a>,
  7591. Up:&nbsp;<a rel="up" accesskey="u" href="#Organization">Organization</a>
  7592. </div>
  7593. <h4 class="subsection">12.4.3 Mailing Lists</h4>
  7594. <p>If we get any inquiries about GNU <code>gettext</code>, send them on to:
  7595. <pre class="example"> <samp><span class="file">coordinator@translationproject.org</span></samp>
  7596. </pre>
  7597. <p>The <samp><span class="file">*-pretest</span></samp> lists are quite useful to me, maybe the idea could
  7598. be generalized to many GNU, and non-GNU packages. But each maintainer
  7599. his/her way!
  7600. <p>Fran&ccedil;ois, we have a mechanism in place here at
  7601. <samp><span class="file">gnu.ai.mit.edu</span></samp> to track teams, support mailing lists for
  7602. them and log members. We have a slight preference that you use it.
  7603. If this is OK with you, I can get you clued in.
  7604. <p>Things are changing! A few years ago, when Daniel Fekete and I
  7605. asked for a mailing list for GNU localization, nested at the FSF, we
  7606. were politely invited to organize it anywhere else, and so did we.
  7607. For communicating with my pretesters, I later made a handful of
  7608. mailing lists located at iro.umontreal.ca and administrated by
  7609. <code>majordomo</code>. These lists have been <em>very</em> dependable
  7610. so far<small class="dots">...</small>
  7611. <p>I suspect that the German team will organize itself a mailing list
  7612. located in Germany, and so forth for other countries. But before they
  7613. organize for true, it could surely be useful to offer mailing lists
  7614. located at the FSF to each national team. So yes, please explain me
  7615. how I should proceed to create and handle them.
  7616. <p>We should create temporary mailing lists, one per country, to help
  7617. people organize. Temporary, because once regrouped and structured, it
  7618. would be fair the volunteers from country bring back <em>their</em> list
  7619. in there and manage it as they want. My feeling is that, in the long
  7620. run, each team should run its own list, from within their country.
  7621. There also should be some central list to which all teams could
  7622. subscribe as they see fit, as long as each team is represented in it.
  7623. <div class="node">
  7624. <a name="Information-Flow"></a>
  7625. <p><hr>
  7626. Next:&nbsp;<a rel="next" accesskey="n" href="#Translating-plural-forms">Translating plural forms</a>,
  7627. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Organization">Organization</a>,
  7628. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7629. </div>
  7630. <h3 class="section">12.5 Information Flow</h3>
  7631. <p><strong> NOTE: </strong> This documentation section is outdated and needs to be
  7632. revised.
  7633. <p>There will surely be some discussion about this messages after the
  7634. packages are finally released. If people now send you some proposals
  7635. for better messages, how do you proceed? Jim, please note that
  7636. right now, as I put forward nearly a dozen of localizable programs, I
  7637. receive both the translations and the coordination concerns about them.
  7638. <p>If I put one of my things to pretest, Ulrich receives the announcement
  7639. and passes it on to the German team, who make last minute revisions.
  7640. Then he submits the translation files to me <em>as the maintainer</em>.
  7641. For free packages I do not maintain, I would not even hear about it.
  7642. This scheme could be made to work for the whole Translation Project,
  7643. I think. For security reasons, maybe Ulrich (national coordinators,
  7644. in fact) should update central registry kept at the Translation Project
  7645. (Jim, me, or Len's recruits) once in a while.
  7646. <p>In December/January, I was aggressively ready to internationalize
  7647. all of GNU, giving myself the duty of one small GNU package per week
  7648. or so, taking many weeks or months for bigger packages. But it does
  7649. not work this way. I first did all the things I'm responsible for.
  7650. I've nothing against some missionary work on other maintainers, but
  7651. I'm also loosing a lot of energy over it&mdash;same debates over again.
  7652. <p>And when the first localized packages are released we'll get a lot of
  7653. responses about ugly translations :-). Surely, and we need to have
  7654. beforehand a fairly good idea about how to handle the information
  7655. flow between the national teams and the package maintainers.
  7656. <p>Please start saving somewhere a quick history of each PO file. I know
  7657. for sure that the file format will change, allowing for comments.
  7658. It would be nice that each file has a kind of log, and references for
  7659. those who want to submit comments or gripes, or otherwise contribute.
  7660. I sent a proposal for a fast and flexible format, but it is not
  7661. receiving acceptance yet by the GNU deciders. I'll tell you when I
  7662. have more information about this.
  7663. <div class="node">
  7664. <a name="Translating-plural-forms"></a>
  7665. <p><hr>
  7666. Next:&nbsp;<a rel="next" accesskey="n" href="#Prioritizing-messages">Prioritizing messages</a>,
  7667. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Information-Flow">Information Flow</a>,
  7668. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7669. </div>
  7670. <h3 class="section">12.6 Translating plural forms</h3>
  7671. <p><a name="index-plural-forms_002c-translating-1111"></a>Suppose you are translating a PO file, and it contains an entry like this:
  7672. <pre class="smallexample"> #, c-format
  7673. msgid "One file removed"
  7674. msgid_plural "%d files removed"
  7675. msgstr[0] ""
  7676. msgstr[1] ""
  7677. </pre>
  7678. <p class="noindent">What does this mean? How do you fill it in?
  7679. <p>Such an entry denotes a message with plural forms, that is, a message where
  7680. the text depends on a cardinal number. The general form of the message,
  7681. in English, is the <code>msgid_plural</code> line. The <code>msgid</code> line is the
  7682. English singular form, that is, the form for when the number is equal to 1.
  7683. More details about plural forms are explained in <a href="#Plural-forms">Plural forms</a>.
  7684. <p>The first thing you need to look at is the <code>Plural-Forms</code> line in the
  7685. header entry of the PO file. It contains the number of plural forms and a
  7686. formula. If the PO file does not yet have such a line, you have to add it.
  7687. It only depends on the language into which you are translating. You can
  7688. get this info by using the <code>msginit</code> command (see <a href="#Creating">Creating</a>) &ndash;
  7689. it contains a database of known plural formulas &ndash; or by asking other
  7690. members of your translation team.
  7691. <p>Suppose the line looks as follows:
  7692. <pre class="smallexample"> "Plural-Forms: nplurals=3; plural=n%10==1 &amp;&amp; n%100!=11 ? 0 : n%10&gt;=2 &amp;&amp; n"
  7693. "%10&lt;=4 &amp;&amp; (n%100&lt;10 || n%100&gt;=20) ? 1 : 2;\n"
  7694. </pre>
  7695. <p>It's logically one line; recall that the PO file formatting is allowed to
  7696. break long lines so that each physical line fits in 80 monospaced columns.
  7697. <p>The value of <code>nplurals</code> here tells you that there are three plural
  7698. forms. The first thing you need to do is to ensure that the entry contains
  7699. an <code>msgstr</code> line for each of the forms:
  7700. <pre class="smallexample"> #, c-format
  7701. msgid "One file removed"
  7702. msgid_plural "%d files removed"
  7703. msgstr[0] ""
  7704. msgstr[1] ""
  7705. msgstr[2] ""
  7706. </pre>
  7707. <p>Then translate the <code>msgid_plural</code> line and fill it in into each
  7708. <code>msgstr</code> line:
  7709. <pre class="smallexample"> #, c-format
  7710. msgid "One file removed"
  7711. msgid_plural "%d files removed"
  7712. msgstr[0] "%d slika uklonjenih"
  7713. msgstr[1] "%d slika uklonjenih"
  7714. msgstr[2] "%d slika uklonjenih"
  7715. </pre>
  7716. <p>Now you can refine the translation so that it matches the plural form.
  7717. According to the formula above, <code>msgstr[0]</code> is used when the number
  7718. ends in 1 but does not end in 11; <code>msgstr[1]</code> is used when the number
  7719. ends in 2, 3, 4, but not in 12, 13, 14; and <code>msgstr[2]</code> is used in
  7720. all other cases. With this knowledge, you can refine the translations:
  7721. <pre class="smallexample"> #, c-format
  7722. msgid "One file removed"
  7723. msgid_plural "%d files removed"
  7724. msgstr[0] "%d slika je uklonjena"
  7725. msgstr[1] "%d datoteke uklonjenih"
  7726. msgstr[2] "%d slika uklonjenih"
  7727. </pre>
  7728. <p>You noticed that in the English singular form (<code>msgid</code>) the number
  7729. placeholder could be omitted and replaced by the numeral word &ldquo;one&rdquo;.
  7730. Can you do this in your translation as well?
  7731. <pre class="smallexample"> msgstr[0] "jednom datotekom je uklonjen"
  7732. </pre>
  7733. <p class="noindent">Well, it depends on whether <code>msgstr[0]</code> applies only to the number 1,
  7734. or to other numbers as well. If, according to the plural formula,
  7735. <code>msgstr[0]</code> applies only to <code>n == 1</code>, then you can use the
  7736. specialized translation without the number placeholder. In our case,
  7737. however, <code>msgstr[0]</code> also applies to the numbers 21, 31, 41, etc.,
  7738. and therefore you cannot omit the placeholder.
  7739. <div class="node">
  7740. <a name="Prioritizing-messages"></a>
  7741. <p><hr>
  7742. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Translating-plural-forms">Translating plural forms</a>,
  7743. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators">Translators</a>
  7744. </div>
  7745. <h3 class="section">12.7 Prioritizing messages: How to determine which messages to translate first</h3>
  7746. <p>A translator sometimes has only a limited amount of time per week to
  7747. spend on a package, and some packages have quite large message catalogs
  7748. (over 1000 messages). Therefore she wishes to translate the messages
  7749. first that are the most visible to the user, or that occur most frequently.
  7750. This section describes how to determine these "most urgent" messages.
  7751. It also applies to determine the "next most urgent" messages after the
  7752. message catalog has already been partially translated.
  7753. <p>In a first step, she uses the programs like a user would do. While she
  7754. does this, the GNU <code>gettext</code> library logs into a file the not yet
  7755. translated messages for which a translation was requested from the program.
  7756. <p>In a second step, she uses the PO mode to translate precisely this set
  7757. of messages.
  7758. <p><a name="index-GETTEXT_005fLOG_005fUNTRANSLATED_0040r_007b_002c-environment-variable_007d-1112"></a>Here a more details. The GNU <code>libintl</code> library (but not the
  7759. corresponding functions in GNU <code>libc</code>) supports an environment variable
  7760. <code>GETTEXT_LOG_UNTRANSLATED</code>. The GNU <code>libintl</code> library will
  7761. log into this file the messages for which <code>gettext()</code> and related
  7762. functions couldn't find the translation. If the file doesn't exist, it
  7763. will be created as needed. On systems with GNU <code>libc</code> a shared library
  7764. &lsquo;<samp><span class="samp">preloadable_libintl.so</span></samp>&rsquo; is provided that can be used with the ELF
  7765. &lsquo;<samp><span class="samp">LD_PRELOAD</span></samp>&rsquo; mechanism.
  7766. <p>So, in the first step, the translator uses these commands on systems with
  7767. GNU <code>libc</code>:
  7768. <pre class="smallexample"> $ LD_PRELOAD=/usr/local/lib/preloadable_libintl.so
  7769. $ export LD_PRELOAD
  7770. $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused
  7771. $ export GETTEXT_LOG_UNTRANSLATED
  7772. </pre>
  7773. <p class="noindent">and these commands on other systems:
  7774. <pre class="smallexample"> $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused
  7775. $ export GETTEXT_LOG_UNTRANSLATED
  7776. </pre>
  7777. <p>Then she uses and peruses the programs. (It is a good and recommended
  7778. practice to use the programs for which you provide translations: it
  7779. gives you the needed context.) When done, she removes the environment
  7780. variables:
  7781. <pre class="smallexample"> $ unset LD_PRELOAD
  7782. $ unset GETTEXT_LOG_UNTRANSLATED
  7783. </pre>
  7784. <p>The second step starts with removing duplicates:
  7785. <pre class="smallexample"> $ msguniq $HOME/gettextlogused &gt; missing.po
  7786. </pre>
  7787. <p>The result is a PO file, but needs some preprocessing before a PO file editor
  7788. can be used with it. First, it is a multi-domain PO file, containing
  7789. messages from many translation domains. Second, it lacks all translator
  7790. comments and source references. Here is how to get a list of the affected
  7791. translation domains:
  7792. <pre class="smallexample"> $ sed -n -e 's,^domain "\(.*\)"$,\1,p' &lt; missing.po | sort | uniq
  7793. </pre>
  7794. <p>Then the translator can handle the domains one by one. For simplicity,
  7795. let's use environment variables to denote the language, domain and source
  7796. package.
  7797. <pre class="smallexample"> $ lang=nl # your language
  7798. $ domain=coreutils # the name of the domain to be handled
  7799. $ package=/usr/src/gnu/coreutils-4.5.4 # the package where it comes from
  7800. </pre>
  7801. <p>She takes the latest copy of <samp><span class="file">$lang.po</span></samp> from the Translation Project,
  7802. or from the package (in most cases, <samp><span class="file">$package/po/$lang.po</span></samp>), or
  7803. creates a fresh one if she's the first translator (see <a href="#Creating">Creating</a>).
  7804. She then uses the following commands to mark the not urgent messages as
  7805. "obsolete". (This doesn't mean that these messages - translated and
  7806. untranslated ones - will go away. It simply means that the PO file editor
  7807. will ignore them in the following editing session.)
  7808. <pre class="smallexample"> $ msggrep --domain=$domain missing.po | grep -v '^domain' \
  7809. &gt; $domain-missing.po
  7810. $ msgattrib --set-obsolete --ignore-file $domain-missing.po $domain.$lang.po \
  7811. &gt; $domain.$lang-urgent.po
  7812. </pre>
  7813. <p>The she translates <samp><span class="file">$domain.$lang-urgent.po</span></samp> by use of a PO file editor
  7814. (see <a href="#Editing">Editing</a>).
  7815. (FIXME: I don't know whether <code>KBabel</code> and <code>gtranslator</code> also
  7816. preserve obsolete messages, as they should.)
  7817. Finally she restores the not urgent messages (with their earlier
  7818. translations, for those which were already translated) through this command:
  7819. <pre class="smallexample"> $ msgmerge --no-fuzzy-matching $domain.$lang-urgent.po $package/po/$domain.pot \
  7820. &gt; $domain.$lang.po
  7821. </pre>
  7822. <p>Then she can submit <samp><span class="file">$domain.$lang.po</span></samp> and proceed to the next domain.
  7823. <div class="node">
  7824. <a name="Maintainers"></a>
  7825. <p><hr>
  7826. Next:&nbsp;<a rel="next" accesskey="n" href="#Installers">Installers</a>,
  7827. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Translators">Translators</a>,
  7828. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  7829. </div>
  7830. <h2 class="chapter">13 The Maintainer's View</h2>
  7831. <p><a name="index-package-maintainer_0027s-view-of-_0040code_007bgettext_007d-1113"></a>
  7832. The maintainer of a package has many responsibilities. One of them
  7833. is ensuring that the package will install easily on many platforms,
  7834. and that the magic we described earlier (see <a href="#Users">Users</a>) will work
  7835. for installers and end users.
  7836. <p>Of course, there are many possible ways by which GNU <code>gettext</code>
  7837. might be integrated in a distribution, and this chapter does not cover
  7838. them in all generality. Instead, it details one possible approach which
  7839. is especially adequate for many free software distributions following GNU
  7840. standards, or even better, Gnits standards, because GNU <code>gettext</code>
  7841. is purposely for helping the internationalization of the whole GNU
  7842. project, and as many other good free packages as possible. So, the
  7843. maintainer's view presented here presumes that the package already has
  7844. a <samp><span class="file">configure.ac</span></samp> file and uses GNU Autoconf.
  7845. <p>Nevertheless, GNU <code>gettext</code> may surely be useful for free packages
  7846. not following GNU standards and conventions, but the maintainers of such
  7847. packages might have to show imagination and initiative in organizing
  7848. their distributions so <code>gettext</code> work for them in all situations.
  7849. There are surely many, out there.
  7850. <p>Even if <code>gettext</code> methods are now stabilizing, slight adjustments
  7851. might be needed between successive <code>gettext</code> versions, so you
  7852. should ideally revise this chapter in subsequent releases, looking
  7853. for changes.
  7854. <ul class="menu">
  7855. <li><a accesskey="1" href="#Flat-and-Non_002dFlat">Flat and Non-Flat</a>: Flat or Non-Flat Directory Structures
  7856. <li><a accesskey="2" href="#Prerequisites">Prerequisites</a>: Prerequisite Works
  7857. <li><a accesskey="3" href="#gettextize-Invocation">gettextize Invocation</a>: Invoking the <code>gettextize</code> Program
  7858. <li><a accesskey="4" href="#Adjusting-Files">Adjusting Files</a>: Files You Must Create or Alter
  7859. <li><a accesskey="5" href="#autoconf-macros">autoconf macros</a>: Autoconf macros for use in <samp><span class="file">configure.ac</span></samp>
  7860. <li><a accesskey="6" href="#CVS-Issues">CVS Issues</a>: Integrating with CVS
  7861. <li><a accesskey="7" href="#Release-Management">Release Management</a>: Creating a Distribution Tarball
  7862. </ul>
  7863. <div class="node">
  7864. <a name="Flat-and-Non-Flat"></a>
  7865. <a name="Flat-and-Non_002dFlat"></a>
  7866. <p><hr>
  7867. Next:&nbsp;<a rel="next" accesskey="n" href="#Prerequisites">Prerequisites</a>,
  7868. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Maintainers">Maintainers</a>,
  7869. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  7870. </div>
  7871. <h3 class="section">13.1 Flat or Non-Flat Directory Structures</h3>
  7872. <p>Some free software packages are distributed as <code>tar</code> files which unpack
  7873. in a single directory, these are said to be <dfn>flat</dfn> distributions.
  7874. Other free software packages have a one level hierarchy of subdirectories, using
  7875. for example a subdirectory named <samp><span class="file">doc/</span></samp> for the Texinfo manual and
  7876. man pages, another called <samp><span class="file">lib/</span></samp> for holding functions meant to
  7877. replace or complement C libraries, and a subdirectory <samp><span class="file">src/</span></samp> for
  7878. holding the proper sources for the package. These other distributions
  7879. are said to be <dfn>non-flat</dfn>.
  7880. <p>We cannot say much about flat distributions. A flat
  7881. directory structure has the disadvantage of increasing the difficulty
  7882. of updating to a new version of GNU <code>gettext</code>. Also, if you have
  7883. many PO files, this could somewhat pollute your single directory.
  7884. Also, GNU <code>gettext</code>'s libintl sources consist of C sources, shell
  7885. scripts, <code>sed</code> scripts and complicated Makefile rules, which don't
  7886. fit well into an existing flat structure. For these reasons, we
  7887. recommend to use non-flat approach in this case as well.
  7888. <p>Maybe because GNU <code>gettext</code> itself has a non-flat structure,
  7889. we have more experience with this approach, and this is what will be
  7890. described in the remaining of this chapter. Some maintainers might
  7891. use this as an opportunity to unflatten their package structure.
  7892. <div class="node">
  7893. <a name="Prerequisites"></a>
  7894. <p><hr>
  7895. Next:&nbsp;<a rel="next" accesskey="n" href="#gettextize-Invocation">gettextize Invocation</a>,
  7896. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Flat-and-Non_002dFlat">Flat and Non-Flat</a>,
  7897. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  7898. </div>
  7899. <h3 class="section">13.2 Prerequisite Works</h3>
  7900. <p><a name="index-converting-a-package-to-use-_0040code_007bgettext_007d-1114"></a><a name="index-migration-from-earlier-versions-of-_0040code_007bgettext_007d-1115"></a><a name="index-upgrading-to-new-versions-of-_0040code_007bgettext_007d-1116"></a>
  7901. There are some works which are required for using GNU <code>gettext</code>
  7902. in one of your package. These works have some kind of generality
  7903. that escape the point by point descriptions used in the remainder
  7904. of this chapter. So, we describe them here.
  7905. <ul>
  7906. <li>Before attempting to use <code>gettextize</code> you should install some
  7907. other packages first.
  7908. Ensure that recent versions of GNU <code>m4</code>, GNU Autoconf and GNU
  7909. <code>gettext</code> are already installed at your site, and if not, proceed
  7910. to do this first. If you get to install these things, beware that
  7911. GNU <code>m4</code> must be fully installed before GNU Autoconf is even
  7912. <em>configured</em>.
  7913. <p>To further ease the task of a package maintainer the <code>automake</code>
  7914. package was designed and implemented. GNU <code>gettext</code> now uses this
  7915. tool and the <samp><span class="file">Makefile</span></samp>s in the <samp><span class="file">intl/</span></samp> and <samp><span class="file">po/</span></samp>
  7916. therefore know about all the goals necessary for using <code>automake</code>
  7917. and <samp><span class="file">libintl</span></samp> in one project.
  7918. <p>Those four packages are only needed by you, as a maintainer; the
  7919. installers of your own package and end users do not really need any of
  7920. GNU <code>m4</code>, GNU Autoconf, GNU <code>gettext</code>, or GNU <code>automake</code>
  7921. for successfully installing and running your package, with messages
  7922. properly translated. But this is not completely true if you provide
  7923. internationalized shell scripts within your own package: GNU
  7924. <code>gettext</code> shall then be installed at the user site if the end users
  7925. want to see the translation of shell script messages.
  7926. <li>Your package should use Autoconf and have a <samp><span class="file">configure.ac</span></samp> or
  7927. <samp><span class="file">configure.in</span></samp> file.
  7928. If it does not, you have to learn how. The Autoconf documentation
  7929. is quite well written, it is a good idea that you print it and get
  7930. familiar with it.
  7931. <li>Your C sources should have already been modified according to
  7932. instructions given earlier in this manual. See <a href="#Sources">Sources</a>.
  7933. <li>Your <samp><span class="file">po/</span></samp> directory should receive all PO files submitted to you
  7934. by the translator teams, each having <samp><var>ll</var><span class="file">.po</span></samp> as a name.
  7935. This is not usually easy to get translation
  7936. work done before your package gets internationalized and available!
  7937. Since the cycle has to start somewhere, the easiest for the maintainer
  7938. is to start with absolutely no PO files, and wait until various
  7939. translator teams get interested in your package, and submit PO files.
  7940. </ul>
  7941. <p>It is worth adding here a few words about how the maintainer should
  7942. ideally behave with PO files submissions. As a maintainer, your role is
  7943. to authenticate the origin of the submission as being the representative
  7944. of the appropriate translating teams of the Translation Project (forward
  7945. the submission to <samp><span class="file">coordinator@translationproject.org</span></samp> in case of doubt),
  7946. to ensure that the PO file format is not severely broken and does not
  7947. prevent successful installation, and for the rest, to merely put these
  7948. PO files in <samp><span class="file">po/</span></samp> for distribution.
  7949. <p>As a maintainer, you do not have to take on your shoulders the
  7950. responsibility of checking if the translations are adequate or
  7951. complete, and should avoid diving into linguistic matters. Translation
  7952. teams drive themselves and are fully responsible of their linguistic
  7953. choices for the Translation Project. Keep in mind that translator teams are <em>not</em>
  7954. driven by maintainers. You can help by carefully redirecting all
  7955. communications and reports from users about linguistic matters to the
  7956. appropriate translation team, or explain users how to reach or join
  7957. their team. The simplest might be to send them the <samp><span class="file">ABOUT-NLS</span></samp> file.
  7958. <p>Maintainers should <em>never ever</em> apply PO file bug reports
  7959. themselves, short-cutting translation teams. If some translator has
  7960. difficulty to get some of her points through her team, it should not be
  7961. an option for her to directly negotiate translations with maintainers.
  7962. Teams ought to settle their problems themselves, if any. If you, as
  7963. a maintainer, ever think there is a real problem with a team, please
  7964. never try to <em>solve</em> a team's problem on your own.
  7965. <div class="node">
  7966. <a name="gettextize-Invocation"></a>
  7967. <p><hr>
  7968. Next:&nbsp;<a rel="next" accesskey="n" href="#Adjusting-Files">Adjusting Files</a>,
  7969. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Prerequisites">Prerequisites</a>,
  7970. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  7971. </div>
  7972. <h3 class="section">13.3 Invoking the <code>gettextize</code> Program</h3>
  7973. <p>The <code>gettextize</code> program is an interactive tool that helps the
  7974. maintainer of a package internationalized through GNU <code>gettext</code>.
  7975. It is used for two purposes:
  7976. <ul>
  7977. <li>As a wizard, when a package is modified to use GNU <code>gettext</code> for
  7978. the first time.
  7979. <li>As a migration tool, for upgrading the GNU <code>gettext</code> support in
  7980. a package from a previous to a newer version of GNU <code>gettext</code>.
  7981. </ul>
  7982. <p>This program performs the following tasks:
  7983. <ul>
  7984. <li>It copies into the package some files that are consistently and
  7985. identically needed in every package internationalized through
  7986. GNU <code>gettext</code>.
  7987. <li>It performs as many of the tasks mentioned in the next section
  7988. <a href="#Adjusting-Files">Adjusting Files</a> as can be performed automatically.
  7989. <li>It removes obsolete files and idioms used for previous GNU
  7990. <code>gettext</code> versions to the form recommended for the current GNU
  7991. <code>gettext</code> version.
  7992. <li>It prints a summary of the tasks that ought to be done manually
  7993. and could not be done automatically by <code>gettextize</code>.
  7994. </ul>
  7995. <p>It can be invoked as follows:
  7996. <p><a name="index-gettextize-1117"></a><a name="index-g_t_0040code_007bgettextize_007d-program_002c-usage-1118"></a>
  7997. <pre class="example"> gettextize [ <var>option</var>... ] [ <var>directory</var> ]
  7998. </pre>
  7999. <p class="noindent">and accepts the following options:
  8000. <dl>
  8001. <dt>&lsquo;<samp><span class="samp">-f</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--force</span></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1119"></a><a name="index-g_t_002d_002dforce_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1120"></a>Force replacement of files which already exist.
  8002. <br><dt>&lsquo;<samp><span class="samp">--intl</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dintl_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1121"></a>Install the libintl sources in a subdirectory named <samp><span class="file">intl/</span></samp>.
  8003. This libintl will be used to provide internationalization on systems
  8004. that don't have GNU libintl installed. If this option is omitted,
  8005. the call to <code>AM_GNU_GETTEXT</code> in <samp><span class="file">configure.ac</span></samp> should read:
  8006. &lsquo;<samp><span class="samp">AM_GNU_GETTEXT([external])</span></samp>&rsquo;, and internationalization will not
  8007. be enabled on systems lacking GNU gettext.
  8008. <br><dt>&lsquo;<samp><span class="samp">--po-dir=</span><var>dir</var></samp>&rsquo;<dd><a name="index-g_t_002d_002dpo_002ddir_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1122"></a>Specify a directory containing PO files. Such a directory contains the
  8009. translations into various languages of a particular POT file. This
  8010. option can be specified multiple times, once for each translation domain.
  8011. If it is not specified, the directory named <samp><span class="file">po/</span></samp> is updated.
  8012. <br><dt>&lsquo;<samp><span class="samp">--no-changelog</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dno_002dchangelog_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1123"></a>Don't update or create ChangeLog files. By default, <code>gettextize</code>
  8013. logs all changes (file additions, modifications and removals) in a
  8014. file called &lsquo;<samp><span class="samp">ChangeLog</span></samp>&rsquo; in each affected directory.
  8015. <br><dt>&lsquo;<samp><span class="samp">--symlink</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dsymlink_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1124"></a>Make symbolic links instead of copying the needed files. This can be
  8016. useful to save a few kilobytes of disk space, but it requires extra
  8017. effort to create self-contained tarballs, it may disturb some mechanism
  8018. the maintainer applies to the sources, and it is likely to introduce
  8019. bugs when a newer version of <code>gettext</code> is installed on the system.
  8020. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--dry-run</span></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1125"></a><a name="index-g_t_002d_002ddry_002drun_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1126"></a>Print modifications but don't perform them. All actions that
  8021. <code>gettextize</code> would normally execute are inhibited and instead only
  8022. listed on standard output.
  8023. <br><dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1127"></a>Display this help and exit.
  8024. <br><dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1128"></a>Output version information and exit.
  8025. </dl>
  8026. <p>If <var>directory</var> is given, this is the top level directory of a
  8027. package to prepare for using GNU <code>gettext</code>. If not given, it
  8028. is assumed that the current directory is the top level directory of
  8029. such a package.
  8030. <p>The program <code>gettextize</code> provides the following files. However,
  8031. no existing file will be replaced unless the option <code>--force</code>
  8032. (<code>-f</code>) is specified.
  8033. <ol type=1 start=1>
  8034. <li>The <samp><span class="file">ABOUT-NLS</span></samp> file is copied in the main directory of your package,
  8035. the one being at the top level. This file gives the main indications
  8036. about how to install and use the Native Language Support features
  8037. of your program. You might elect to use a more recent copy of this
  8038. <samp><span class="file">ABOUT-NLS</span></samp> file than the one provided through <code>gettextize</code>,
  8039. if you have one handy. You may also fetch a more recent copy of file
  8040. <samp><span class="file">ABOUT-NLS</span></samp> from Translation Project sites, and from most GNU
  8041. archive sites.
  8042. <li>A <samp><span class="file">po/</span></samp> directory is created for eventually holding
  8043. all translation files, but initially only containing the file
  8044. <samp><span class="file">po/Makefile.in.in</span></samp> from the GNU <code>gettext</code> distribution
  8045. (beware the double &lsquo;<samp><span class="samp">.in</span></samp>&rsquo; in the file name) and a few auxiliary
  8046. files. If the <samp><span class="file">po/</span></samp> directory already exists, it will be preserved
  8047. along with the files it contains, and only <samp><span class="file">Makefile.in.in</span></samp> and
  8048. the auxiliary files will be overwritten.
  8049. <p>If &lsquo;<samp><span class="samp">--po-dir</span></samp>&rsquo; has been specified, this holds for every directory
  8050. specified through &lsquo;<samp><span class="samp">--po-dir</span></samp>&rsquo;, instead of <samp><span class="file">po/</span></samp>.
  8051. <li>Only if &lsquo;<samp><span class="samp">--intl</span></samp>&rsquo; has been specified:
  8052. A <samp><span class="file">intl/</span></samp> directory is created and filled with most of the files
  8053. originally in the <samp><span class="file">intl/</span></samp> directory of the GNU <code>gettext</code>
  8054. distribution. Also, if option <code>--force</code> (<code>-f</code>) is given,
  8055. the <samp><span class="file">intl/</span></samp> directory is emptied first.
  8056. <li>The file <samp><span class="file">config.rpath</span></samp> is copied into the directory containing
  8057. configuration support files. It is needed by the <code>AM_GNU_GETTEXT</code>
  8058. autoconf macro.
  8059. <li>Only if the project is using GNU <code>automake</code>:
  8060. A set of <code>autoconf</code> macro files is copied into the package's
  8061. <code>autoconf</code> macro repository, usually in a directory called <samp><span class="file">m4/</span></samp>.
  8062. </ol>
  8063. <p>If your site support symbolic links, <code>gettextize</code> will not
  8064. actually copy the files into your package, but establish symbolic
  8065. links instead. This avoids duplicating the disk space needed in
  8066. all packages. Merely using the &lsquo;<samp><span class="samp">-h</span></samp>&rsquo; option while creating the
  8067. <code>tar</code> archive of your distribution will resolve each link by an
  8068. actual copy in the distribution archive. So, to insist, you really
  8069. should use &lsquo;<samp><span class="samp">-h</span></samp>&rsquo; option with <code>tar</code> within your <code>dist</code>
  8070. goal of your main <samp><span class="file">Makefile.in</span></samp>.
  8071. <p>Furthermore, <code>gettextize</code> will update all <samp><span class="file">Makefile.am</span></samp> files
  8072. in each affected directory, as well as the top level <samp><span class="file">configure.ac</span></samp>
  8073. or <samp><span class="file">configure.in</span></samp> file.
  8074. <p>It is interesting to understand that most new files for supporting
  8075. GNU <code>gettext</code> facilities in one package go in <samp><span class="file">intl/</span></samp>,
  8076. <samp><span class="file">po/</span></samp> and <samp><span class="file">m4/</span></samp> subdirectories. One distinction between
  8077. <samp><span class="file">intl/</span></samp> and the two other directories is that <samp><span class="file">intl/</span></samp> is
  8078. meant to be completely identical in all packages using GNU <code>gettext</code>,
  8079. while the other directories will mostly contain package dependent
  8080. files.
  8081. <p>The <code>gettextize</code> program makes backup files for all files it
  8082. replaces or changes, and also write ChangeLog entries about these
  8083. changes. This way, the careful maintainer can check after running
  8084. <code>gettextize</code> whether its changes are acceptable to him, and
  8085. possibly adjust them. An exception to this rule is the <samp><span class="file">intl/</span></samp>
  8086. directory, which is added or replaced or removed as a whole.
  8087. <p>It is important to understand that <code>gettextize</code> can not do the
  8088. entire job of adapting a package for using GNU <code>gettext</code>. The
  8089. amount of remaining work depends on whether the package uses GNU
  8090. <code>automake</code> or not. But in any case, the maintainer should still
  8091. read the section <a href="#Adjusting-Files">Adjusting Files</a> after invoking <code>gettextize</code>.
  8092. <p>In particular, if after using &lsquo;<samp><span class="samp">gettexize</span></samp>&rsquo;, you get an error
  8093. &lsquo;<samp><span class="samp">AC_COMPILE_IFELSE was called before AC_GNU_SOURCE</span></samp>&rsquo; or
  8094. &lsquo;<samp><span class="samp">AC_RUN_IFELSE was called before AC_GNU_SOURCE</span></samp>&rsquo;, you can fix it
  8095. by modifying <samp><span class="file">configure.ac</span></samp>, as described in <a href="#configure_002eac">configure.ac</a>.
  8096. <p>It is also important to understand that <code>gettextize</code> is not part
  8097. of the GNU build system, in the sense that it should not be invoked
  8098. automatically, and not be invoked by someone who doesn't assume the
  8099. responsibilities of a package maintainer. For the latter purpose, a
  8100. separate tool is provided, see <a href="#autopoint-Invocation">autopoint Invocation</a>.
  8101. <div class="node">
  8102. <a name="Adjusting-Files"></a>
  8103. <p><hr>
  8104. Next:&nbsp;<a rel="next" accesskey="n" href="#autoconf-macros">autoconf macros</a>,
  8105. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gettextize-Invocation">gettextize Invocation</a>,
  8106. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  8107. </div>
  8108. <h3 class="section">13.4 Files You Must Create or Alter</h3>
  8109. <p><a name="index-g_t_0040code_007bgettext_007d-files-1129"></a>
  8110. Besides files which are automatically added through <code>gettextize</code>,
  8111. there are many files needing revision for properly interacting with
  8112. GNU <code>gettext</code>. If you are closely following GNU standards for
  8113. Makefile engineering and auto-configuration, the adaptations should
  8114. be easier to achieve. Here is a point by point description of the
  8115. changes needed in each.
  8116. <p>So, here comes a list of files, each one followed by a description of
  8117. all alterations it needs. Many examples are taken out from the GNU
  8118. <code>gettext</code> 0.18 distribution itself, or from the GNU
  8119. <code>hello</code> distribution (<a href="http://www.franken.de/users/gnu/ke/hello">http://www.franken.de/users/gnu/ke/hello</a>
  8120. or <a href="http://www.gnu.franken.de/ke/hello/">http://www.gnu.franken.de/ke/hello/</a>) You may indeed
  8121. refer to the source code of the GNU <code>gettext</code> and GNU <code>hello</code>
  8122. packages, as they are intended to be good examples for using GNU
  8123. gettext functionality.
  8124. <ul class="menu">
  8125. <li><a accesskey="1" href="#po_002fPOTFILES_002ein">po/POTFILES.in</a>: <samp><span class="file">POTFILES.in</span></samp> in <samp><span class="file">po/</span></samp>
  8126. <li><a accesskey="2" href="#po_002fLINGUAS">po/LINGUAS</a>: <samp><span class="file">LINGUAS</span></samp> in <samp><span class="file">po/</span></samp>
  8127. <li><a accesskey="3" href="#po_002fMakevars">po/Makevars</a>: <samp><span class="file">Makevars</span></samp> in <samp><span class="file">po/</span></samp>
  8128. <li><a accesskey="4" href="#po_002fRules_002d_002a">po/Rules-*</a>: Extending <samp><span class="file">Makefile</span></samp> in <samp><span class="file">po/</span></samp>
  8129. <li><a accesskey="5" href="#configure_002eac">configure.ac</a>: <samp><span class="file">configure.ac</span></samp> at top level
  8130. <li><a accesskey="6" href="#config_002eguess">config.guess</a>: <samp><span class="file">config.guess</span></samp>, <samp><span class="file">config.sub</span></samp> at top level
  8131. <li><a accesskey="7" href="#mkinstalldirs">mkinstalldirs</a>: <samp><span class="file">mkinstalldirs</span></samp> at top level
  8132. <li><a accesskey="8" href="#aclocal">aclocal</a>: <samp><span class="file">aclocal.m4</span></samp> at top level
  8133. <li><a accesskey="9" href="#acconfig">acconfig</a>: <samp><span class="file">acconfig.h</span></samp> at top level
  8134. <li><a href="#config_002eh_002ein">config.h.in</a>: <samp><span class="file">config.h.in</span></samp> at top level
  8135. <li><a href="#Makefile">Makefile</a>: <samp><span class="file">Makefile.in</span></samp> at top level
  8136. <li><a href="#src_002fMakefile">src/Makefile</a>: <samp><span class="file">Makefile.in</span></samp> in <samp><span class="file">src/</span></samp>
  8137. <li><a href="#lib_002fgettext_002eh">lib/gettext.h</a>: <samp><span class="file">gettext.h</span></samp> in <samp><span class="file">lib/</span></samp>
  8138. </ul>
  8139. <div class="node">
  8140. <a name="po%2fPOTFILES.in"></a>
  8141. <a name="po_002fPOTFILES_002ein"></a>
  8142. <p><hr>
  8143. Next:&nbsp;<a rel="next" accesskey="n" href="#po_002fLINGUAS">po/LINGUAS</a>,
  8144. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Adjusting-Files">Adjusting Files</a>,
  8145. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8146. </div>
  8147. <h4 class="subsection">13.4.1 <samp><span class="file">POTFILES.in</span></samp> in <samp><span class="file">po/</span></samp></h4>
  8148. <p><a name="index-g_t_0040file_007bPOTFILES_002ein_007d-file-1130"></a>
  8149. The <samp><span class="file">po/</span></samp> directory should receive a file named
  8150. <samp><span class="file">POTFILES.in</span></samp>. This file tells which files, among all program
  8151. sources, have marked strings needing translation. Here is an example
  8152. of such a file:
  8153. <pre class="example"> # List of source files containing translatable strings.
  8154. # Copyright (C) 1995 Free Software Foundation, Inc.
  8155. # Common library files
  8156. lib/error.c
  8157. lib/getopt.c
  8158. lib/xmalloc.c
  8159. # Package source files
  8160. src/gettext.c
  8161. src/msgfmt.c
  8162. src/xgettext.c
  8163. </pre>
  8164. <p class="noindent">Hash-marked comments and white lines are ignored. All other lines
  8165. list those source files containing strings marked for translation
  8166. (see <a href="#Mark-Keywords">Mark Keywords</a>), in a notation relative to the top level
  8167. of your whole distribution, rather than the location of the
  8168. <samp><span class="file">POTFILES.in</span></samp> file itself.
  8169. <p>When a C file is automatically generated by a tool, like <code>flex</code> or
  8170. <code>bison</code>, that doesn't introduce translatable strings by itself,
  8171. it is recommended to list in <samp><span class="file">po/POTFILES.in</span></samp> the real source file
  8172. (ending in <samp><span class="file">.l</span></samp> in the case of <code>flex</code>, or in <samp><span class="file">.y</span></samp> in the
  8173. case of <code>bison</code>), not the generated C file.
  8174. <div class="node">
  8175. <a name="po%2fLINGUAS"></a>
  8176. <a name="po_002fLINGUAS"></a>
  8177. <p><hr>
  8178. Next:&nbsp;<a rel="next" accesskey="n" href="#po_002fMakevars">po/Makevars</a>,
  8179. Previous:&nbsp;<a rel="previous" accesskey="p" href="#po_002fPOTFILES_002ein">po/POTFILES.in</a>,
  8180. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8181. </div>
  8182. <h4 class="subsection">13.4.2 <samp><span class="file">LINGUAS</span></samp> in <samp><span class="file">po/</span></samp></h4>
  8183. <p><a name="index-g_t_0040file_007bLINGUAS_007d-file-1131"></a>
  8184. The <samp><span class="file">po/</span></samp> directory should also receive a file named
  8185. <samp><span class="file">LINGUAS</span></samp>. This file contains the list of available translations.
  8186. It is a whitespace separated list. Hash-marked comments and white lines
  8187. are ignored. Here is an example file:
  8188. <pre class="example"> # Set of available languages.
  8189. de fr
  8190. </pre>
  8191. <p class="noindent">This example means that German and French PO files are available, so
  8192. that these languages are currently supported by your package. If you
  8193. want to further restrict, at installation time, the set of installed
  8194. languages, this should not be done by modifying the <samp><span class="file">LINGUAS</span></samp> file,
  8195. but rather by using the <code>LINGUAS</code> environment variable
  8196. (see <a href="#Installers">Installers</a>).
  8197. <p>It is recommended that you add the "languages" &lsquo;<samp><span class="samp">en@quot</span></samp>&rsquo; and
  8198. &lsquo;<samp><span class="samp">en@boldquot</span></samp>&rsquo; to the <code>LINGUAS</code> file. <code>en@quot</code> is a
  8199. variant of English message catalogs (<code>en</code>) which uses real quotation
  8200. marks instead of the ugly looking asymmetric ASCII substitutes &lsquo;<samp><span class="samp">`</span></samp>&rsquo;
  8201. and &lsquo;<samp><span class="samp">'</span></samp>&rsquo;. <code>en@boldquot</code> is a variant of <code>en@quot</code> that
  8202. additionally outputs quoted pieces of text in a bold font, when used in
  8203. a terminal emulator which supports the VT100 escape sequences (such as
  8204. <code>xterm</code> or the Linux console, but not Emacs in <kbd>M-x shell</kbd> mode).
  8205. <p>These extra message catalogs &lsquo;<samp><span class="samp">en@quot</span></samp>&rsquo; and &lsquo;<samp><span class="samp">en@boldquot</span></samp>&rsquo;
  8206. are constructed automatically, not by translators; to support them, you
  8207. need the files <samp><span class="file">Rules-quot</span></samp>, <samp><span class="file">quot.sed</span></samp>, <samp><span class="file">boldquot.sed</span></samp>,
  8208. <samp><span class="file">en@quot.header</span></samp>, <samp><span class="file">en@boldquot.header</span></samp>, <samp><span class="file">insert-header.sin</span></samp>
  8209. in the <samp><span class="file">po/</span></samp> directory. You can copy them from GNU gettext's <samp><span class="file">po/</span></samp>
  8210. directory; they are also installed by running <code>gettextize</code>.
  8211. <div class="node">
  8212. <a name="po%2fMakevars"></a>
  8213. <a name="po_002fMakevars"></a>
  8214. <p><hr>
  8215. Next:&nbsp;<a rel="next" accesskey="n" href="#po_002fRules_002d_002a">po/Rules-*</a>,
  8216. Previous:&nbsp;<a rel="previous" accesskey="p" href="#po_002fLINGUAS">po/LINGUAS</a>,
  8217. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8218. </div>
  8219. <h4 class="subsection">13.4.3 <samp><span class="file">Makevars</span></samp> in <samp><span class="file">po/</span></samp></h4>
  8220. <p><a name="index-g_t_0040file_007bMakevars_007d-file-1132"></a>
  8221. The <samp><span class="file">po/</span></samp> directory also has a file named <samp><span class="file">Makevars</span></samp>. It
  8222. contains variables that are specific to your project. <samp><span class="file">po/Makevars</span></samp>
  8223. gets inserted into the <samp><span class="file">po/Makefile</span></samp> when the latter is created.
  8224. The variables thus take effect when the POT file is created or updated,
  8225. and when the message catalogs get installed.
  8226. <p>The first three variables can be left unmodified if your package has a
  8227. single message domain and, accordingly, a single <samp><span class="file">po/</span></samp> directory.
  8228. Only packages which have multiple <samp><span class="file">po/</span></samp> directories at different
  8229. locations need to adjust the three first variables defined in
  8230. <samp><span class="file">Makevars</span></samp>.
  8231. <p>As an alternative to the <code>XGETTEXT_OPTIONS</code> variables, it is also
  8232. possible to specify <code>xgettext</code> options through the
  8233. <code>AM_XGETTEXT_OPTION</code> autoconf macro. See <a href="#AM_005fXGETTEXT_005fOPTION">AM_XGETTEXT_OPTION</a>.
  8234. <div class="node">
  8235. <a name="po%2fRules-*"></a>
  8236. <a name="po_002fRules_002d_002a"></a>
  8237. <p><hr>
  8238. Next:&nbsp;<a rel="next" accesskey="n" href="#configure_002eac">configure.ac</a>,
  8239. Previous:&nbsp;<a rel="previous" accesskey="p" href="#po_002fMakevars">po/Makevars</a>,
  8240. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8241. </div>
  8242. <h4 class="subsection">13.4.4 Extending <samp><span class="file">Makefile</span></samp> in <samp><span class="file">po/</span></samp></h4>
  8243. <p><a name="index-g_t_0040file_007bMakefile_002ein_002ein_007d-extensions-1133"></a>
  8244. All files called <samp><span class="file">Rules-*</span></samp> in the <samp><span class="file">po/</span></samp> directory get appended to
  8245. the <samp><span class="file">po/Makefile</span></samp> when it is created. They present an opportunity to
  8246. add rules for special PO files to the Makefile, without needing to mess
  8247. with <samp><span class="file">po/Makefile.in.in</span></samp>.
  8248. <p><a name="index-quotation-marks-1134"></a><a name="index-LANGUAGE_0040r_007b_002c-environment-variable_007d-1135"></a>GNU gettext comes with a <samp><span class="file">Rules-quot</span></samp> file, containing rules for
  8249. building catalogs <samp><span class="file">en@quot.po</span></samp> and <samp><span class="file">en@boldquot.po</span></samp>. The
  8250. effect of <samp><span class="file">en@quot.po</span></samp> is that people who set their <code>LANGUAGE</code>
  8251. environment variable to &lsquo;<samp><span class="samp">en@quot</span></samp>&rsquo; will get messages with proper
  8252. looking symmetric Unicode quotation marks instead of abusing the ASCII
  8253. grave accent and the ASCII apostrophe for indicating quotations. To
  8254. enable this catalog, simply add <code>en@quot</code> to the <samp><span class="file">po/LINGUAS</span></samp>
  8255. file. The effect of <samp><span class="file">en@boldquot.po</span></samp> is that people who set
  8256. <code>LANGUAGE</code> to &lsquo;<samp><span class="samp">en@boldquot</span></samp>&rsquo; will get not only proper quotation
  8257. marks, but also the quoted text will be shown in a bold font on terminals
  8258. and consoles. This catalog is useful only for command-line programs, not
  8259. GUI programs. To enable it, similarly add <code>en@boldquot</code> to the
  8260. <samp><span class="file">po/LINGUAS</span></samp> file.
  8261. <p>Similarly, you can create rules for building message catalogs for the
  8262. <samp><span class="file">sr@latin</span></samp> locale &ndash; Serbian written with the Latin alphabet &ndash;
  8263. from those for the <samp><span class="file">sr</span></samp> locale &ndash; Serbian written with Cyrillic
  8264. letters. See <a href="#msgfilter-Invocation">msgfilter Invocation</a>.
  8265. <div class="node">
  8266. <a name="configure.ac"></a>
  8267. <a name="configure_002eac"></a>
  8268. <p><hr>
  8269. Next:&nbsp;<a rel="next" accesskey="n" href="#config_002eguess">config.guess</a>,
  8270. Previous:&nbsp;<a rel="previous" accesskey="p" href="#po_002fRules_002d_002a">po/Rules-*</a>,
  8271. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8272. </div>
  8273. <h4 class="subsection">13.4.5 <samp><span class="file">configure.ac</span></samp> at top level</h4>
  8274. <p><samp><span class="file">configure.ac</span></samp> or <samp><span class="file">configure.in</span></samp> - this is the source from which
  8275. <code>autoconf</code> generates the <samp><span class="file">configure</span></samp> script.
  8276. <ol type=1 start=1>
  8277. <li>Declare the package and version.
  8278. <a name="index-package-and-version-declaration-in-_0040file_007bconfigure_002eac_007d-1136"></a>
  8279. This is done by a set of lines like these:
  8280. <pre class="example"> PACKAGE=gettext
  8281. VERSION=0.18
  8282. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  8283. AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
  8284. AC_SUBST(PACKAGE)
  8285. AC_SUBST(VERSION)
  8286. </pre>
  8287. <p class="noindent">or, if you are using GNU <code>automake</code>, by a line like this:
  8288. <pre class="example"> AM_INIT_AUTOMAKE(gettext, 0.18)
  8289. </pre>
  8290. <p class="noindent">Of course, you replace &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; with the name of your package,
  8291. and &lsquo;<samp><span class="samp">0.18</span></samp>&rsquo; by its version numbers, exactly as they
  8292. should appear in the packaged <code>tar</code> file name of your distribution
  8293. (<samp><span class="file">gettext-0.18.tar.gz</span></samp>, here).
  8294. <li>Check for internationalization support.
  8295. <p>Here is the main <code>m4</code> macro for triggering internationalization
  8296. support. Just add this line to <samp><span class="file">configure.ac</span></samp>:
  8297. <pre class="example"> AM_GNU_GETTEXT
  8298. </pre>
  8299. <p class="noindent">This call is purposely simple, even if it generates a lot of configure
  8300. time checking and actions.
  8301. <p>If you have suppressed the <samp><span class="file">intl/</span></samp> subdirectory by calling
  8302. <code>gettextize</code> without &lsquo;<samp><span class="samp">--intl</span></samp>&rsquo; option, this call should read
  8303. <pre class="example"> AM_GNU_GETTEXT([external])
  8304. </pre>
  8305. <li>Have output files created.
  8306. <p>The <code>AC_OUTPUT</code> directive, at the end of your <samp><span class="file">configure.ac</span></samp>
  8307. file, needs to be modified in two ways:
  8308. <pre class="example"> AC_OUTPUT([<var>existing configuration files</var> intl/Makefile po/Makefile.in],
  8309. [<var>existing additional actions</var>])
  8310. </pre>
  8311. <p>The modification to the first argument to <code>AC_OUTPUT</code> asks
  8312. for substitution in the <samp><span class="file">intl/</span></samp> and <samp><span class="file">po/</span></samp> directories.
  8313. Note the &lsquo;<samp><span class="samp">.in</span></samp>&rsquo; suffix used for <samp><span class="file">po/</span></samp> only. This is because
  8314. the distributed file is really <samp><span class="file">po/Makefile.in.in</span></samp>.
  8315. <p>If you have suppressed the <samp><span class="file">intl/</span></samp> subdirectory by calling
  8316. <code>gettextize</code> without &lsquo;<samp><span class="samp">--intl</span></samp>&rsquo; option, then you don't need to
  8317. add <code>intl/Makefile</code> to the <code>AC_OUTPUT</code> line.
  8318. </ol>
  8319. <p>If, after doing the recommended modifications, a command like
  8320. &lsquo;<samp><span class="samp">aclocal -I m4</span></samp>&rsquo; or &lsquo;<samp><span class="samp">autoconf</span></samp>&rsquo; or &lsquo;<samp><span class="samp">autoreconf</span></samp>&rsquo; fails with
  8321. a trace similar to this:
  8322. <pre class="smallexample"> configure.ac:44: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE
  8323. ../../lib/autoconf/specific.m4:335: AC_GNU_SOURCE is expanded from...
  8324. m4/lock.m4:224: gl_LOCK is expanded from...
  8325. m4/gettext.m4:571: gt_INTL_SUBDIR_CORE is expanded from...
  8326. m4/gettext.m4:472: AM_INTL_SUBDIR is expanded from...
  8327. m4/gettext.m4:347: AM_GNU_GETTEXT is expanded from...
  8328. configure.ac:44: the top level
  8329. configure.ac:44: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
  8330. </pre>
  8331. <p class="noindent">you need to add an explicit invocation of &lsquo;<samp><span class="samp">AC_GNU_SOURCE</span></samp>&rsquo; in the
  8332. <samp><span class="file">configure.ac</span></samp> file - after &lsquo;<samp><span class="samp">AC_PROG_CC</span></samp>&rsquo; but before
  8333. &lsquo;<samp><span class="samp">AM_GNU_GETTEXT</span></samp>&rsquo;, most likely very close to the &lsquo;<samp><span class="samp">AC_PROG_CC</span></samp>&rsquo;
  8334. invocation. This is necessary because of ordering restrictions imposed
  8335. by GNU autoconf.
  8336. <div class="node">
  8337. <a name="config.guess"></a>
  8338. <a name="config_002eguess"></a>
  8339. <p><hr>
  8340. Next:&nbsp;<a rel="next" accesskey="n" href="#mkinstalldirs">mkinstalldirs</a>,
  8341. Previous:&nbsp;<a rel="previous" accesskey="p" href="#configure_002eac">configure.ac</a>,
  8342. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8343. </div>
  8344. <h4 class="subsection">13.4.6 <samp><span class="file">config.guess</span></samp>, <samp><span class="file">config.sub</span></samp> at top level</h4>
  8345. <p>If you haven't suppressed the <samp><span class="file">intl/</span></samp> subdirectory,
  8346. you need to add the GNU <samp><span class="file">config.guess</span></samp> and <samp><span class="file">config.sub</span></samp> files
  8347. to your distribution. They are needed because the <samp><span class="file">intl/</span></samp> directory
  8348. has platform dependent support for determining the locale's character
  8349. encoding and therefore needs to identify the platform.
  8350. <p>You can obtain the newest version of <samp><span class="file">config.guess</span></samp> and
  8351. <samp><span class="file">config.sub</span></samp> from the CVS of the &lsquo;<samp><span class="samp">config</span></samp>&rsquo; project at
  8352. <samp><span class="file">http://savannah.gnu.org/</span></samp>. The commands to fetch them are
  8353. <pre class="smallexample"> $ wget 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess'
  8354. $ wget 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub'
  8355. </pre>
  8356. <p class="noindent">Less recent versions are also contained in the GNU <code>automake</code> and
  8357. GNU <code>libtool</code> packages.
  8358. <p>Normally, <samp><span class="file">config.guess</span></samp> and <samp><span class="file">config.sub</span></samp> are put at the
  8359. top level of a distribution. But it is also possible to put them in a
  8360. subdirectory, altogether with other configuration support files like
  8361. <samp><span class="file">install-sh</span></samp>, <samp><span class="file">ltconfig</span></samp>, <samp><span class="file">ltmain.sh</span></samp> or <samp><span class="file">missing</span></samp>.
  8362. All you need to do, other than moving the files, is to add the following line
  8363. to your <samp><span class="file">configure.ac</span></samp>.
  8364. <pre class="example"> AC_CONFIG_AUX_DIR([<var>subdir</var>])
  8365. </pre>
  8366. <div class="node">
  8367. <a name="mkinstalldirs"></a>
  8368. <p><hr>
  8369. Next:&nbsp;<a rel="next" accesskey="n" href="#aclocal">aclocal</a>,
  8370. Previous:&nbsp;<a rel="previous" accesskey="p" href="#config_002eguess">config.guess</a>,
  8371. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8372. </div>
  8373. <h4 class="subsection">13.4.7 <samp><span class="file">mkinstalldirs</span></samp> at top level</h4>
  8374. <p><a name="index-g_t_0040file_007bmkinstalldirs_007d-file-1137"></a>
  8375. With earlier versions of GNU gettext, you needed to add the GNU
  8376. <samp><span class="file">mkinstalldirs</span></samp> script to your distribution. This is not needed any
  8377. more. You can remove it if you not also using an automake version older than
  8378. automake 1.9.
  8379. <div class="node">
  8380. <a name="aclocal"></a>
  8381. <p><hr>
  8382. Next:&nbsp;<a rel="next" accesskey="n" href="#acconfig">acconfig</a>,
  8383. Previous:&nbsp;<a rel="previous" accesskey="p" href="#mkinstalldirs">mkinstalldirs</a>,
  8384. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8385. </div>
  8386. <h4 class="subsection">13.4.8 <samp><span class="file">aclocal.m4</span></samp> at top level</h4>
  8387. <p><a name="index-g_t_0040file_007baclocal_002em4_007d-file-1138"></a>
  8388. If you do not have an <samp><span class="file">aclocal.m4</span></samp> file in your distribution,
  8389. the simplest is to concatenate the files <samp><span class="file">codeset.m4</span></samp>, <samp><span class="file">fcntl-o.m4</span></samp>,
  8390. <samp><span class="file">gettext.m4</span></samp>, <samp><span class="file">glibc2.m4</span></samp>, <samp><span class="file">glibc21.m4</span></samp>, <samp><span class="file">iconv.m4</span></samp>,
  8391. <samp><span class="file">intdiv0.m4</span></samp>, <samp><span class="file">intl.m4</span></samp>, <samp><span class="file">intldir.m4</span></samp>, <samp><span class="file">intlmacosx.m4</span></samp>,
  8392. <samp><span class="file">intmax.m4</span></samp>, <samp><span class="file">inttypes_h.m4</span></samp>, <samp><span class="file">inttypes-pri.m4</span></samp>,
  8393. <samp><span class="file">lcmessage.m4</span></samp>, <samp><span class="file">lib-ld.m4</span></samp>, <samp><span class="file">lib-link.m4</span></samp>,
  8394. <samp><span class="file">lib-prefix.m4</span></samp>, <samp><span class="file">lock.m4</span></samp>, <samp><span class="file">longlong.m4</span></samp>, <samp><span class="file">nls.m4</span></samp>,
  8395. <samp><span class="file">po.m4</span></samp>, <samp><span class="file">printf-posix.m4</span></samp>, <samp><span class="file">progtest.m4</span></samp>, <samp><span class="file">size_max.m4</span></samp>,
  8396. <samp><span class="file">stdint_h.m4</span></samp>, <samp><span class="file">threadlib.m4</span></samp>, <samp><span class="file">uintmax_t.m4</span></samp>,
  8397. <samp><span class="file">visibility.m4</span></samp>, <samp><span class="file">wchar_t.m4</span></samp>, <samp><span class="file">wint_t.m4</span></samp>, <samp><span class="file">xsize.m4</span></samp>
  8398. from GNU <code>gettext</code>'s
  8399. <samp><span class="file">m4/</span></samp> directory into a single file. If you have suppressed the
  8400. <samp><span class="file">intl/</span></samp> directory, only <samp><span class="file">gettext.m4</span></samp>, <samp><span class="file">iconv.m4</span></samp>,
  8401. <samp><span class="file">lib-ld.m4</span></samp>, <samp><span class="file">lib-link.m4</span></samp>, <samp><span class="file">lib-prefix.m4</span></samp>,
  8402. <samp><span class="file">nls.m4</span></samp>, <samp><span class="file">po.m4</span></samp>, <samp><span class="file">progtest.m4</span></samp> need to be concatenated.
  8403. <p>If you are not using GNU <code>automake</code> 1.8 or newer, you will need to
  8404. add a file <samp><span class="file">mkdirp.m4</span></samp> from a newer automake distribution to the
  8405. list of files above.
  8406. <p>If you already have an <samp><span class="file">aclocal.m4</span></samp> file, then you will have
  8407. to merge the said macro files into your <samp><span class="file">aclocal.m4</span></samp>. Note that if
  8408. you are upgrading from a previous release of GNU <code>gettext</code>, you
  8409. should most probably <em>replace</em> the macros (<code>AM_GNU_GETTEXT</code>,
  8410. etc.), as they usually
  8411. change a little from one release of GNU <code>gettext</code> to the next.
  8412. Their contents may vary as we get more experience with strange systems
  8413. out there.
  8414. <p>If you are using GNU <code>automake</code> 1.5 or newer, it is enough to put
  8415. these macro files into a subdirectory named <samp><span class="file">m4/</span></samp> and add the line
  8416. <pre class="example"> ACLOCAL_AMFLAGS = -I m4
  8417. </pre>
  8418. <p class="noindent">to your top level <samp><span class="file">Makefile.am</span></samp>.
  8419. <p>These macros check for the internationalization support functions
  8420. and related informations. Hopefully, once stabilized, these macros
  8421. might be integrated in the standard Autoconf set, because this
  8422. piece of <code>m4</code> code will be the same for all projects using GNU
  8423. <code>gettext</code>.
  8424. <div class="node">
  8425. <a name="acconfig"></a>
  8426. <p><hr>
  8427. Next:&nbsp;<a rel="next" accesskey="n" href="#config_002eh_002ein">config.h.in</a>,
  8428. Previous:&nbsp;<a rel="previous" accesskey="p" href="#aclocal">aclocal</a>,
  8429. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8430. </div>
  8431. <h4 class="subsection">13.4.9 <samp><span class="file">acconfig.h</span></samp> at top level</h4>
  8432. <p><a name="index-g_t_0040file_007bacconfig_002eh_007d-file-1139"></a>
  8433. Earlier GNU <code>gettext</code> releases required to put definitions for
  8434. <code>ENABLE_NLS</code>, <code>HAVE_GETTEXT</code> and <code>HAVE_LC_MESSAGES</code>,
  8435. <code>HAVE_STPCPY</code>, <code>PACKAGE</code> and <code>VERSION</code> into an
  8436. <samp><span class="file">acconfig.h</span></samp> file. This is not needed any more; you can remove
  8437. them from your <samp><span class="file">acconfig.h</span></samp> file unless your package uses them
  8438. independently from the <samp><span class="file">intl/</span></samp> directory.
  8439. <div class="node">
  8440. <a name="config.h.in"></a>
  8441. <a name="config_002eh_002ein"></a>
  8442. <p><hr>
  8443. Next:&nbsp;<a rel="next" accesskey="n" href="#Makefile">Makefile</a>,
  8444. Previous:&nbsp;<a rel="previous" accesskey="p" href="#acconfig">acconfig</a>,
  8445. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8446. </div>
  8447. <h4 class="subsection">13.4.10 <samp><span class="file">config.h.in</span></samp> at top level</h4>
  8448. <p><a name="index-g_t_0040file_007bconfig_002eh_002ein_007d-file-1140"></a>
  8449. The include file template that holds the C macros to be defined by
  8450. <code>configure</code> is usually called <samp><span class="file">config.h.in</span></samp> and may be
  8451. maintained either manually or automatically.
  8452. <p>If <code>gettextize</code> has created an <samp><span class="file">intl/</span></samp> directory, this file
  8453. must be called <samp><span class="file">config.h.in</span></samp> and must be at the top level. If,
  8454. however, you have suppressed the <samp><span class="file">intl/</span></samp> directory by calling
  8455. <code>gettextize</code> without &lsquo;<samp><span class="samp">--intl</span></samp>&rsquo; option, then you can choose the
  8456. name of this file and its location freely.
  8457. <p>If it is maintained automatically, by use of the &lsquo;<samp><span class="samp">autoheader</span></samp>&rsquo;
  8458. program, you need to do nothing about it. This is the case in particular
  8459. if you are using GNU <code>automake</code>.
  8460. <p>If it is maintained manually, and if <code>gettextize</code> has created an
  8461. <samp><span class="file">intl/</span></samp> directory, you should switch to using &lsquo;<samp><span class="samp">autoheader</span></samp>&rsquo;.
  8462. The list of C macros to be added for the sake of the <samp><span class="file">intl/</span></samp>
  8463. directory is just too long to be maintained manually; it also changes
  8464. between different versions of GNU <code>gettext</code>.
  8465. <p>If it is maintained manually, and if on the other hand you have
  8466. suppressed the <samp><span class="file">intl/</span></samp> directory by calling <code>gettextize</code>
  8467. without &lsquo;<samp><span class="samp">--intl</span></samp>&rsquo; option, then you can get away by adding the
  8468. following lines to <samp><span class="file">config.h.in</span></samp>:
  8469. <pre class="example"> /* Define to 1 if translation of program messages to the user's
  8470. native language is requested. */
  8471. #undef ENABLE_NLS
  8472. </pre>
  8473. <div class="node">
  8474. <a name="Makefile"></a>
  8475. <p><hr>
  8476. Next:&nbsp;<a rel="next" accesskey="n" href="#src_002fMakefile">src/Makefile</a>,
  8477. Previous:&nbsp;<a rel="previous" accesskey="p" href="#config_002eh_002ein">config.h.in</a>,
  8478. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8479. </div>
  8480. <h4 class="subsection">13.4.11 <samp><span class="file">Makefile.in</span></samp> at top level</h4>
  8481. <p>Here are a few modifications you need to make to your main, top-level
  8482. <samp><span class="file">Makefile.in</span></samp> file.
  8483. <ol type=1 start=1>
  8484. <li>Add the following lines near the beginning of your <samp><span class="file">Makefile.in</span></samp>,
  8485. so the &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal will work properly (as explained further down):
  8486. <pre class="example"> PACKAGE = @PACKAGE@
  8487. VERSION = @VERSION@
  8488. </pre>
  8489. <li>Add file <samp><span class="file">ABOUT-NLS</span></samp> to the <code>DISTFILES</code> definition, so the file gets
  8490. distributed.
  8491. <li>Wherever you process subdirectories in your <samp><span class="file">Makefile.in</span></samp>, be sure
  8492. you also process the subdirectories &lsquo;<samp><span class="samp">intl</span></samp>&rsquo; and &lsquo;<samp><span class="samp">po</span></samp>&rsquo;. Special
  8493. rules in the <samp><span class="file">Makefiles</span></samp> take care for the case where no
  8494. internationalization is wanted.
  8495. <p>If you are using Makefiles, either generated by automake, or hand-written
  8496. so they carefully follow the GNU coding standards, the effected goals for
  8497. which the new subdirectories must be handled include &lsquo;<samp><span class="samp">installdirs</span></samp>&rsquo;,
  8498. &lsquo;<samp><span class="samp">install</span></samp>&rsquo;, &lsquo;<samp><span class="samp">uninstall</span></samp>&rsquo;, &lsquo;<samp><span class="samp">clean</span></samp>&rsquo;, &lsquo;<samp><span class="samp">distclean</span></samp>&rsquo;.
  8499. <p>Here is an example of a canonical order of processing. In this
  8500. example, we also define <code>SUBDIRS</code> in <code>Makefile.in</code> for it
  8501. to be further used in the &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal.
  8502. <pre class="example"> SUBDIRS = doc intl lib src po
  8503. </pre>
  8504. <p>Note that you must arrange for &lsquo;<samp><span class="samp">make</span></samp>&rsquo; to descend into the
  8505. <code>intl</code> directory before descending into other directories containing
  8506. code which make use of the <code>libintl.h</code> header file. For this
  8507. reason, here we mention <code>intl</code> before <code>lib</code> and <code>src</code>.
  8508. <li>A delicate point is the &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal, as both
  8509. <samp><span class="file">intl/Makefile</span></samp> and <samp><span class="file">po/Makefile</span></samp> will later assume that the
  8510. proper directory has been set up from the main <samp><span class="file">Makefile</span></samp>. Here is
  8511. an example at what the &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal might look like:
  8512. <pre class="example"> distdir = $(PACKAGE)-$(VERSION)
  8513. dist: Makefile
  8514. rm -fr $(distdir)
  8515. mkdir $(distdir)
  8516. chmod 777 $(distdir)
  8517. for file in $(DISTFILES); do \
  8518. ln $$file $(distdir) 2&gt;/dev/null || cp -p $$file $(distdir); \
  8519. done
  8520. for subdir in $(SUBDIRS); do \
  8521. mkdir $(distdir)/$$subdir || exit 1; \
  8522. chmod 777 $(distdir)/$$subdir; \
  8523. (cd $$subdir &amp;&amp; $(MAKE) $@) || exit 1; \
  8524. done
  8525. tar chozf $(distdir).tar.gz $(distdir)
  8526. rm -fr $(distdir)
  8527. </pre>
  8528. </ol>
  8529. <p>Note that if you are using GNU <code>automake</code>, <samp><span class="file">Makefile.in</span></samp> is
  8530. automatically generated from <samp><span class="file">Makefile.am</span></samp>, and all needed changes
  8531. to <samp><span class="file">Makefile.am</span></samp> are already made by running &lsquo;<samp><span class="samp">gettextize</span></samp>&rsquo;.
  8532. <div class="node">
  8533. <a name="src%2fMakefile"></a>
  8534. <a name="src_002fMakefile"></a>
  8535. <p><hr>
  8536. Next:&nbsp;<a rel="next" accesskey="n" href="#lib_002fgettext_002eh">lib/gettext.h</a>,
  8537. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Makefile">Makefile</a>,
  8538. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8539. </div>
  8540. <h4 class="subsection">13.4.12 <samp><span class="file">Makefile.in</span></samp> in <samp><span class="file">src/</span></samp></h4>
  8541. <p>Some of the modifications made in the main <samp><span class="file">Makefile.in</span></samp> will
  8542. also be needed in the <samp><span class="file">Makefile.in</span></samp> from your package sources,
  8543. which we assume here to be in the <samp><span class="file">src/</span></samp> subdirectory. Here are
  8544. all the modifications needed in <samp><span class="file">src/Makefile.in</span></samp>:
  8545. <ol type=1 start=1>
  8546. <li>In view of the &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal, you should have these lines near the
  8547. beginning of <samp><span class="file">src/Makefile.in</span></samp>:
  8548. <pre class="example"> PACKAGE = @PACKAGE@
  8549. VERSION = @VERSION@
  8550. </pre>
  8551. <li>If not done already, you should guarantee that <code>top_srcdir</code>
  8552. gets defined. This will serve for <code>cpp</code> include files. Just add
  8553. the line:
  8554. <pre class="example"> top_srcdir = @top_srcdir@
  8555. </pre>
  8556. <li>You might also want to define <code>subdir</code> as &lsquo;<samp><span class="samp">src</span></samp>&rsquo;, later
  8557. allowing for almost uniform &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goals in all your
  8558. <samp><span class="file">Makefile.in</span></samp>. At list, the &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal below assume that
  8559. you used:
  8560. <pre class="example"> subdir = src
  8561. </pre>
  8562. <li>The <code>main</code> function of your program will normally call
  8563. <code>bindtextdomain</code> (see see <a href="#Triggering">Triggering</a>), like this:
  8564. <pre class="example"> bindtextdomain (<var>PACKAGE</var>, LOCALEDIR);
  8565. textdomain (<var>PACKAGE</var>);
  8566. </pre>
  8567. <p>To make LOCALEDIR known to the program, add the following lines to
  8568. <samp><span class="file">Makefile.in</span></samp> if you are using Autoconf version 2.60 or newer:
  8569. <pre class="example"> datadir = @datadir@
  8570. datarootdir= @datarootdir@
  8571. localedir = @localedir@
  8572. DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
  8573. </pre>
  8574. <p>or these lines if your version of Autoconf is older than 2.60:
  8575. <pre class="example"> datadir = @datadir@
  8576. localedir = $(datadir)/locale
  8577. DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
  8578. </pre>
  8579. <p>Note that <code>@datadir@</code> defaults to &lsquo;<samp><span class="samp">$(prefix)/share</span></samp>&rsquo;, thus
  8580. <code>$(localedir)</code> defaults to &lsquo;<samp><span class="samp">$(prefix)/share/locale</span></samp>&rsquo;.
  8581. <li>You should ensure that the final linking will use <code>@LIBINTL@</code> or
  8582. <code>@LTLIBINTL@</code> as a library. <code>@LIBINTL@</code> is for use without
  8583. <code>libtool</code>, <code>@LTLIBINTL@</code> is for use with <code>libtool</code>. An
  8584. easy way to achieve this is to manage that it gets into <code>LIBS</code>, like
  8585. this:
  8586. <pre class="example"> LIBS = @LIBINTL@ @LIBS@
  8587. </pre>
  8588. <p>In most packages internationalized with GNU <code>gettext</code>, one will
  8589. find a directory <samp><span class="file">lib/</span></samp> in which a library containing some helper
  8590. functions will be build. (You need at least the few functions which the
  8591. GNU <code>gettext</code> Library itself needs.) However some of the functions
  8592. in the <samp><span class="file">lib/</span></samp> also give messages to the user which of course should be
  8593. translated, too. Taking care of this, the support library (say
  8594. <samp><span class="file">libsupport.a</span></samp>) should be placed before <code>@LIBINTL@</code> and
  8595. <code>@LIBS@</code> in the above example. So one has to write this:
  8596. <pre class="example"> LIBS = ../lib/libsupport.a @LIBINTL@ @LIBS@
  8597. </pre>
  8598. <li>You should also ensure that directory <samp><span class="file">intl/</span></samp> will be searched for
  8599. C preprocessor include files in all circumstances. So, you have to
  8600. manage so both &lsquo;<samp><span class="samp">-I../intl</span></samp>&rsquo; and &lsquo;<samp><span class="samp">-I$(top_srcdir)/intl</span></samp>&rsquo; will
  8601. be given to the C compiler.
  8602. <li>Your &lsquo;<samp><span class="samp">dist:</span></samp>&rsquo; goal has to conform with others. Here is a
  8603. reasonable definition for it:
  8604. <pre class="example"> distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
  8605. dist: Makefile $(DISTFILES)
  8606. for file in $(DISTFILES); do \
  8607. ln $$file $(distdir) 2&gt;/dev/null || cp -p $$file $(distdir) || exit 1; \
  8608. done
  8609. </pre>
  8610. </ol>
  8611. <p>Note that if you are using GNU <code>automake</code>, <samp><span class="file">Makefile.in</span></samp> is
  8612. automatically generated from <samp><span class="file">Makefile.am</span></samp>, and the first three
  8613. changes and the last change are not necessary. The remaining needed
  8614. <samp><span class="file">Makefile.am</span></samp> modifications are the following:
  8615. <ol type=1 start=1>
  8616. <li>To make LOCALEDIR known to the program, add the following to
  8617. <samp><span class="file">Makefile.am</span></samp>:
  8618. <pre class="example"> &lt;module&gt;_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
  8619. </pre>
  8620. <p class="noindent">for each specific module or compilation unit, or
  8621. <pre class="example"> AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
  8622. </pre>
  8623. <p>for all modules and compilation units together. Furthermore, if you are
  8624. using an Autoconf version older then 2.60, add this line to define
  8625. &lsquo;<samp><span class="samp">localedir</span></samp>&rsquo;:
  8626. <pre class="example"> localedir = $(datadir)/locale
  8627. </pre>
  8628. <li>To ensure that the final linking will use <code>@LIBINTL@</code> or
  8629. <code>@LTLIBINTL@</code> as a library, add the following to
  8630. <samp><span class="file">Makefile.am</span></samp>:
  8631. <pre class="example"> &lt;program&gt;_LDADD = @LIBINTL@
  8632. </pre>
  8633. <p class="noindent">for each specific program, or
  8634. <pre class="example"> LDADD = @LIBINTL@
  8635. </pre>
  8636. <p>for all programs together. Remember that when you use <code>libtool</code>
  8637. to link a program, you need to use @LTLIBINTL@ instead of @LIBINTL@
  8638. for that program.
  8639. <li>If you have an <samp><span class="file">intl/</span></samp> directory, whose contents is created by
  8640. <code>gettextize</code>, then to ensure that it will be searched for
  8641. C preprocessor include files in all circumstances, add something like
  8642. this to <samp><span class="file">Makefile.am</span></samp>:
  8643. <pre class="example"> AM_CPPFLAGS = -I../intl -I$(top_srcdir)/intl
  8644. </pre>
  8645. </ol>
  8646. <div class="node">
  8647. <a name="lib%2fgettext.h"></a>
  8648. <a name="lib_002fgettext_002eh"></a>
  8649. <p><hr>
  8650. Previous:&nbsp;<a rel="previous" accesskey="p" href="#src_002fMakefile">src/Makefile</a>,
  8651. Up:&nbsp;<a rel="up" accesskey="u" href="#Adjusting-Files">Adjusting Files</a>
  8652. </div>
  8653. <h4 class="subsection">13.4.13 <samp><span class="file">gettext.h</span></samp> in <samp><span class="file">lib/</span></samp></h4>
  8654. <p><a name="index-g_t_0040file_007bgettext_002eh_007d-file-1141"></a><a name="index-turning-off-NLS-support-1142"></a><a name="index-disabling-NLS-1143"></a>
  8655. Internationalization of packages, as provided by GNU <code>gettext</code>, is
  8656. optional. It can be turned off in two situations:
  8657. <ul>
  8658. <li>When the installer has specified &lsquo;<samp><span class="samp">./configure --disable-nls</span></samp>&rsquo;. This
  8659. can be useful when small binaries are more important than features, for
  8660. example when building utilities for boot diskettes. It can also be useful
  8661. in order to get some specific C compiler warnings about code quality with
  8662. some older versions of GCC (older than 3.0).
  8663. <li>When the package does not include the <code>intl/</code> subdirectory, and the
  8664. libintl.h header (with its associated libintl library, if any) is not
  8665. already installed on the system, it is preferable that the package builds
  8666. without internationalization support, rather than to give a compilation
  8667. error.
  8668. </ul>
  8669. <p>A C preprocessor macro can be used to detect these two cases. Usually,
  8670. when <code>libintl.h</code> was found and not explicitly disabled, the
  8671. <code>ENABLE_NLS</code> macro will be defined to 1 in the autoconf generated
  8672. configuration file (usually called <samp><span class="file">config.h</span></samp>). In the two negative
  8673. situations, however, this macro will not be defined, thus it will evaluate
  8674. to 0 in C preprocessor expressions.
  8675. <p><a name="index-include-file-_0040file_007blibintl_002eh_007d-1144"></a><samp><span class="file">gettext.h</span></samp> is a convenience header file for conditional use of
  8676. <samp><span class="file">&lt;libintl.h&gt;</span></samp>, depending on the <code>ENABLE_NLS</code> macro. If
  8677. <code>ENABLE_NLS</code> is set, it includes <samp><span class="file">&lt;libintl.h&gt;</span></samp>; otherwise it
  8678. defines no-op substitutes for the libintl.h functions. We recommend
  8679. the use of <code>"gettext.h"</code> over direct use of <samp><span class="file">&lt;libintl.h&gt;</span></samp>,
  8680. so that portability to older systems is guaranteed and installers can
  8681. turn off internationalization if they want to. In the C code, you will
  8682. then write
  8683. <pre class="example"> #include "gettext.h"
  8684. </pre>
  8685. <p class="noindent">instead of
  8686. <pre class="example"> #include &lt;libintl.h&gt;
  8687. </pre>
  8688. <p>The location of <code>gettext.h</code> is usually in a directory containing
  8689. auxiliary include files. In many GNU packages, there is a directory
  8690. <samp><span class="file">lib/</span></samp> containing helper functions; <samp><span class="file">gettext.h</span></samp> fits there.
  8691. In other packages, it can go into the <samp><span class="file">src</span></samp> directory.
  8692. <p>Do not install the <code>gettext.h</code> file in public locations. Every
  8693. package that needs it should contain a copy of it on its own.
  8694. <div class="node">
  8695. <a name="autoconf-macros"></a>
  8696. <p><hr>
  8697. Next:&nbsp;<a rel="next" accesskey="n" href="#CVS-Issues">CVS Issues</a>,
  8698. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Adjusting-Files">Adjusting Files</a>,
  8699. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  8700. </div>
  8701. <h3 class="section">13.5 Autoconf macros for use in <samp><span class="file">configure.ac</span></samp></h3>
  8702. <p><a name="index-autoconf-macros-for-_0040code_007bgettext_007d-1145"></a>
  8703. GNU <code>gettext</code> installs macros for use in a package's
  8704. <samp><span class="file">configure.ac</span></samp> or <samp><span class="file">configure.in</span></samp>.
  8705. See <a href="autoconf.html#Top">Introduction</a>.
  8706. The primary macro is, of course, <code>AM_GNU_GETTEXT</code>.
  8707. <ul class="menu">
  8708. <li><a accesskey="1" href="#AM_005fGNU_005fGETTEXT">AM_GNU_GETTEXT</a>: AM_GNU_GETTEXT in <samp><span class="file">gettext.m4</span></samp>
  8709. <li><a accesskey="2" href="#AM_005fGNU_005fGETTEXT_005fVERSION">AM_GNU_GETTEXT_VERSION</a>: AM_GNU_GETTEXT_VERSION in <samp><span class="file">gettext.m4</span></samp>
  8710. <li><a accesskey="3" href="#AM_005fGNU_005fGETTEXT_005fNEED">AM_GNU_GETTEXT_NEED</a>: AM_GNU_GETTEXT_NEED in <samp><span class="file">gettext.m4</span></samp>
  8711. <li><a accesskey="4" href="#AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR">AM_GNU_GETTEXT_INTL_SUBDIR</a>: AM_GNU_GETTEXT_INTL_SUBDIR in <samp><span class="file">intldir.m4</span></samp>
  8712. <li><a accesskey="5" href="#AM_005fPO_005fSUBDIRS">AM_PO_SUBDIRS</a>: AM_PO_SUBDIRS in <samp><span class="file">po.m4</span></samp>
  8713. <li><a accesskey="6" href="#AM_005fXGETTEXT_005fOPTION">AM_XGETTEXT_OPTION</a>: AM_XGETTEXT_OPTION in <samp><span class="file">po.m4</span></samp>
  8714. <li><a accesskey="7" href="#AM_005fICONV">AM_ICONV</a>: AM_ICONV in <samp><span class="file">iconv.m4</span></samp>
  8715. </ul>
  8716. <div class="node">
  8717. <a name="AM_GNU_GETTEXT"></a>
  8718. <a name="AM_005fGNU_005fGETTEXT"></a>
  8719. <p><hr>
  8720. Next:&nbsp;<a rel="next" accesskey="n" href="#AM_005fGNU_005fGETTEXT_005fVERSION">AM_GNU_GETTEXT_VERSION</a>,
  8721. Previous:&nbsp;<a rel="previous" accesskey="p" href="#autoconf-macros">autoconf macros</a>,
  8722. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8723. </div>
  8724. <h4 class="subsection">13.5.1 AM_GNU_GETTEXT in <samp><span class="file">gettext.m4</span></samp></h4>
  8725. <p><a name="index-AM_005fGNU_005fGETTEXT-1146"></a>The <code>AM_GNU_GETTEXT</code> macro tests for the presence of the GNU gettext
  8726. function family in either the C library or a separate <code>libintl</code>
  8727. library (shared or static libraries are both supported) or in the package's
  8728. <samp><span class="file">intl/</span></samp> directory. It also invokes <code>AM_PO_SUBDIRS</code>, thus preparing
  8729. the <samp><span class="file">po/</span></samp> directories of the package for building.
  8730. <p><code>AM_GNU_GETTEXT</code> accepts up to three optional arguments. The general
  8731. syntax is
  8732. <pre class="example"> AM_GNU_GETTEXT([<var>intlsymbol</var>], [<var>needsymbol</var>], [<var>intldir</var>])
  8733. </pre>
  8734. <!-- We don't document @var{intlsymbol} = @samp{use-libtool} here, because -->
  8735. <!-- it is of no use for packages other than GNU gettext itself. (Such packages -->
  8736. <!-- are not allowed to install the shared libintl. But if they use libtool, -->
  8737. <!-- then it is in order to install shared libraries that depend on libintl.) -->
  8738. <p><var>intlsymbol</var> can be &lsquo;<samp><span class="samp">external</span></samp>&rsquo; or &lsquo;<samp><span class="samp">no-libtool</span></samp>&rsquo;. The default
  8739. (if it is not specified or empty) is &lsquo;<samp><span class="samp">no-libtool</span></samp>&rsquo;. <var>intlsymbol</var>
  8740. should be &lsquo;<samp><span class="samp">external</span></samp>&rsquo; for packages with no <samp><span class="file">intl/</span></samp> directory.
  8741. For packages with an <samp><span class="file">intl/</span></samp> directory, you can either use an
  8742. <var>intlsymbol</var> equal to &lsquo;<samp><span class="samp">no-libtool</span></samp>&rsquo;, or you can use &lsquo;<samp><span class="samp">external</span></samp>&rsquo;
  8743. and override by using the macro <code>AM_GNU_GETTEXT_INTL_SUBDIR</code> elsewhere.
  8744. The two ways to specify the existence of an <samp><span class="file">intl/</span></samp> directory are
  8745. equivalent. At build time, a static library
  8746. <code>$(top_builddir)/intl/libintl.a</code> will then be created.
  8747. <p>If <var>needsymbol</var> is specified and is &lsquo;<samp><span class="samp">need-ngettext</span></samp>&rsquo;, then GNU
  8748. gettext implementations (in libc or libintl) without the <code>ngettext()</code>
  8749. function will be ignored. If <var>needsymbol</var> is specified and is
  8750. &lsquo;<samp><span class="samp">need-formatstring-macros</span></samp>&rsquo;, then GNU gettext implementations that don't
  8751. support the ISO C 99 <samp><span class="file">&lt;inttypes.h&gt;</span></samp> formatstring macros will be ignored.
  8752. Only one <var>needsymbol</var> can be specified. These requirements can also be
  8753. specified by using the macro <code>AM_GNU_GETTEXT_NEED</code> elsewhere. To specify
  8754. more than one requirement, just specify the strongest one among them, or
  8755. invoke the <code>AM_GNU_GETTEXT_NEED</code> macro several times. The hierarchy
  8756. among the various alternatives is as follows: &lsquo;<samp><span class="samp">need-formatstring-macros</span></samp>&rsquo;
  8757. implies &lsquo;<samp><span class="samp">need-ngettext</span></samp>&rsquo;.
  8758. <p><var>intldir</var> is used to find the intl libraries. If empty, the value
  8759. &lsquo;<samp><span class="samp">$(top_builddir)/intl/</span></samp>&rsquo; is used.
  8760. <p>The <code>AM_GNU_GETTEXT</code> macro determines whether GNU gettext is
  8761. available and should be used. If so, it sets the <code>USE_NLS</code> variable
  8762. to &lsquo;<samp><span class="samp">yes</span></samp>&rsquo;; it defines <code>ENABLE_NLS</code> to 1 in the autoconf
  8763. generated configuration file (usually called <samp><span class="file">config.h</span></samp>); it sets
  8764. the variables <code>LIBINTL</code> and <code>LTLIBINTL</code> to the linker options
  8765. for use in a Makefile (<code>LIBINTL</code> for use without libtool,
  8766. <code>LTLIBINTL</code> for use with libtool); it adds an &lsquo;<samp><span class="samp">-I</span></samp>&rsquo; option to
  8767. <code>CPPFLAGS</code> if necessary. In the negative case, it sets
  8768. <code>USE_NLS</code> to &lsquo;<samp><span class="samp">no</span></samp>&rsquo;; it sets <code>LIBINTL</code> and <code>LTLIBINTL</code>
  8769. to empty and doesn't change <code>CPPFLAGS</code>.
  8770. <p>The complexities that <code>AM_GNU_GETTEXT</code> deals with are the following:
  8771. <ul>
  8772. <li><a name="index-g_t_0040code_007blibintl_007d-library-1147"></a>Some operating systems have <code>gettext</code> in the C library, for example
  8773. glibc. Some have it in a separate library <code>libintl</code>. GNU <code>libintl</code>
  8774. might have been installed as part of the GNU <code>gettext</code> package.
  8775. <li>GNU <code>libintl</code>, if installed, is not necessarily already in the search
  8776. path (<code>CPPFLAGS</code> for the include file search path, <code>LDFLAGS</code> for
  8777. the library search path).
  8778. <li>Except for glibc, the operating system's native <code>gettext</code> cannot
  8779. exploit the GNU mo files, doesn't have the necessary locale dependency
  8780. features, and cannot convert messages from the catalog's text encoding
  8781. to the user's locale encoding.
  8782. <li>GNU <code>libintl</code>, if installed, is not necessarily already in the
  8783. run time library search path. To avoid the need for setting an environment
  8784. variable like <code>LD_LIBRARY_PATH</code>, the macro adds the appropriate
  8785. run time search path options to the <code>LIBINTL</code> and <code>LTLIBINTL</code>
  8786. variables. This works on most systems, but not on some operating systems
  8787. with limited shared library support, like SCO.
  8788. <li>GNU <code>libintl</code> relies on POSIX/XSI <code>iconv</code>. The macro checks for
  8789. linker options needed to use iconv and appends them to the <code>LIBINTL</code>
  8790. and <code>LTLIBINTL</code> variables.
  8791. </ul>
  8792. <div class="node">
  8793. <a name="AM_GNU_GETTEXT_VERSION"></a>
  8794. <a name="AM_005fGNU_005fGETTEXT_005fVERSION"></a>
  8795. <p><hr>
  8796. Next:&nbsp;<a rel="next" accesskey="n" href="#AM_005fGNU_005fGETTEXT_005fNEED">AM_GNU_GETTEXT_NEED</a>,
  8797. Previous:&nbsp;<a rel="previous" accesskey="p" href="#AM_005fGNU_005fGETTEXT">AM_GNU_GETTEXT</a>,
  8798. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8799. </div>
  8800. <h4 class="subsection">13.5.2 AM_GNU_GETTEXT_VERSION in <samp><span class="file">gettext.m4</span></samp></h4>
  8801. <p><a name="index-AM_005fGNU_005fGETTEXT_005fVERSION-1148"></a>The <code>AM_GNU_GETTEXT_VERSION</code> macro declares the version number of
  8802. the GNU gettext infrastructure that is used by the package.
  8803. <p>The use of this macro is optional; only the <code>autopoint</code> program makes
  8804. use of it (see <a href="#CVS-Issues">CVS Issues</a>).
  8805. <div class="node">
  8806. <a name="AM_GNU_GETTEXT_NEED"></a>
  8807. <a name="AM_005fGNU_005fGETTEXT_005fNEED"></a>
  8808. <p><hr>
  8809. Next:&nbsp;<a rel="next" accesskey="n" href="#AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR">AM_GNU_GETTEXT_INTL_SUBDIR</a>,
  8810. Previous:&nbsp;<a rel="previous" accesskey="p" href="#AM_005fGNU_005fGETTEXT_005fVERSION">AM_GNU_GETTEXT_VERSION</a>,
  8811. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8812. </div>
  8813. <h4 class="subsection">13.5.3 AM_GNU_GETTEXT_NEED in <samp><span class="file">gettext.m4</span></samp></h4>
  8814. <p><a name="index-AM_005fGNU_005fGETTEXT_005fNEED-1149"></a>The <code>AM_GNU_GETTEXT_NEED</code> macro declares a constraint regarding the
  8815. GNU gettext implementation. The syntax is
  8816. <pre class="example"> AM_GNU_GETTEXT_NEED([<var>needsymbol</var>])
  8817. </pre>
  8818. <p>If <var>needsymbol</var> is &lsquo;<samp><span class="samp">need-ngettext</span></samp>&rsquo;, then GNU gettext implementations
  8819. (in libc or libintl) without the <code>ngettext()</code> function will be ignored.
  8820. If <var>needsymbol</var> is &lsquo;<samp><span class="samp">need-formatstring-macros</span></samp>&rsquo;, then GNU gettext
  8821. implementations that don't support the ISO C 99 <samp><span class="file">&lt;inttypes.h&gt;</span></samp>
  8822. formatstring macros will be ignored.
  8823. <p>The optional second argument of <code>AM_GNU_GETTEXT</code> is also taken into
  8824. account.
  8825. <p>The <code>AM_GNU_GETTEXT_NEED</code> invocations can occur before or after
  8826. the <code>AM_GNU_GETTEXT</code> invocation; the order doesn't matter.
  8827. <div class="node">
  8828. <a name="AM_GNU_GETTEXT_INTL_SUBDIR"></a>
  8829. <a name="AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR"></a>
  8830. <p><hr>
  8831. Next:&nbsp;<a rel="next" accesskey="n" href="#AM_005fPO_005fSUBDIRS">AM_PO_SUBDIRS</a>,
  8832. Previous:&nbsp;<a rel="previous" accesskey="p" href="#AM_005fGNU_005fGETTEXT_005fNEED">AM_GNU_GETTEXT_NEED</a>,
  8833. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8834. </div>
  8835. <h4 class="subsection">13.5.4 AM_GNU_GETTEXT_INTL_SUBDIR in <samp><span class="file">intldir.m4</span></samp></h4>
  8836. <p><a name="index-AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR-1150"></a>The <code>AM_GNU_GETTEXT_INTL_SUBDIR</code> macro specifies that the
  8837. <code>AM_GNU_GETTEXT</code> macro, although invoked with the first argument
  8838. &lsquo;<samp><span class="samp">external</span></samp>&rsquo;, should also prepare for building the <samp><span class="file">intl/</span></samp>
  8839. subdirectory.
  8840. <p>The <code>AM_GNU_GETTEXT_INTL_SUBDIR</code> invocation can occur before or after
  8841. the <code>AM_GNU_GETTEXT</code> invocation; the order doesn't matter.
  8842. <p>The use of this macro requires GNU automake 1.10 or newer and
  8843. GNU autoconf 2.61 or newer.
  8844. <div class="node">
  8845. <a name="AM_PO_SUBDIRS"></a>
  8846. <a name="AM_005fPO_005fSUBDIRS"></a>
  8847. <p><hr>
  8848. Next:&nbsp;<a rel="next" accesskey="n" href="#AM_005fXGETTEXT_005fOPTION">AM_XGETTEXT_OPTION</a>,
  8849. Previous:&nbsp;<a rel="previous" accesskey="p" href="#AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR">AM_GNU_GETTEXT_INTL_SUBDIR</a>,
  8850. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8851. </div>
  8852. <h4 class="subsection">13.5.5 AM_PO_SUBDIRS in <samp><span class="file">po.m4</span></samp></h4>
  8853. <p><a name="index-AM_005fPO_005fSUBDIRS-1151"></a>The <code>AM_PO_SUBDIRS</code> macro prepares the <samp><span class="file">po/</span></samp> directories of the
  8854. package for building. This macro should be used in internationalized
  8855. programs written in other programming languages than C, C++, Objective C,
  8856. for example <code>sh</code>, <code>Python</code>, <code>Lisp</code>. See <a href="#Programming-Languages">Programming Languages</a> for a list of programming languages that support localization
  8857. through PO files.
  8858. <p>The <code>AM_PO_SUBDIRS</code> macro determines whether internationalization
  8859. should be used. If so, it sets the <code>USE_NLS</code> variable to &lsquo;<samp><span class="samp">yes</span></samp>&rsquo;,
  8860. otherwise to &lsquo;<samp><span class="samp">no</span></samp>&rsquo;. It also determines the right values for Makefile
  8861. variables in each <samp><span class="file">po/</span></samp> directory.
  8862. <div class="node">
  8863. <a name="AM_XGETTEXT_OPTION"></a>
  8864. <a name="AM_005fXGETTEXT_005fOPTION"></a>
  8865. <p><hr>
  8866. Next:&nbsp;<a rel="next" accesskey="n" href="#AM_005fICONV">AM_ICONV</a>,
  8867. Previous:&nbsp;<a rel="previous" accesskey="p" href="#AM_005fPO_005fSUBDIRS">AM_PO_SUBDIRS</a>,
  8868. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8869. </div>
  8870. <h4 class="subsection">13.5.6 AM_XGETTEXT_OPTION in <samp><span class="file">po.m4</span></samp></h4>
  8871. <p><a name="index-AM_005fXGETTEXT_005fOPTION-1152"></a>The <code>AM_XGETTEXT_OPTION</code> macro registers a command-line option to be
  8872. used in the invocations of <code>xgettext</code> in the <samp><span class="file">po/</span></samp> directories
  8873. of the package.
  8874. <p>For example, if you have a source file that defines a function
  8875. &lsquo;<samp><span class="samp">error_at_line</span></samp>&rsquo; whose fifth argument is a format string, you can use
  8876. <pre class="example"> AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])
  8877. </pre>
  8878. <p class="noindent">to instruct <code>xgettext</code> to mark all translatable strings in &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo;
  8879. invocations that occur as fifth argument to this function as &lsquo;<samp><span class="samp">c-format</span></samp>&rsquo;.
  8880. <p>See <a href="#xgettext-Invocation">xgettext Invocation</a> for the list of options that <code>xgettext</code>
  8881. accepts.
  8882. <p>The use of this macro is an alternative to the use of the
  8883. &lsquo;<samp><span class="samp">XGETTEXT_OPTIONS</span></samp>&rsquo; variable in <samp><span class="file">po/Makevars</span></samp>.
  8884. <div class="node">
  8885. <a name="AM_ICONV"></a>
  8886. <a name="AM_005fICONV"></a>
  8887. <p><hr>
  8888. Previous:&nbsp;<a rel="previous" accesskey="p" href="#AM_005fXGETTEXT_005fOPTION">AM_XGETTEXT_OPTION</a>,
  8889. Up:&nbsp;<a rel="up" accesskey="u" href="#autoconf-macros">autoconf macros</a>
  8890. </div>
  8891. <h4 class="subsection">13.5.7 AM_ICONV in <samp><span class="file">iconv.m4</span></samp></h4>
  8892. <p><a name="index-AM_005fICONV-1153"></a>The <code>AM_ICONV</code> macro tests for the presence of the POSIX/XSI
  8893. <code>iconv</code> function family in either the C library or a separate
  8894. <code>libiconv</code> library. If found, it sets the <code>am_cv_func_iconv</code>
  8895. variable to &lsquo;<samp><span class="samp">yes</span></samp>&rsquo;; it defines <code>HAVE_ICONV</code> to 1 in the autoconf
  8896. generated configuration file (usually called <samp><span class="file">config.h</span></samp>); it defines
  8897. <code>ICONV_CONST</code> to &lsquo;<samp><span class="samp">const</span></samp>&rsquo; or to empty, depending on whether the
  8898. second argument of <code>iconv()</code> is of type &lsquo;<samp><span class="samp">const char **</span></samp>&rsquo; or
  8899. &lsquo;<samp><span class="samp">char **</span></samp>&rsquo;; it sets the variables <code>LIBICONV</code> and
  8900. <code>LTLIBICONV</code> to the linker options for use in a Makefile
  8901. (<code>LIBICONV</code> for use without libtool, <code>LTLIBICONV</code> for use with
  8902. libtool); it adds an &lsquo;<samp><span class="samp">-I</span></samp>&rsquo; option to <code>CPPFLAGS</code> if
  8903. necessary. If not found, it sets <code>LIBICONV</code> and <code>LTLIBICONV</code> to
  8904. empty and doesn't change <code>CPPFLAGS</code>.
  8905. <p>The complexities that <code>AM_ICONV</code> deals with are the following:
  8906. <ul>
  8907. <li><a name="index-g_t_0040code_007blibiconv_007d-library-1154"></a>Some operating systems have <code>iconv</code> in the C library, for example
  8908. glibc. Some have it in a separate library <code>libiconv</code>, for example
  8909. OSF/1 or FreeBSD. Regardless of the operating system, GNU <code>libiconv</code>
  8910. might have been installed. In that case, it should be used instead of the
  8911. operating system's native <code>iconv</code>.
  8912. <li>GNU <code>libiconv</code>, if installed, is not necessarily already in the search
  8913. path (<code>CPPFLAGS</code> for the include file search path, <code>LDFLAGS</code> for
  8914. the library search path).
  8915. <li>GNU <code>libiconv</code> is binary incompatible with some operating system's
  8916. native <code>iconv</code>, for example on FreeBSD. Use of an <samp><span class="file">iconv.h</span></samp>
  8917. and <samp><span class="file">libiconv.so</span></samp> that don't fit together would produce program
  8918. crashes.
  8919. <li>GNU <code>libiconv</code>, if installed, is not necessarily already in the
  8920. run time library search path. To avoid the need for setting an environment
  8921. variable like <code>LD_LIBRARY_PATH</code>, the macro adds the appropriate
  8922. run time search path options to the <code>LIBICONV</code> variable. This works
  8923. on most systems, but not on some operating systems with limited shared
  8924. library support, like SCO.
  8925. </ul>
  8926. <p><samp><span class="file">iconv.m4</span></samp> is distributed with the GNU gettext package because
  8927. <samp><span class="file">gettext.m4</span></samp> relies on it.
  8928. <div class="node">
  8929. <a name="CVS-Issues"></a>
  8930. <p><hr>
  8931. Next:&nbsp;<a rel="next" accesskey="n" href="#Release-Management">Release Management</a>,
  8932. Previous:&nbsp;<a rel="previous" accesskey="p" href="#autoconf-macros">autoconf macros</a>,
  8933. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  8934. </div>
  8935. <h3 class="section">13.6 Integrating with CVS</h3>
  8936. <p>Many projects use CVS for distributed development, version control and
  8937. source backup. This section gives some advice how to manage the uses
  8938. of <code>cvs</code>, <code>gettextize</code>, <code>autopoint</code> and <code>autoconf</code>.
  8939. <ul class="menu">
  8940. <li><a accesskey="1" href="#Distributed-CVS">Distributed CVS</a>: Avoiding version mismatch in distributed development
  8941. <li><a accesskey="2" href="#Files-under-CVS">Files under CVS</a>: Files to put under CVS version control
  8942. <li><a accesskey="3" href="#autopoint-Invocation">autopoint Invocation</a>: Invoking the <code>autopoint</code> Program
  8943. </ul>
  8944. <div class="node">
  8945. <a name="Distributed-CVS"></a>
  8946. <p><hr>
  8947. Next:&nbsp;<a rel="next" accesskey="n" href="#Files-under-CVS">Files under CVS</a>,
  8948. Previous:&nbsp;<a rel="previous" accesskey="p" href="#CVS-Issues">CVS Issues</a>,
  8949. Up:&nbsp;<a rel="up" accesskey="u" href="#CVS-Issues">CVS Issues</a>
  8950. </div>
  8951. <h4 class="subsection">13.6.1 Avoiding version mismatch in distributed development</h4>
  8952. <p>In a project development with multiple developers, using CVS, there
  8953. should be a single developer who occasionally - when there is desire to
  8954. upgrade to a new <code>gettext</code> version - runs <code>gettextize</code> and
  8955. performs the changes listed in <a href="#Adjusting-Files">Adjusting Files</a>, and then commits
  8956. his changes to the CVS.
  8957. <p>It is highly recommended that all developers on a project use the same
  8958. version of GNU <code>gettext</code> in the package. In other words, if a
  8959. developer runs <code>gettextize</code>, he should go the whole way, make the
  8960. necessary remaining changes and commit his changes to the CVS.
  8961. Otherwise the following damages will likely occur:
  8962. <ul>
  8963. <li>Apparent version mismatch between developers. Since some <code>gettext</code>
  8964. specific portions in <samp><span class="file">configure.ac</span></samp>, <samp><span class="file">configure.in</span></samp> and
  8965. <code>Makefile.am</code>, <code>Makefile.in</code> files depend on the <code>gettext</code>
  8966. version, the use of infrastructure files belonging to different
  8967. <code>gettext</code> versions can easily lead to build errors.
  8968. <li>Hidden version mismatch. Such version mismatch can also lead to
  8969. malfunctioning of the package, that may be undiscovered by the developers.
  8970. The worst case of hidden version mismatch is that internationalization
  8971. of the package doesn't work at all.
  8972. <li>Release risks. All developers implicitly perform constant testing on
  8973. a package. This is important in the days and weeks before a release.
  8974. If the guy who makes the release tar files uses a different version
  8975. of GNU <code>gettext</code> than the other developers, the distribution will
  8976. be less well tested than if all had been using the same <code>gettext</code>
  8977. version. For example, it is possible that a platform specific bug goes
  8978. undiscovered due to this constellation.
  8979. </ul>
  8980. <div class="node">
  8981. <a name="Files-under-CVS"></a>
  8982. <p><hr>
  8983. Next:&nbsp;<a rel="next" accesskey="n" href="#autopoint-Invocation">autopoint Invocation</a>,
  8984. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Distributed-CVS">Distributed CVS</a>,
  8985. Up:&nbsp;<a rel="up" accesskey="u" href="#CVS-Issues">CVS Issues</a>
  8986. </div>
  8987. <h4 class="subsection">13.6.2 Files to put under CVS version control</h4>
  8988. <p>There are basically three ways to deal with generated files in the
  8989. context of a CVS repository, such as <samp><span class="file">configure</span></samp> generated from
  8990. <samp><span class="file">configure.ac</span></samp>, <var>parser</var><code>.c</code> generated from
  8991. <var>parser</var><code>.y</code>, or <code>po/Makefile.in.in</code> autoinstalled by
  8992. <code>gettextize</code> or <code>autopoint</code>.
  8993. <ol type=1 start=1>
  8994. <li>All generated files are always committed into the repository.
  8995. <li>All generated files are committed into the repository occasionally,
  8996. for example each time a release is made.
  8997. <li>Generated files are never committed into the repository.
  8998. </ol>
  8999. <p>Each of these three approaches has different advantages and drawbacks.
  9000. <ol type=1 start=1>
  9001. <li>The advantage is that anyone can check out the CVS at any moment and
  9002. gets a working build. The drawbacks are: 1a. It requires some frequent
  9003. "cvs commit" actions by the maintainers. 1b. The repository grows in size
  9004. quite fast.
  9005. <li>The advantage is that anyone can check out the CVS, and the usual
  9006. "./configure; make" will work. The drawbacks are: 2a. The one who
  9007. checks out the repository needs tools like GNU <code>automake</code>,
  9008. GNU <code>autoconf</code>, GNU <code>m4</code> installed in his PATH; sometimes
  9009. he even needs particular versions of them. 2b. When a release is made
  9010. and a commit is made on the generated files, the other developers get
  9011. conflicts on the generated files after doing "cvs update". Although
  9012. these conflicts are easy to resolve, they are annoying.
  9013. <li>The advantage is less work for the maintainers. The drawback is that
  9014. anyone who checks out the CVS not only needs tools like GNU <code>automake</code>,
  9015. GNU <code>autoconf</code>, GNU <code>m4</code> installed in his PATH, but also that
  9016. he needs to perform a package specific pre-build step before being able
  9017. to "./configure; make".
  9018. </ol>
  9019. <p>For the first and second approach, all files modified or brought in
  9020. by the occasional <code>gettextize</code> invocation and update should be
  9021. committed into the CVS.
  9022. <p>For the third approach, the maintainer can omit from the CVS repository
  9023. all the files that <code>gettextize</code> mentions as "copy". Instead, he
  9024. adds to the <samp><span class="file">configure.ac</span></samp> or <samp><span class="file">configure.in</span></samp> a line of the
  9025. form
  9026. <pre class="example"> AM_GNU_GETTEXT_VERSION(0.18)
  9027. </pre>
  9028. <p class="noindent">and adds to the package's pre-build script an invocation of
  9029. &lsquo;<samp><span class="samp">autopoint</span></samp>&rsquo;. For everyone who checks out the CVS, this
  9030. <code>autopoint</code> invocation will copy into the right place the
  9031. <code>gettext</code> infrastructure files that have been omitted from the CVS.
  9032. <p>The version number used as argument to <code>AM_GNU_GETTEXT_VERSION</code> is
  9033. the version of the <code>gettext</code> infrastructure that the package wants
  9034. to use. It is also the minimum version number of the &lsquo;<samp><span class="samp">autopoint</span></samp>&rsquo;
  9035. program. So, if you write <code>AM_GNU_GETTEXT_VERSION(0.11.5)</code> then the
  9036. developers can have any version &gt;= 0.11.5 installed; the package will work
  9037. with the 0.11.5 infrastructure in all developers' builds. When the
  9038. maintainer then runs gettextize from, say, version 0.12.1 on the package,
  9039. the occurrence of <code>AM_GNU_GETTEXT_VERSION(0.11.5)</code> will be changed
  9040. into <code>AM_GNU_GETTEXT_VERSION(0.12.1)</code>, and all other developers that
  9041. use the CVS will henceforth need to have GNU <code>gettext</code> 0.12.1 or newer
  9042. installed.
  9043. <div class="node">
  9044. <a name="autopoint-Invocation"></a>
  9045. <p><hr>
  9046. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Files-under-CVS">Files under CVS</a>,
  9047. Up:&nbsp;<a rel="up" accesskey="u" href="#CVS-Issues">CVS Issues</a>
  9048. </div>
  9049. <h4 class="subsection">13.6.3 Invoking the <code>autopoint</code> Program</h4>
  9050. <p><a name="index-autopoint-1155"></a><a name="index-g_t_0040code_007bautopoint_007d-program_002c-usage-1156"></a>
  9051. <pre class="example"> autopoint [<var>option</var>]...
  9052. </pre>
  9053. <p>The <code>autopoint</code> program copies standard gettext infrastructure files
  9054. into a source package. It extracts from a macro call of the form
  9055. <code>AM_GNU_GETTEXT_VERSION(</code><var>version</var><code>)</code>, found in the package's
  9056. <samp><span class="file">configure.in</span></samp> or <samp><span class="file">configure.ac</span></samp> file, the gettext version
  9057. used by the package, and copies the infrastructure files belonging to
  9058. this version into the package.
  9059. <h5 class="subsubsection">13.6.3.1 Options</h5>
  9060. <dl>
  9061. <dt>&lsquo;<samp><span class="samp">-f</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--force</span></samp>&rsquo;<dd><a name="index-g_t_002df_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1157"></a><a name="index-g_t_002d_002dforce_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1158"></a>Force overwriting of files that already exist.
  9062. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--dry-run</span></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1159"></a><a name="index-g_t_002d_002ddry_002drun_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1160"></a>Print modifications but don't perform them. All file copying actions that
  9063. <code>autopoint</code> would normally execute are inhibited and instead only
  9064. listed on standard output.
  9065. </dl>
  9066. <h5 class="subsubsection">13.6.3.2 Informative output</h5>
  9067. <dl>
  9068. <dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1161"></a>Display this help and exit.
  9069. <br><dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1162"></a>Output version information and exit.
  9070. </dl>
  9071. <p><code>autopoint</code> supports the GNU <code>gettext</code> versions from 0.10.35 to
  9072. the current one, 0.18. In order to apply <code>autopoint</code> to
  9073. a package using a <code>gettext</code> version newer than 0.18, you
  9074. need to install this same version of GNU <code>gettext</code> at least.
  9075. <p>In packages using GNU <code>automake</code>, an invocation of <code>autopoint</code>
  9076. should be followed by invocations of <code>aclocal</code> and then <code>autoconf</code>
  9077. and <code>autoheader</code>. The reason is that <code>autopoint</code> installs some
  9078. autoconf macro files, which are used by <code>aclocal</code> to create
  9079. <samp><span class="file">aclocal.m4</span></samp>, and the latter is used by <code>autoconf</code> to create the
  9080. package's <samp><span class="file">configure</span></samp> script and by <code>autoheader</code> to create the
  9081. package's <samp><span class="file">config.h.in</span></samp> include file template.
  9082. <p>The name &lsquo;<samp><span class="samp">autopoint</span></samp>&rsquo; is an abbreviation of &lsquo;<samp><span class="samp">auto-po-intl-m4</span></samp>&rsquo;;
  9083. the tool copies or updates mostly files in the <samp><span class="file">po</span></samp>, <samp><span class="file">intl</span></samp>,
  9084. <samp><span class="file">m4</span></samp> directories.
  9085. <div class="node">
  9086. <a name="Release-Management"></a>
  9087. <p><hr>
  9088. Previous:&nbsp;<a rel="previous" accesskey="p" href="#CVS-Issues">CVS Issues</a>,
  9089. Up:&nbsp;<a rel="up" accesskey="u" href="#Maintainers">Maintainers</a>
  9090. </div>
  9091. <h3 class="section">13.7 Creating a Distribution Tarball</h3>
  9092. <p><a name="index-release-1163"></a><a name="index-distribution-tarball-1164"></a>In projects that use GNU <code>automake</code>, the usual commands for creating
  9093. a distribution tarball, &lsquo;<samp><span class="samp">make dist</span></samp>&rsquo; or &lsquo;<samp><span class="samp">make distcheck</span></samp>&rsquo;,
  9094. automatically update the PO files as needed.
  9095. <p>If GNU <code>automake</code> is not used, the maintainer needs to perform this
  9096. update before making a release:
  9097. <pre class="example"> $ ./configure
  9098. $ (cd po; make update-po)
  9099. $ make distclean
  9100. </pre>
  9101. <div class="node">
  9102. <a name="Installers"></a>
  9103. <p><hr>
  9104. Next:&nbsp;<a rel="next" accesskey="n" href="#Programming-Languages">Programming Languages</a>,
  9105. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Maintainers">Maintainers</a>,
  9106. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  9107. </div>
  9108. <h2 class="chapter">14 The Installer's and Distributor's View</h2>
  9109. <p><a name="index-package-installer_0027s-view-of-_0040code_007bgettext_007d-1165"></a><a name="index-package-distributor_0027s-view-of-_0040code_007bgettext_007d-1166"></a><a name="index-package-build-and-installation-options-1167"></a><a name="index-setting-up-_0040code_007bgettext_007d-at-build-time-1168"></a>
  9110. By default, packages fully using GNU <code>gettext</code>, internally,
  9111. are installed in such a way that they to allow translation of
  9112. messages. At <em>configuration</em> time, those packages should
  9113. automatically detect whether the underlying host system already provides
  9114. the GNU <code>gettext</code> functions. If not,
  9115. the GNU <code>gettext</code> library should be automatically prepared
  9116. and used. Installers may use special options at configuration
  9117. time for changing this behavior. The command &lsquo;<samp><span class="samp">./configure
  9118. --with-included-gettext</span></samp>&rsquo; bypasses system <code>gettext</code> to
  9119. use the included GNU <code>gettext</code> instead,
  9120. while &lsquo;<samp><span class="samp">./configure --disable-nls</span></samp>&rsquo;
  9121. produces programs totally unable to translate messages.
  9122. <p><a name="index-LINGUAS_0040r_007b_002c-environment-variable_007d-1169"></a>Internationalized packages have usually many <samp><var>ll</var><span class="file">.po</span></samp>
  9123. files. Unless
  9124. translations are disabled, all those available are installed together
  9125. with the package. However, the environment variable <code>LINGUAS</code>
  9126. may be set, prior to configuration, to limit the installed set.
  9127. <code>LINGUAS</code> should then contain a space separated list of two-letter
  9128. codes, stating which languages are allowed.
  9129. <div class="node">
  9130. <a name="Programming-Languages"></a>
  9131. <p><hr>
  9132. Next:&nbsp;<a rel="next" accesskey="n" href="#Conclusion">Conclusion</a>,
  9133. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Installers">Installers</a>,
  9134. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  9135. </div>
  9136. <h2 class="chapter">15 Other Programming Languages</h2>
  9137. <p>While the presentation of <code>gettext</code> focuses mostly on C and
  9138. implicitly applies to C++ as well, its scope is far broader than that:
  9139. Many programming languages, scripting languages and other textual data
  9140. like GUI resources or package descriptions can make use of the gettext
  9141. approach.
  9142. <ul class="menu">
  9143. <li><a accesskey="1" href="#Language-Implementors">Language Implementors</a>: The Language Implementor's View
  9144. <li><a accesskey="2" href="#Programmers-for-other-Languages">Programmers for other Languages</a>: The Programmer's View
  9145. <li><a accesskey="3" href="#Translators-for-other-Languages">Translators for other Languages</a>: The Translator's View
  9146. <li><a accesskey="4" href="#Maintainers-for-other-Languages">Maintainers for other Languages</a>: The Maintainer's View
  9147. <li><a accesskey="5" href="#List-of-Programming-Languages">List of Programming Languages</a>: Individual Programming Languages
  9148. <li><a accesskey="6" href="#List-of-Data-Formats">List of Data Formats</a>: Internationalizable Data
  9149. </ul>
  9150. <div class="node">
  9151. <a name="Language-Implementors"></a>
  9152. <p><hr>
  9153. Next:&nbsp;<a rel="next" accesskey="n" href="#Programmers-for-other-Languages">Programmers for other Languages</a>,
  9154. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programming-Languages">Programming Languages</a>,
  9155. Up:&nbsp;<a rel="up" accesskey="u" href="#Programming-Languages">Programming Languages</a>
  9156. </div>
  9157. <h3 class="section">15.1 The Language Implementor's View</h3>
  9158. <p><a name="index-programming-languages-1170"></a><a name="index-scripting-languages-1171"></a>
  9159. All programming and scripting languages that have the notion of strings
  9160. are eligible to supporting <code>gettext</code>. Supporting <code>gettext</code>
  9161. means the following:
  9162. <ol type=1 start=1>
  9163. <li>You should add to the language a syntax for translatable strings. In
  9164. principle, a function call of <code>gettext</code> would do, but a shorthand
  9165. syntax helps keeping the legibility of internationalized programs. For
  9166. example, in C we use the syntax <code>_("string")</code>, and in GNU awk we use
  9167. the shorthand <code>_"string"</code>.
  9168. <li>You should arrange that evaluation of such a translatable string at
  9169. runtime calls the <code>gettext</code> function, or performs equivalent
  9170. processing.
  9171. <li>Similarly, you should make the functions <code>ngettext</code>,
  9172. <code>dcgettext</code>, <code>dcngettext</code> available from within the language.
  9173. These functions are less often used, but are nevertheless necessary for
  9174. particular purposes: <code>ngettext</code> for correct plural handling, and
  9175. <code>dcgettext</code> and <code>dcngettext</code> for obeying other locale-related
  9176. environment variables than <code>LC_MESSAGES</code>, such as <code>LC_TIME</code> or
  9177. <code>LC_MONETARY</code>. For these latter functions, you need to make the
  9178. <code>LC_*</code> constants, available in the C header <code>&lt;locale.h&gt;</code>,
  9179. referenceable from within the language, usually either as enumeration
  9180. values or as strings.
  9181. <li>You should allow the programmer to designate a message domain, either by
  9182. making the <code>textdomain</code> function available from within the
  9183. language, or by introducing a magic variable called <code>TEXTDOMAIN</code>.
  9184. Similarly, you should allow the programmer to designate where to search
  9185. for message catalogs, by providing access to the <code>bindtextdomain</code>
  9186. function.
  9187. <li>You should either perform a <code>setlocale (LC_ALL, "")</code> call during
  9188. the startup of your language runtime, or allow the programmer to do so.
  9189. Remember that gettext will act as a no-op if the <code>LC_MESSAGES</code> and
  9190. <code>LC_CTYPE</code> locale categories are not both set.
  9191. <li>A programmer should have a way to extract translatable strings from a
  9192. program into a PO file. The GNU <code>xgettext</code> program is being
  9193. extended to support very different programming languages. Please
  9194. contact the GNU <code>gettext</code> maintainers to help them doing this. If
  9195. the string extractor is best integrated into your language's parser, GNU
  9196. <code>xgettext</code> can function as a front end to your string extractor.
  9197. <li>The language's library should have a string formatting facility where
  9198. the arguments of a format string are denoted by a positional number or a
  9199. name. This is needed because for some languages and some messages with
  9200. more than one substitutable argument, the translation will need to
  9201. output the substituted arguments in different order. See <a href="#c_002dformat-Flag">c-format Flag</a>.
  9202. <li>If the language has more than one implementation, and not all of the
  9203. implementations use <code>gettext</code>, but the programs should be portable
  9204. across implementations, you should provide a no-i18n emulation, that
  9205. makes the other implementations accept programs written for yours,
  9206. without actually translating the strings.
  9207. <li>To help the programmer in the task of marking translatable strings,
  9208. which is sometimes performed using the Emacs PO mode (see <a href="#Marking">Marking</a>),
  9209. you are welcome to
  9210. contact the GNU <code>gettext</code> maintainers, so they can add support for
  9211. your language to <samp><span class="file">po-mode.el</span></samp>.
  9212. </ol>
  9213. <p>On the implementation side, three approaches are possible, with
  9214. different effects on portability and copyright:
  9215. <ul>
  9216. <li>You may integrate the GNU <code>gettext</code>'s <samp><span class="file">intl/</span></samp> directory in
  9217. your package, as described in <a href="#Maintainers">Maintainers</a>. This allows you to
  9218. have internationalization on all kinds of platforms. Note that when you
  9219. then distribute your package, it legally falls under the GNU General
  9220. Public License, and the GNU project will be glad about your contribution
  9221. to the Free Software pool.
  9222. <li>You may link against GNU <code>gettext</code> functions if they are found in
  9223. the C library. For example, an autoconf test for <code>gettext()</code> and
  9224. <code>ngettext()</code> will detect this situation. For the moment, this test
  9225. will succeed on GNU systems and not on other platforms. No severe
  9226. copyright restrictions apply.
  9227. <li>You may emulate or reimplement the GNU <code>gettext</code> functionality.
  9228. This has the advantage of full portability and no copyright
  9229. restrictions, but also the drawback that you have to reimplement the GNU
  9230. <code>gettext</code> features (such as the <code>LANGUAGE</code> environment
  9231. variable, the locale aliases database, the automatic charset conversion,
  9232. and plural handling).
  9233. </ul>
  9234. <div class="node">
  9235. <a name="Programmers-for-other-Languages"></a>
  9236. <p><hr>
  9237. Next:&nbsp;<a rel="next" accesskey="n" href="#Translators-for-other-Languages">Translators for other Languages</a>,
  9238. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-Implementors">Language Implementors</a>,
  9239. Up:&nbsp;<a rel="up" accesskey="u" href="#Programming-Languages">Programming Languages</a>
  9240. </div>
  9241. <h3 class="section">15.2 The Programmer's View</h3>
  9242. <p>For the programmer, the general procedure is the same as for the C
  9243. language. The Emacs PO mode marking supports other languages, and the GNU
  9244. <code>xgettext</code> string extractor recognizes other languages based on the
  9245. file extension or a command-line option. In some languages,
  9246. <code>setlocale</code> is not needed because it is already performed by the
  9247. underlying language runtime.
  9248. <div class="node">
  9249. <a name="Translators-for-other-Languages"></a>
  9250. <p><hr>
  9251. Next:&nbsp;<a rel="next" accesskey="n" href="#Maintainers-for-other-Languages">Maintainers for other Languages</a>,
  9252. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programmers-for-other-Languages">Programmers for other Languages</a>,
  9253. Up:&nbsp;<a rel="up" accesskey="u" href="#Programming-Languages">Programming Languages</a>
  9254. </div>
  9255. <h3 class="section">15.3 The Translator's View</h3>
  9256. <p>The translator works exactly as in the C language case. The only
  9257. difference is that when translating format strings, she has to be aware
  9258. of the language's particular syntax for positional arguments in format
  9259. strings.
  9260. <ul class="menu">
  9261. <li><a accesskey="1" href="#c_002dformat">c-format</a>: C Format Strings
  9262. <li><a accesskey="2" href="#objc_002dformat">objc-format</a>: Objective C Format Strings
  9263. <li><a accesskey="3" href="#sh_002dformat">sh-format</a>: Shell Format Strings
  9264. <li><a accesskey="4" href="#python_002dformat">python-format</a>: Python Format Strings
  9265. <li><a accesskey="5" href="#lisp_002dformat">lisp-format</a>: Lisp Format Strings
  9266. <li><a accesskey="6" href="#elisp_002dformat">elisp-format</a>: Emacs Lisp Format Strings
  9267. <li><a accesskey="7" href="#librep_002dformat">librep-format</a>: librep Format Strings
  9268. <li><a accesskey="8" href="#scheme_002dformat">scheme-format</a>: Scheme Format Strings
  9269. <li><a accesskey="9" href="#smalltalk_002dformat">smalltalk-format</a>: Smalltalk Format Strings
  9270. <li><a href="#java_002dformat">java-format</a>: Java Format Strings
  9271. <li><a href="#csharp_002dformat">csharp-format</a>: C# Format Strings
  9272. <li><a href="#awk_002dformat">awk-format</a>: awk Format Strings
  9273. <li><a href="#object_002dpascal_002dformat">object-pascal-format</a>: Object Pascal Format Strings
  9274. <li><a href="#ycp_002dformat">ycp-format</a>: YCP Format Strings
  9275. <li><a href="#tcl_002dformat">tcl-format</a>: Tcl Format Strings
  9276. <li><a href="#perl_002dformat">perl-format</a>: Perl Format Strings
  9277. <li><a href="#php_002dformat">php-format</a>: PHP Format Strings
  9278. <li><a href="#gcc_002dinternal_002dformat">gcc-internal-format</a>: GCC internal Format Strings
  9279. <li><a href="#gfc_002dinternal_002dformat">gfc-internal-format</a>: GFC internal Format Strings
  9280. <li><a href="#qt_002dformat">qt-format</a>: Qt Format Strings
  9281. <li><a href="#qt_002dplural_002dformat">qt-plural-format</a>: Qt Plural Format Strings
  9282. <li><a href="#kde_002dformat">kde-format</a>: KDE Format Strings
  9283. <li><a href="#boost_002dformat">boost-format</a>: Boost Format Strings
  9284. </ul>
  9285. <div class="node">
  9286. <a name="c-format"></a>
  9287. <a name="c_002dformat"></a>
  9288. <p><hr>
  9289. Next:&nbsp;<a rel="next" accesskey="n" href="#objc_002dformat">objc-format</a>,
  9290. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Translators-for-other-Languages">Translators for other Languages</a>,
  9291. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9292. </div>
  9293. <h4 class="subsection">15.3.1 C Format Strings</h4>
  9294. <p>C format strings are described in POSIX (IEEE P1003.1 2001), section
  9295. XSH 3 fprintf(),
  9296. <a href="http://www.opengroup.org/onlinepubs/007904975/functions/fprintf.html">http://www.opengroup.org/onlinepubs/007904975/functions/fprintf.html</a>.
  9297. See also the fprintf() manual page,
  9298. <a href="http://www.linuxvalley.it/encyclopedia/ldp/manpage/man3/printf.3.php">http://www.linuxvalley.it/encyclopedia/ldp/manpage/man3/printf.3.php</a>,
  9299. <a href="http://informatik.fh-wuerzburg.de/student/i510/man/printf.html">http://informatik.fh-wuerzburg.de/student/i510/man/printf.html</a>.
  9300. <p>Although format strings with positions that reorder arguments, such as
  9301. <pre class="example"> "Only %2$d bytes free on '%1$s'."
  9302. </pre>
  9303. <p class="noindent">which is semantically equivalent to
  9304. <pre class="example"> "'%s' has only %d bytes free."
  9305. </pre>
  9306. <p class="noindent">are a POSIX/XSI feature and not specified by ISO C 99, translators can rely
  9307. on this reordering ability: On the few platforms where <code>printf()</code>,
  9308. <code>fprintf()</code> etc. don't support this feature natively, <samp><span class="file">libintl.a</span></samp>
  9309. or <samp><span class="file">libintl.so</span></samp> provides replacement functions, and GNU <code>&lt;libintl.h&gt;</code>
  9310. activates these replacement functions automatically.
  9311. <p><a name="index-outdigits-1172"></a><a name="index-Arabic-digits-1173"></a>As a special feature for Farsi (Persian) and maybe Arabic, translators can
  9312. insert an &lsquo;<samp><span class="samp">I</span></samp>&rsquo; flag into numeric format directives. For example, the
  9313. translation of <code>"%d"</code> can be <code>"%Id"</code>. The effect of this flag,
  9314. on systems with GNU <code>libc</code>, is that in the output, the ASCII digits are
  9315. replaced with the &lsquo;<samp><span class="samp">outdigits</span></samp>&rsquo; defined in the <code>LC_CTYPE</code> locale
  9316. category. On other systems, the <code>gettext</code> function removes this flag,
  9317. so that it has no effect.
  9318. <p>Note that the programmer should <em>not</em> put this flag into the
  9319. untranslated string. (Putting the &lsquo;<samp><span class="samp">I</span></samp>&rsquo; format directive flag into an
  9320. <var>msgid</var> string would lead to undefined behaviour on platforms without
  9321. glibc when NLS is disabled.)
  9322. <div class="node">
  9323. <a name="objc-format"></a>
  9324. <a name="objc_002dformat"></a>
  9325. <p><hr>
  9326. Next:&nbsp;<a rel="next" accesskey="n" href="#sh_002dformat">sh-format</a>,
  9327. Previous:&nbsp;<a rel="previous" accesskey="p" href="#c_002dformat">c-format</a>,
  9328. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9329. </div>
  9330. <h4 class="subsection">15.3.2 Objective C Format Strings</h4>
  9331. <p>Objective C format strings are like C format strings. They support an
  9332. additional format directive: "%@", which when executed consumes an argument
  9333. of type <code>Object *</code>.
  9334. <div class="node">
  9335. <a name="sh-format"></a>
  9336. <a name="sh_002dformat"></a>
  9337. <p><hr>
  9338. Next:&nbsp;<a rel="next" accesskey="n" href="#python_002dformat">python-format</a>,
  9339. Previous:&nbsp;<a rel="previous" accesskey="p" href="#objc_002dformat">objc-format</a>,
  9340. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9341. </div>
  9342. <h4 class="subsection">15.3.3 Shell Format Strings</h4>
  9343. <p>Shell format strings, as supported by GNU gettext and the &lsquo;<samp><span class="samp">envsubst</span></samp>&rsquo;
  9344. program, are strings with references to shell variables in the form
  9345. <code>$</code><var>variable</var> or <code>${</code><var>variable</var><code>}</code>. References of the form
  9346. <code>${</code><var>variable</var><code>-</code><var>default</var><code>}</code>,
  9347. <code>${</code><var>variable</var><code>:-</code><var>default</var><code>}</code>,
  9348. <code>${</code><var>variable</var><code>=</code><var>default</var><code>}</code>,
  9349. <code>${</code><var>variable</var><code>:=</code><var>default</var><code>}</code>,
  9350. <code>${</code><var>variable</var><code>+</code><var>replacement</var><code>}</code>,
  9351. <code>${</code><var>variable</var><code>:+</code><var>replacement</var><code>}</code>,
  9352. <code>${</code><var>variable</var><code>?</code><var>ignored</var><code>}</code>,
  9353. <code>${</code><var>variable</var><code>:?</code><var>ignored</var><code>}</code>,
  9354. that would be valid inside shell scripts, are not supported. The
  9355. <var>variable</var> names must consist solely of alphanumeric or underscore
  9356. ASCII characters, not start with a digit and be nonempty; otherwise such
  9357. a variable reference is ignored.
  9358. <div class="node">
  9359. <a name="python-format"></a>
  9360. <a name="python_002dformat"></a>
  9361. <p><hr>
  9362. Next:&nbsp;<a rel="next" accesskey="n" href="#lisp_002dformat">lisp-format</a>,
  9363. Previous:&nbsp;<a rel="previous" accesskey="p" href="#sh_002dformat">sh-format</a>,
  9364. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9365. </div>
  9366. <h4 class="subsection">15.3.4 Python Format Strings</h4>
  9367. <p>Python format strings are described in
  9368. Python&nbsp;Library&nbsp;reference<!-- /@w --> /
  9369. 2.&nbsp;Built-in&nbsp;Types,&nbsp;Exceptions&nbsp;and&nbsp;Functions<!-- /@w --> /
  9370. 2.2.&nbsp;Built-in&nbsp;Types<!-- /@w --> /
  9371. 2.2.6.&nbsp;Sequence&nbsp;Types<!-- /@w --> /
  9372. 2.2.6.2.&nbsp;String&nbsp;Formatting&nbsp;Operations<!-- /@w -->.
  9373. <a href="http://www.python.org/doc/2.2.1/lib/typesseq-strings.html">http://www.python.org/doc/2.2.1/lib/typesseq-strings.html</a>.
  9374. <div class="node">
  9375. <a name="lisp-format"></a>
  9376. <a name="lisp_002dformat"></a>
  9377. <p><hr>
  9378. Next:&nbsp;<a rel="next" accesskey="n" href="#elisp_002dformat">elisp-format</a>,
  9379. Previous:&nbsp;<a rel="previous" accesskey="p" href="#python_002dformat">python-format</a>,
  9380. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9381. </div>
  9382. <h4 class="subsection">15.3.5 Lisp Format Strings</h4>
  9383. <p>Lisp format strings are described in the Common Lisp HyperSpec,
  9384. chapter 22.3 Formatted&nbsp;Output<!-- /@w -->,
  9385. <a href="http://www.lisp.org/HyperSpec/Body/sec_22-3.html">http://www.lisp.org/HyperSpec/Body/sec_22-3.html</a>.
  9386. <div class="node">
  9387. <a name="elisp-format"></a>
  9388. <a name="elisp_002dformat"></a>
  9389. <p><hr>
  9390. Next:&nbsp;<a rel="next" accesskey="n" href="#librep_002dformat">librep-format</a>,
  9391. Previous:&nbsp;<a rel="previous" accesskey="p" href="#lisp_002dformat">lisp-format</a>,
  9392. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9393. </div>
  9394. <h4 class="subsection">15.3.6 Emacs Lisp Format Strings</h4>
  9395. <p>Emacs Lisp format strings are documented in the Emacs Lisp reference,
  9396. section Formatting&nbsp;Strings<!-- /@w -->,
  9397. <a href="http://www.gnu.org/manual/elisp-manual-21-2.8/html_chapter/elisp_4.html#SEC75">http://www.gnu.org/manual/elisp-manual-21-2.8/html_chapter/elisp_4.html#SEC75</a>.
  9398. Note that as of version 21, XEmacs supports numbered argument specifications
  9399. in format strings while FSF Emacs doesn't.
  9400. <div class="node">
  9401. <a name="librep-format"></a>
  9402. <a name="librep_002dformat"></a>
  9403. <p><hr>
  9404. Next:&nbsp;<a rel="next" accesskey="n" href="#scheme_002dformat">scheme-format</a>,
  9405. Previous:&nbsp;<a rel="previous" accesskey="p" href="#elisp_002dformat">elisp-format</a>,
  9406. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9407. </div>
  9408. <h4 class="subsection">15.3.7 librep Format Strings</h4>
  9409. <p>librep format strings are documented in the librep manual, section
  9410. Formatted&nbsp;Output<!-- /@w -->,
  9411. <a href="http://librep.sourceforge.net/librep-manual.html#Formatted%20Output">http://librep.sourceforge.net/librep-manual.html#Formatted%20Output</a>,
  9412. <a href="http://www.gwinnup.org/research/docs/librep.html#SEC122">http://www.gwinnup.org/research/docs/librep.html#SEC122</a>.
  9413. <div class="node">
  9414. <a name="scheme-format"></a>
  9415. <a name="scheme_002dformat"></a>
  9416. <p><hr>
  9417. Next:&nbsp;<a rel="next" accesskey="n" href="#smalltalk_002dformat">smalltalk-format</a>,
  9418. Previous:&nbsp;<a rel="previous" accesskey="p" href="#librep_002dformat">librep-format</a>,
  9419. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9420. </div>
  9421. <h4 class="subsection">15.3.8 Scheme Format Strings</h4>
  9422. <p>Scheme format strings are documented in the SLIB manual, section
  9423. Format&nbsp;Specification<!-- /@w -->.
  9424. <div class="node">
  9425. <a name="smalltalk-format"></a>
  9426. <a name="smalltalk_002dformat"></a>
  9427. <p><hr>
  9428. Next:&nbsp;<a rel="next" accesskey="n" href="#java_002dformat">java-format</a>,
  9429. Previous:&nbsp;<a rel="previous" accesskey="p" href="#scheme_002dformat">scheme-format</a>,
  9430. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9431. </div>
  9432. <h4 class="subsection">15.3.9 Smalltalk Format Strings</h4>
  9433. <p>Smalltalk format strings are described in the GNU Smalltalk documentation,
  9434. class <code>CharArray</code>, methods &lsquo;<samp><span class="samp">bindWith:</span></samp>&rsquo; and
  9435. &lsquo;<samp><span class="samp">bindWithArguments:</span></samp>&rsquo;.
  9436. <a href="http://www.gnu.org/software/smalltalk/gst-manual/gst_68.html#SEC238">http://www.gnu.org/software/smalltalk/gst-manual/gst_68.html#SEC238</a>.
  9437. In summary, a directive starts with &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and is followed by &lsquo;<samp><span class="samp">%</span></samp>&rsquo;
  9438. or a nonzero digit (&lsquo;<samp><span class="samp">1</span></samp>&rsquo; to &lsquo;<samp><span class="samp">9</span></samp>&rsquo;).
  9439. <div class="node">
  9440. <a name="java-format"></a>
  9441. <a name="java_002dformat"></a>
  9442. <p><hr>
  9443. Next:&nbsp;<a rel="next" accesskey="n" href="#csharp_002dformat">csharp-format</a>,
  9444. Previous:&nbsp;<a rel="previous" accesskey="p" href="#smalltalk_002dformat">smalltalk-format</a>,
  9445. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9446. </div>
  9447. <h4 class="subsection">15.3.10 Java Format Strings</h4>
  9448. <p>Java format strings are described in the JDK documentation for class
  9449. <code>java.text.MessageFormat</code>,
  9450. <a href="http://java.sun.com/j2se/1.4/docs/api/java/text/MessageFormat.html">http://java.sun.com/j2se/1.4/docs/api/java/text/MessageFormat.html</a>.
  9451. See also the ICU documentation
  9452. <a href="http://oss.software.ibm.com/icu/apiref/classMessageFormat.html">http://oss.software.ibm.com/icu/apiref/classMessageFormat.html</a>.
  9453. <div class="node">
  9454. <a name="csharp-format"></a>
  9455. <a name="csharp_002dformat"></a>
  9456. <p><hr>
  9457. Next:&nbsp;<a rel="next" accesskey="n" href="#awk_002dformat">awk-format</a>,
  9458. Previous:&nbsp;<a rel="previous" accesskey="p" href="#java_002dformat">java-format</a>,
  9459. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9460. </div>
  9461. <h4 class="subsection">15.3.11 C# Format Strings</h4>
  9462. <p>C# format strings are described in the .NET documentation for class
  9463. <code>System.String</code> and in
  9464. <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpConFormattingOverview.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpConFormattingOverview.asp</a>.
  9465. <div class="node">
  9466. <a name="awk-format"></a>
  9467. <a name="awk_002dformat"></a>
  9468. <p><hr>
  9469. Next:&nbsp;<a rel="next" accesskey="n" href="#object_002dpascal_002dformat">object-pascal-format</a>,
  9470. Previous:&nbsp;<a rel="previous" accesskey="p" href="#csharp_002dformat">csharp-format</a>,
  9471. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9472. </div>
  9473. <h4 class="subsection">15.3.12 awk Format Strings</h4>
  9474. <p>awk format strings are described in the gawk documentation, section
  9475. Printf<!-- /@w -->,
  9476. <a href="http://www.gnu.org/manual/gawk/html_node/Printf.html#Printf">http://www.gnu.org/manual/gawk/html_node/Printf.html#Printf</a>.
  9477. <div class="node">
  9478. <a name="object-pascal-format"></a>
  9479. <a name="object_002dpascal_002dformat"></a>
  9480. <p><hr>
  9481. Next:&nbsp;<a rel="next" accesskey="n" href="#ycp_002dformat">ycp-format</a>,
  9482. Previous:&nbsp;<a rel="previous" accesskey="p" href="#awk_002dformat">awk-format</a>,
  9483. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9484. </div>
  9485. <h4 class="subsection">15.3.13 Object Pascal Format Strings</h4>
  9486. <p>Object Pascal format strings are described in the documentation of the
  9487. Free Pascal runtime library, section Format,
  9488. <a href="http://www.freepascal.org/docs-html/rtl/sysutils/format.html">http://www.freepascal.org/docs-html/rtl/sysutils/format.html</a>.
  9489. <div class="node">
  9490. <a name="ycp-format"></a>
  9491. <a name="ycp_002dformat"></a>
  9492. <p><hr>
  9493. Next:&nbsp;<a rel="next" accesskey="n" href="#tcl_002dformat">tcl-format</a>,
  9494. Previous:&nbsp;<a rel="previous" accesskey="p" href="#object_002dpascal_002dformat">object-pascal-format</a>,
  9495. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9496. </div>
  9497. <h4 class="subsection">15.3.14 YCP Format Strings</h4>
  9498. <p>YCP sformat strings are described in the libycp documentation
  9499. <a href="file:/usr/share/doc/packages/libycp/YCP-builtins.html">file:/usr/share/doc/packages/libycp/YCP-builtins.html</a>.
  9500. In summary, a directive starts with &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and is followed by &lsquo;<samp><span class="samp">%</span></samp>&rsquo;
  9501. or a nonzero digit (&lsquo;<samp><span class="samp">1</span></samp>&rsquo; to &lsquo;<samp><span class="samp">9</span></samp>&rsquo;).
  9502. <div class="node">
  9503. <a name="tcl-format"></a>
  9504. <a name="tcl_002dformat"></a>
  9505. <p><hr>
  9506. Next:&nbsp;<a rel="next" accesskey="n" href="#perl_002dformat">perl-format</a>,
  9507. Previous:&nbsp;<a rel="previous" accesskey="p" href="#ycp_002dformat">ycp-format</a>,
  9508. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9509. </div>
  9510. <h4 class="subsection">15.3.15 Tcl Format Strings</h4>
  9511. <p>Tcl format strings are described in the <samp><span class="file">format.n</span></samp> manual page,
  9512. <a href="http://www.scriptics.com/man/tcl8.3/TclCmd/format.htm">http://www.scriptics.com/man/tcl8.3/TclCmd/format.htm</a>.
  9513. <div class="node">
  9514. <a name="perl-format"></a>
  9515. <a name="perl_002dformat"></a>
  9516. <p><hr>
  9517. Next:&nbsp;<a rel="next" accesskey="n" href="#php_002dformat">php-format</a>,
  9518. Previous:&nbsp;<a rel="previous" accesskey="p" href="#tcl_002dformat">tcl-format</a>,
  9519. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9520. </div>
  9521. <h4 class="subsection">15.3.16 Perl Format Strings</h4>
  9522. <p>There are two kinds format strings in Perl: those acceptable to the
  9523. Perl built-in function <code>printf</code>, labelled as &lsquo;<samp><span class="samp">perl-format</span></samp>&rsquo;,
  9524. and those acceptable to the <code>libintl-perl</code> function <code>__x</code>,
  9525. labelled as &lsquo;<samp><span class="samp">perl-brace-format</span></samp>&rsquo;.
  9526. <p>Perl <code>printf</code> format strings are described in the <code>sprintf</code>
  9527. section of &lsquo;<samp><span class="samp">man perlfunc</span></samp>&rsquo;.
  9528. <p>Perl brace format strings are described in the
  9529. <samp><span class="file">Locale::TextDomain(3pm)</span></samp> manual page of the CPAN package
  9530. libintl-perl. In brief, Perl format uses placeholders put between
  9531. braces (&lsquo;<samp><span class="samp">{</span></samp>&rsquo; and &lsquo;<samp><span class="samp">}</span></samp>&rsquo;). The placeholder must have the syntax
  9532. of simple identifiers.
  9533. <div class="node">
  9534. <a name="php-format"></a>
  9535. <a name="php_002dformat"></a>
  9536. <p><hr>
  9537. Next:&nbsp;<a rel="next" accesskey="n" href="#gcc_002dinternal_002dformat">gcc-internal-format</a>,
  9538. Previous:&nbsp;<a rel="previous" accesskey="p" href="#perl_002dformat">perl-format</a>,
  9539. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9540. </div>
  9541. <h4 class="subsection">15.3.17 PHP Format Strings</h4>
  9542. <p>PHP format strings are described in the documentation of the PHP function
  9543. <code>sprintf</code>, in <samp><span class="file">phpdoc/manual/function.sprintf.html</span></samp> or
  9544. <a href="http://www.php.net/manual/en/function.sprintf.php">http://www.php.net/manual/en/function.sprintf.php</a>.
  9545. <div class="node">
  9546. <a name="gcc-internal-format"></a>
  9547. <a name="gcc_002dinternal_002dformat"></a>
  9548. <p><hr>
  9549. Next:&nbsp;<a rel="next" accesskey="n" href="#gfc_002dinternal_002dformat">gfc-internal-format</a>,
  9550. Previous:&nbsp;<a rel="previous" accesskey="p" href="#php_002dformat">php-format</a>,
  9551. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9552. </div>
  9553. <h4 class="subsection">15.3.18 GCC internal Format Strings</h4>
  9554. <p>These format strings are used inside the GCC sources. In such a format
  9555. string, a directive starts with &lsquo;<samp><span class="samp">%</span></samp>&rsquo;, is optionally followed by a
  9556. size specifier &lsquo;<samp><span class="samp">l</span></samp>&rsquo;, an optional flag &lsquo;<samp><span class="samp">+</span></samp>&rsquo;, another optional flag
  9557. &lsquo;<samp><span class="samp">#</span></samp>&rsquo;, and is finished by a specifier: &lsquo;<samp><span class="samp">%</span></samp>&rsquo; denotes a literal
  9558. percent sign, &lsquo;<samp><span class="samp">c</span></samp>&rsquo; denotes a character, &lsquo;<samp><span class="samp">s</span></samp>&rsquo; denotes a string,
  9559. &lsquo;<samp><span class="samp">i</span></samp>&rsquo; and &lsquo;<samp><span class="samp">d</span></samp>&rsquo; denote an integer, &lsquo;<samp><span class="samp">o</span></samp>&rsquo;, &lsquo;<samp><span class="samp">u</span></samp>&rsquo;, &lsquo;<samp><span class="samp">x</span></samp>&rsquo;
  9560. denote an unsigned integer, &lsquo;<samp><span class="samp">.*s</span></samp>&rsquo; denotes a string preceded by a
  9561. width specification, &lsquo;<samp><span class="samp">H</span></samp>&rsquo; denotes a &lsquo;<samp><span class="samp">location_t *</span></samp>&rsquo; pointer,
  9562. &lsquo;<samp><span class="samp">D</span></samp>&rsquo; denotes a general declaration, &lsquo;<samp><span class="samp">F</span></samp>&rsquo; denotes a function
  9563. declaration, &lsquo;<samp><span class="samp">T</span></samp>&rsquo; denotes a type, &lsquo;<samp><span class="samp">A</span></samp>&rsquo; denotes a function argument,
  9564. &lsquo;<samp><span class="samp">C</span></samp>&rsquo; denotes a tree code, &lsquo;<samp><span class="samp">E</span></samp>&rsquo; denotes an expression, &lsquo;<samp><span class="samp">L</span></samp>&rsquo;
  9565. denotes a programming language, &lsquo;<samp><span class="samp">O</span></samp>&rsquo; denotes a binary operator,
  9566. &lsquo;<samp><span class="samp">P</span></samp>&rsquo; denotes a function parameter, &lsquo;<samp><span class="samp">Q</span></samp>&rsquo; denotes an assignment
  9567. operator, &lsquo;<samp><span class="samp">V</span></samp>&rsquo; denotes a const/volatile qualifier.
  9568. <div class="node">
  9569. <a name="gfc-internal-format"></a>
  9570. <a name="gfc_002dinternal_002dformat"></a>
  9571. <p><hr>
  9572. Next:&nbsp;<a rel="next" accesskey="n" href="#qt_002dformat">qt-format</a>,
  9573. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gcc_002dinternal_002dformat">gcc-internal-format</a>,
  9574. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9575. </div>
  9576. <h4 class="subsection">15.3.19 GFC internal Format Strings</h4>
  9577. <p>These format strings are used inside the GNU Fortran Compiler sources,
  9578. that is, the Fortran frontend in the GCC sources. In such a format
  9579. string, a directive starts with &lsquo;<samp><span class="samp">%</span></samp>&rsquo; and is finished by a
  9580. specifier: &lsquo;<samp><span class="samp">%</span></samp>&rsquo; denotes a literal percent sign, &lsquo;<samp><span class="samp">C</span></samp>&rsquo; denotes the
  9581. current source location, &lsquo;<samp><span class="samp">L</span></samp>&rsquo; denotes a source location, &lsquo;<samp><span class="samp">c</span></samp>&rsquo;
  9582. denotes a character, &lsquo;<samp><span class="samp">s</span></samp>&rsquo; denotes a string, &lsquo;<samp><span class="samp">i</span></samp>&rsquo; and &lsquo;<samp><span class="samp">d</span></samp>&rsquo;
  9583. denote an integer, &lsquo;<samp><span class="samp">u</span></samp>&rsquo; denotes an unsigned integer. &lsquo;<samp><span class="samp">i</span></samp>&rsquo;,
  9584. &lsquo;<samp><span class="samp">d</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">u</span></samp>&rsquo; may be preceded by a size specifier &lsquo;<samp><span class="samp">l</span></samp>&rsquo;.
  9585. <div class="node">
  9586. <a name="qt-format"></a>
  9587. <a name="qt_002dformat"></a>
  9588. <p><hr>
  9589. Next:&nbsp;<a rel="next" accesskey="n" href="#qt_002dplural_002dformat">qt-plural-format</a>,
  9590. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gfc_002dinternal_002dformat">gfc-internal-format</a>,
  9591. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9592. </div>
  9593. <h4 class="subsection">15.3.20 Qt Format Strings</h4>
  9594. <p>Qt format strings are described in the documentation of the QString class
  9595. <a href="file:/usr/lib/qt-4.3.0/doc/html/qstring.html">file:/usr/lib/qt-4.3.0/doc/html/qstring.html</a>.
  9596. In summary, a directive consists of a &lsquo;<samp><span class="samp">%</span></samp>&rsquo; followed by a digit. The same
  9597. directive cannot occur more than once in a format string.
  9598. <div class="node">
  9599. <a name="qt-plural-format"></a>
  9600. <a name="qt_002dplural_002dformat"></a>
  9601. <p><hr>
  9602. Next:&nbsp;<a rel="next" accesskey="n" href="#kde_002dformat">kde-format</a>,
  9603. Previous:&nbsp;<a rel="previous" accesskey="p" href="#qt_002dformat">qt-format</a>,
  9604. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9605. </div>
  9606. <h4 class="subsection">15.3.21 Qt Format Strings</h4>
  9607. <p>Qt format strings are described in the documentation of the QObject::tr method
  9608. <a href="file:/usr/lib/qt-4.3.0/doc/html/qobject.html">file:/usr/lib/qt-4.3.0/doc/html/qobject.html</a>.
  9609. In summary, the only allowed directive is &lsquo;<samp><span class="samp">%n</span></samp>&rsquo;.
  9610. <div class="node">
  9611. <a name="kde-format"></a>
  9612. <a name="kde_002dformat"></a>
  9613. <p><hr>
  9614. Next:&nbsp;<a rel="next" accesskey="n" href="#boost_002dformat">boost-format</a>,
  9615. Previous:&nbsp;<a rel="previous" accesskey="p" href="#qt_002dplural_002dformat">qt-plural-format</a>,
  9616. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9617. </div>
  9618. <h4 class="subsection">15.3.22 KDE Format Strings</h4>
  9619. <p>KDE 4 format strings are defined as follows:
  9620. A directive consists of a &lsquo;<samp><span class="samp">%</span></samp>&rsquo; followed by a non-zero decimal number.
  9621. If a &lsquo;<samp><span class="samp">%n</span></samp>&rsquo; occurs in a format strings, all of &lsquo;<samp><span class="samp">%1</span></samp>&rsquo;, ..., &lsquo;<samp><span class="samp">%(n-1)</span></samp>&rsquo;
  9622. must occur as well, except possibly one of them.
  9623. <div class="node">
  9624. <a name="boost-format"></a>
  9625. <a name="boost_002dformat"></a>
  9626. <p><hr>
  9627. Previous:&nbsp;<a rel="previous" accesskey="p" href="#kde_002dformat">kde-format</a>,
  9628. Up:&nbsp;<a rel="up" accesskey="u" href="#Translators-for-other-Languages">Translators for other Languages</a>
  9629. </div>
  9630. <h4 class="subsection">15.3.23 Boost Format Strings</h4>
  9631. <p>Boost format strings are described in the documentation of the
  9632. <code>boost::format</code> class, at
  9633. <a href="http://www.boost.org/libs/format/doc/format.html">http://www.boost.org/libs/format/doc/format.html</a>.
  9634. In summary, a directive has either the same syntax as in a C format string,
  9635. such as &lsquo;<samp><span class="samp">%1$+5d</span></samp>&rsquo;, or may be surrounded by vertical bars, such as
  9636. &lsquo;<samp><span class="samp">%|1$+5d|</span></samp>&rsquo; or &lsquo;<samp><span class="samp">%|1$+5|</span></samp>&rsquo;, or consists of just an argument number
  9637. between percent signs, such as &lsquo;<samp><span class="samp">%1%</span></samp>&rsquo;.
  9638. <div class="node">
  9639. <a name="Maintainers-for-other-Languages"></a>
  9640. <p><hr>
  9641. Next:&nbsp;<a rel="next" accesskey="n" href="#List-of-Programming-Languages">List of Programming Languages</a>,
  9642. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Translators-for-other-Languages">Translators for other Languages</a>,
  9643. Up:&nbsp;<a rel="up" accesskey="u" href="#Programming-Languages">Programming Languages</a>
  9644. </div>
  9645. <h3 class="section">15.4 The Maintainer's View</h3>
  9646. <p>For the maintainer, the general procedure differs from the C language
  9647. case in two ways.
  9648. <ul>
  9649. <li>For those languages that don't use GNU gettext, the <samp><span class="file">intl/</span></samp> directory
  9650. is not needed and can be omitted. This means that the maintainer calls the
  9651. <code>gettextize</code> program without the &lsquo;<samp><span class="samp">--intl</span></samp>&rsquo; option, and that he
  9652. invokes the <code>AM_GNU_GETTEXT</code> autoconf macro via
  9653. &lsquo;<samp><span class="samp">AM_GNU_GETTEXT([external])</span></samp>&rsquo;.
  9654. <li>If only a single programming language is used, the <code>XGETTEXT_OPTIONS</code>
  9655. variable in <samp><span class="file">po/Makevars</span></samp> (see <a href="#po_002fMakevars">po/Makevars</a>) should be adjusted to
  9656. match the <code>xgettext</code> options for that particular programming language.
  9657. If the package uses more than one programming language with <code>gettext</code>
  9658. support, it becomes necessary to change the POT file construction rule
  9659. in <samp><span class="file">po/Makefile.in.in</span></samp>. It is recommended to make one <code>xgettext</code>
  9660. invocation per programming language, each with the options appropriate for
  9661. that language, and to combine the resulting files using <code>msgcat</code>.
  9662. </ul>
  9663. <div class="node">
  9664. <a name="List-of-Programming-Languages"></a>
  9665. <p><hr>
  9666. Next:&nbsp;<a rel="next" accesskey="n" href="#List-of-Data-Formats">List of Data Formats</a>,
  9667. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Maintainers-for-other-Languages">Maintainers for other Languages</a>,
  9668. Up:&nbsp;<a rel="up" accesskey="u" href="#Programming-Languages">Programming Languages</a>
  9669. </div>
  9670. <h3 class="section">15.5 Individual Programming Languages</h3>
  9671. <!-- Here is a list of programming languages, as used for Free Software projects -->
  9672. <!-- on SourceForge/Freshmeat, as of February 2002. Those supported by gettext -->
  9673. <!-- are marked with a star. -->
  9674. <!-- C 3580 * -->
  9675. <!-- Perl 1911 * -->
  9676. <!-- C++ 1379 * -->
  9677. <!-- Java 1200 * -->
  9678. <!-- PHP 1051 * -->
  9679. <!-- Python 613 * -->
  9680. <!-- Unix Shell 357 * -->
  9681. <!-- Tcl 266 * -->
  9682. <!-- SQL 174 -->
  9683. <!-- JavaScript 118 -->
  9684. <!-- Assembly 108 -->
  9685. <!-- Scheme 51 -->
  9686. <!-- Ruby 47 -->
  9687. <!-- Lisp 45 * -->
  9688. <!-- Objective C 39 * -->
  9689. <!-- PL/SQL 29 -->
  9690. <!-- Fortran 25 -->
  9691. <!-- Ada 24 -->
  9692. <!-- Delphi 22 -->
  9693. <!-- Awk 19 * -->
  9694. <!-- Pascal 19 -->
  9695. <!-- ML 19 -->
  9696. <!-- Eiffel 17 -->
  9697. <!-- Emacs-Lisp 14 * -->
  9698. <!-- Zope 14 -->
  9699. <!-- ASP 12 -->
  9700. <!-- Forth 12 -->
  9701. <!-- Cold Fusion 10 -->
  9702. <!-- Haskell 9 -->
  9703. <!-- Visual Basic 9 -->
  9704. <!-- C# 6 * -->
  9705. <!-- Smalltalk 6 * -->
  9706. <!-- Basic 5 -->
  9707. <!-- Erlang 5 -->
  9708. <!-- Modula 5 -->
  9709. <!-- Object Pascal 5 * -->
  9710. <!-- Rexx 5 -->
  9711. <!-- Dylan 4 -->
  9712. <!-- Prolog 4 -->
  9713. <!-- APL 3 -->
  9714. <!-- PROGRESS 2 -->
  9715. <!-- Euler 1 -->
  9716. <!-- Euphoria 1 -->
  9717. <!-- Pliant 1 -->
  9718. <!-- Simula 1 -->
  9719. <!-- XBasic 1 -->
  9720. <!-- Logo 0 -->
  9721. <!-- Other Scripting Engines 49 -->
  9722. <!-- Other 116 -->
  9723. <ul class="menu">
  9724. <li><a accesskey="1" href="#C">C</a>: C, C++, Objective C
  9725. <li><a accesskey="2" href="#sh">sh</a>: sh - Shell Script
  9726. <li><a accesskey="3" href="#bash">bash</a>: bash - Bourne-Again Shell Script
  9727. <li><a accesskey="4" href="#Python">Python</a>: Python
  9728. <li><a accesskey="5" href="#Common-Lisp">Common Lisp</a>: GNU clisp - Common Lisp
  9729. <li><a accesskey="6" href="#clisp-C">clisp C</a>: GNU clisp C sources
  9730. <li><a accesskey="7" href="#Emacs-Lisp">Emacs Lisp</a>: Emacs Lisp
  9731. <li><a accesskey="8" href="#librep">librep</a>: librep
  9732. <li><a accesskey="9" href="#Scheme">Scheme</a>: GNU guile - Scheme
  9733. <li><a href="#Smalltalk">Smalltalk</a>: GNU Smalltalk
  9734. <li><a href="#Java">Java</a>: Java
  9735. <li><a href="#C_0023">C#</a>: C#
  9736. <li><a href="#gawk">gawk</a>: GNU awk
  9737. <li><a href="#Pascal">Pascal</a>: Pascal - Free Pascal Compiler
  9738. <li><a href="#wxWidgets">wxWidgets</a>: wxWidgets library
  9739. <li><a href="#YCP">YCP</a>: YCP - YaST2 scripting language
  9740. <li><a href="#Tcl">Tcl</a>: Tcl - Tk's scripting language
  9741. <li><a href="#Perl">Perl</a>: Perl
  9742. <li><a href="#PHP">PHP</a>: PHP Hypertext Preprocessor
  9743. <li><a href="#Pike">Pike</a>: Pike
  9744. <li><a href="#GCC_002dsource">GCC-source</a>: GNU Compiler Collection sources
  9745. </ul>
  9746. <div class="node">
  9747. <a name="C"></a>
  9748. <p><hr>
  9749. Next:&nbsp;<a rel="next" accesskey="n" href="#sh">sh</a>,
  9750. Previous:&nbsp;<a rel="previous" accesskey="p" href="#List-of-Programming-Languages">List of Programming Languages</a>,
  9751. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  9752. </div>
  9753. <h4 class="subsection">15.5.1 C, C++, Objective C</h4>
  9754. <p><a name="index-C-and-C_002dlike-languages-1174"></a>
  9755. <dl>
  9756. <dt>RPMs<dd>gcc, gpp, gobjc, glibc, gettext
  9757. <br><dt>File extension<dd>For C: <code>c</code>, <code>h</code>.
  9758. <br>For C++: <code>C</code>, <code>c++</code>, <code>cc</code>, <code>cxx</code>, <code>cpp</code>, <code>hpp</code>.
  9759. <br>For Objective C: <code>m</code>.
  9760. <br><dt>String syntax<dd><code>"abc"</code>
  9761. <br><dt>gettext shorthand<dd><code>_("abc")</code>
  9762. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>dgettext</code>, <code>dcgettext</code>, <code>ngettext</code>,
  9763. <code>dngettext</code>, <code>dcngettext</code>
  9764. <br><dt>textdomain<dd><code>textdomain</code> function
  9765. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  9766. <br><dt>setlocale<dd>Programmer must call <code>setlocale (LC_ALL, "")</code>
  9767. <br><dt>Prerequisite<dd><code>#include &lt;libintl.h&gt;</code>
  9768. <br><code>#include &lt;locale.h&gt;</code>
  9769. <br><code>#define _(string) gettext (string)</code>
  9770. <br><dt>Use or emulate GNU gettext<dd>Use
  9771. <br><dt>Extractor<dd><code>xgettext -k_</code>
  9772. <br><dt>Formatting with positions<dd><code>fprintf "%2$d %1$d"</code>
  9773. <br>In C++: <code>autosprintf "%2$d %1$d"</code>
  9774. (see <a href="autosprintf.html#Top">Introduction</a>)
  9775. <br><dt>Portability<dd>autoconf (gettext.m4) and #if ENABLE_NLS
  9776. <br><dt>po-mode marking<dd>yes
  9777. </dl>
  9778. <p>The following examples are available in the <samp><span class="file">examples</span></samp> directory:
  9779. <code>hello-c</code>, <code>hello-c-gnome</code>, <code>hello-c++</code>, <code>hello-c++-qt</code>,
  9780. <code>hello-c++-kde</code>, <code>hello-c++-gnome</code>, <code>hello-c++-wxwidgets</code>,
  9781. <code>hello-objc</code>, <code>hello-objc-gnustep</code>, <code>hello-objc-gnome</code>.
  9782. <div class="node">
  9783. <a name="sh"></a>
  9784. <p><hr>
  9785. Next:&nbsp;<a rel="next" accesskey="n" href="#bash">bash</a>,
  9786. Previous:&nbsp;<a rel="previous" accesskey="p" href="#C">C</a>,
  9787. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  9788. </div>
  9789. <h4 class="subsection">15.5.2 sh - Shell Script</h4>
  9790. <p><a name="index-shell-scripts-1175"></a>
  9791. <dl>
  9792. <dt>RPMs<dd>bash, gettext
  9793. <br><dt>File extension<dd><code>sh</code>
  9794. <br><dt>String syntax<dd><code>"abc"</code>, <code>'abc'</code>, <code>abc</code>
  9795. <br><dt>gettext shorthand<dd><code>"`gettext \"abc\"`"</code>
  9796. <br><dt>gettext/ngettext functions<dd><a name="index-gettext-1176"></a><a name="index-ngettext-1177"></a><code>gettext</code>, <code>ngettext</code> programs
  9797. <br><code>eval_gettext</code>, <code>eval_ngettext</code> shell functions
  9798. <br><dt>textdomain<dd><a name="index-TEXTDOMAIN_0040r_007b_002c-environment-variable_007d-1178"></a>environment variable <code>TEXTDOMAIN</code>
  9799. <br><dt>bindtextdomain<dd><a name="index-TEXTDOMAINDIR_0040r_007b_002c-environment-variable_007d-1179"></a>environment variable <code>TEXTDOMAINDIR</code>
  9800. <br><dt>setlocale<dd>automatic
  9801. <br><dt>Prerequisite<dd><code>. gettext.sh</code>
  9802. <br><dt>Use or emulate GNU gettext<dd>use
  9803. <br><dt>Extractor<dd><code>xgettext</code>
  9804. <br><dt>Formatting with positions<dd>&mdash;
  9805. <br><dt>Portability<dd>fully portable
  9806. <br><dt>po-mode marking<dd>&mdash;
  9807. </dl>
  9808. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-sh</code>.
  9809. <ul class="menu">
  9810. <li><a accesskey="1" href="#Preparing-Shell-Scripts">Preparing Shell Scripts</a>: Preparing Shell Scripts for Internationalization
  9811. <li><a accesskey="2" href="#gettext_002esh">gettext.sh</a>: Contents of <code>gettext.sh</code>
  9812. <li><a accesskey="3" href="#gettext-Invocation">gettext Invocation</a>: Invoking the <code>gettext</code> program
  9813. <li><a accesskey="4" href="#ngettext-Invocation">ngettext Invocation</a>: Invoking the <code>ngettext</code> program
  9814. <li><a accesskey="5" href="#envsubst-Invocation">envsubst Invocation</a>: Invoking the <code>envsubst</code> program
  9815. <li><a accesskey="6" href="#eval_005fgettext-Invocation">eval_gettext Invocation</a>: Invoking the <code>eval_gettext</code> function
  9816. <li><a accesskey="7" href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a>: Invoking the <code>eval_ngettext</code> function
  9817. </ul>
  9818. <div class="node">
  9819. <a name="Preparing-Shell-Scripts"></a>
  9820. <p><hr>
  9821. Next:&nbsp;<a rel="next" accesskey="n" href="#gettext_002esh">gettext.sh</a>,
  9822. Previous:&nbsp;<a rel="previous" accesskey="p" href="#sh">sh</a>,
  9823. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  9824. </div>
  9825. <h5 class="subsubsection">15.5.2.1 Preparing Shell Scripts for Internationalization</h5>
  9826. <p><a name="index-preparing-shell-scripts-for-translation-1180"></a>
  9827. Preparing a shell script for internationalization is conceptually similar
  9828. to the steps described in <a href="#Sources">Sources</a>. The concrete steps for shell
  9829. scripts are as follows.
  9830. <ol type=1 start=1>
  9831. <li>Insert the line
  9832. <pre class="smallexample"> . gettext.sh
  9833. </pre>
  9834. <p>near the top of the script. <code>gettext.sh</code> is a shell function library
  9835. that provides the functions
  9836. <code>eval_gettext</code> (see <a href="#eval_005fgettext-Invocation">eval_gettext Invocation</a>) and
  9837. <code>eval_ngettext</code> (see <a href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a>).
  9838. You have to ensure that <code>gettext.sh</code> can be found in the <code>PATH</code>.
  9839. <li>Set and export the <code>TEXTDOMAIN</code> and <code>TEXTDOMAINDIR</code> environment
  9840. variables. Usually <code>TEXTDOMAIN</code> is the package or program name, and
  9841. <code>TEXTDOMAINDIR</code> is the absolute pathname corresponding to
  9842. <code>$prefix/share/locale</code>, where <code>$prefix</code> is the installation location.
  9843. <pre class="smallexample"> TEXTDOMAIN=@PACKAGE@
  9844. export TEXTDOMAIN
  9845. TEXTDOMAINDIR=@LOCALEDIR@
  9846. export TEXTDOMAINDIR
  9847. </pre>
  9848. <li>Prepare the strings for translation, as described in <a href="#Preparing-Strings">Preparing Strings</a>.
  9849. <li>Simplify translatable strings so that they don't contain command substitution
  9850. (<code>"`...`"</code> or <code>"$(...)"</code>), variable access with defaulting (like
  9851. <code>${</code><var>variable</var><code>-</code><var>default</var><code>}</code>), access to positional arguments
  9852. (like <code>$0</code>, <code>$1</code>, ...) or highly volatile shell variables (like
  9853. <code>$?</code>). This can always be done through simple local code restructuring.
  9854. For example,
  9855. <pre class="smallexample"> echo "Usage: $0 [OPTION] FILE..."
  9856. </pre>
  9857. <p>becomes
  9858. <pre class="smallexample"> program_name=$0
  9859. echo "Usage: $program_name [OPTION] FILE..."
  9860. </pre>
  9861. <p>Similarly,
  9862. <pre class="smallexample"> echo "Remaining files: `ls | wc -l`"
  9863. </pre>
  9864. <p>becomes
  9865. <pre class="smallexample"> filecount="`ls | wc -l`"
  9866. echo "Remaining files: $filecount"
  9867. </pre>
  9868. <li>For each translatable string, change the output command &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; or
  9869. &lsquo;<samp><span class="samp">$echo</span></samp>&rsquo; to &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; (if the string contains no references to
  9870. shell variables) or to &lsquo;<samp><span class="samp">eval_gettext</span></samp>&rsquo; (if it refers to shell variables),
  9871. followed by a no-argument &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; command (to account for the terminating
  9872. newline). Similarly, for cases with plural handling, replace a conditional
  9873. &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; command with an invocation of &lsquo;<samp><span class="samp">ngettext</span></samp>&rsquo; or
  9874. &lsquo;<samp><span class="samp">eval_ngettext</span></samp>&rsquo;, followed by a no-argument &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; command.
  9875. <p>When doing this, you also need to add an extra backslash before the dollar
  9876. sign in references to shell variables, so that the &lsquo;<samp><span class="samp">eval_gettext</span></samp>&rsquo;
  9877. function receives the translatable string before the variable values are
  9878. substituted into it. For example,
  9879. <pre class="smallexample"> echo "Remaining files: $filecount"
  9880. </pre>
  9881. <p>becomes
  9882. <pre class="smallexample"> eval_gettext "Remaining files: \$filecount"; echo
  9883. </pre>
  9884. <p>If the output command is not &lsquo;<samp><span class="samp">echo</span></samp>&rsquo;, you can make it use &lsquo;<samp><span class="samp">echo</span></samp>&rsquo;
  9885. nevertheless, through the use of backquotes. However, note that inside
  9886. backquotes, backslashes must be doubled to be effective (because the
  9887. backquoting eats one level of backslashes). For example, assuming that
  9888. &lsquo;<samp><span class="samp">error</span></samp>&rsquo; is a shell function that signals an error,
  9889. <pre class="smallexample"> error "file not found: $filename"
  9890. </pre>
  9891. <p>is first transformed into
  9892. <pre class="smallexample"> error "`echo \"file not found: \$filename\"`"
  9893. </pre>
  9894. <p>which then becomes
  9895. <pre class="smallexample"> error "`eval_gettext \"file not found: \\\$filename\"`"
  9896. </pre>
  9897. </ol>
  9898. <div class="node">
  9899. <a name="gettext.sh"></a>
  9900. <a name="gettext_002esh"></a>
  9901. <p><hr>
  9902. Next:&nbsp;<a rel="next" accesskey="n" href="#gettext-Invocation">gettext Invocation</a>,
  9903. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Preparing-Shell-Scripts">Preparing Shell Scripts</a>,
  9904. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  9905. </div>
  9906. <h5 class="subsubsection">15.5.2.2 Contents of <code>gettext.sh</code></h5>
  9907. <p><code>gettext.sh</code>, contained in the run-time package of GNU gettext, provides
  9908. the following:
  9909. <ul>
  9910. <li>$echo
  9911. The variable <code>echo</code> is set to a command that outputs its first argument
  9912. and a newline, without interpreting backslashes in the argument string.
  9913. <li>eval_gettext
  9914. See <a href="#eval_005fgettext-Invocation">eval_gettext Invocation</a>.
  9915. <li>eval_ngettext
  9916. See <a href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a>.
  9917. </ul>
  9918. <div class="node">
  9919. <a name="gettext-Invocation"></a>
  9920. <p><hr>
  9921. Next:&nbsp;<a rel="next" accesskey="n" href="#ngettext-Invocation">ngettext Invocation</a>,
  9922. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gettext_002esh">gettext.sh</a>,
  9923. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  9924. </div>
  9925. <h5 class="subsubsection">15.5.2.3 Invoking the <code>gettext</code> program</h5>
  9926. <p><a name="index-gettext-1181"></a><a name="index-g_t_0040code_007bgettext_007d-program_002c-usage-1182"></a>
  9927. <pre class="example"> gettext [<var>option</var>] [[<var>textdomain</var>] <var>msgid</var>]
  9928. gettext [<var>option</var>] -s [<var>msgid</var>]...
  9929. </pre>
  9930. <p><a name="index-lookup-message-translation-1183"></a>The <code>gettext</code> program displays the native language translation of a
  9931. textual message.
  9932. <p class="noindent"><strong>Arguments</strong>
  9933. <dl>
  9934. <dt>&lsquo;<samp><span class="samp">-d </span><var>textdomain</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--domain=</span><var>textdomain</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1184"></a><a name="index-g_t_002d_002ddomain_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1185"></a>Retrieve translated messages from <var>textdomain</var>. Usually a <var>textdomain</var>
  9935. corresponds to a package, a program, or a module of a program.
  9936. <br><dt>&lsquo;<samp><span class="samp">-e</span></samp>&rsquo;<dd><a name="index-g_t_002de_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1186"></a>Enable expansion of some escape sequences. This option is for compatibility
  9937. with the &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; program or shell built-in. The escape sequences
  9938. &lsquo;<samp><span class="samp">\a</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\b</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\c</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\f</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\n</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\r</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\t</span></samp>&rsquo;,
  9939. &lsquo;<samp><span class="samp">\v</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\\</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">\</span></samp>&rsquo; followed by one to three octal digits, are
  9940. interpreted like the System V &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; program did.
  9941. <br><dt>&lsquo;<samp><span class="samp">-E</span></samp>&rsquo;<dd><a name="index-g_t_002dE_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1187"></a>This option is only for compatibility with the &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; program or shell
  9942. built-in. It has no effect.
  9943. <br><dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1188"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1189"></a>Display this help and exit.
  9944. <br><dt>&lsquo;<samp><span class="samp">-n</span></samp>&rsquo;<dd><a name="index-g_t_002dn_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1190"></a>Suppress trailing newline. By default, <code>gettext</code> adds a newline to
  9945. the output.
  9946. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1191"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1192"></a>Output version information and exit.
  9947. <br><dt>&lsquo;<samp><span class="samp">[</span><var>textdomain</var><span class="samp">] </span><var>msgid</var></samp>&rsquo;<dd>Retrieve translated message corresponding to <var>msgid</var> from <var>textdomain</var>.
  9948. </dl>
  9949. <p>If the <var>textdomain</var> parameter is not given, the domain is determined from
  9950. the environment variable <code>TEXTDOMAIN</code>. If the message catalog is not
  9951. found in the regular directory, another location can be specified with the
  9952. environment variable <code>TEXTDOMAINDIR</code>.
  9953. <p>When used with the <code>-s</code> option the program behaves like the &lsquo;<samp><span class="samp">echo</span></samp>&rsquo;
  9954. command. But it does not simply copy its arguments to stdout. Instead those
  9955. messages found in the selected catalog are translated.
  9956. <p>Note: <code>xgettext</code> supports only the one-argument form of the
  9957. <code>gettext</code> invocation, where no options are present and the
  9958. <var>textdomain</var> is implicit, from the environment.
  9959. <div class="node">
  9960. <a name="ngettext-Invocation"></a>
  9961. <p><hr>
  9962. Next:&nbsp;<a rel="next" accesskey="n" href="#envsubst-Invocation">envsubst Invocation</a>,
  9963. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gettext-Invocation">gettext Invocation</a>,
  9964. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  9965. </div>
  9966. <h5 class="subsubsection">15.5.2.4 Invoking the <code>ngettext</code> program</h5>
  9967. <p><a name="index-ngettext-1193"></a><a name="index-g_t_0040code_007bngettext_007d-program_002c-usage-1194"></a>
  9968. <pre class="example"> ngettext [<var>option</var>] [<var>textdomain</var>] <var>msgid</var> <var>msgid-plural</var> <var>count</var>
  9969. </pre>
  9970. <p><a name="index-lookup-plural-message-translation-1195"></a>The <code>ngettext</code> program displays the native language translation of a
  9971. textual message whose grammatical form depends on a number.
  9972. <p class="noindent"><strong>Arguments</strong>
  9973. <dl>
  9974. <dt>&lsquo;<samp><span class="samp">-d </span><var>textdomain</var></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--domain=</span><var>textdomain</var></samp>&rsquo;<dd><a name="index-g_t_002dd_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1196"></a><a name="index-g_t_002d_002ddomain_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1197"></a>Retrieve translated messages from <var>textdomain</var>. Usually a <var>textdomain</var>
  9975. corresponds to a package, a program, or a module of a program.
  9976. <br><dt>&lsquo;<samp><span class="samp">-e</span></samp>&rsquo;<dd><a name="index-g_t_002de_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1198"></a>Enable expansion of some escape sequences. This option is for compatibility
  9977. with the &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; program. The escape sequences
  9978. &lsquo;<samp><span class="samp">\a</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\b</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\c</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\f</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\n</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\r</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\t</span></samp>&rsquo;,
  9979. &lsquo;<samp><span class="samp">\v</span></samp>&rsquo;, &lsquo;<samp><span class="samp">\\</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">\</span></samp>&rsquo; followed by one to three octal digits, are
  9980. interpreted like the System V &lsquo;<samp><span class="samp">echo</span></samp>&rsquo; program did.
  9981. <br><dt>&lsquo;<samp><span class="samp">-E</span></samp>&rsquo;<dd><a name="index-g_t_002dE_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1199"></a>This option is only for compatibility with the &lsquo;<samp><span class="samp">gettext</span></samp>&rsquo; program. It has
  9982. no effect.
  9983. <br><dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1200"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1201"></a>Display this help and exit.
  9984. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1202"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1203"></a>Output version information and exit.
  9985. <br><dt>&lsquo;<samp><var>textdomain</var></samp>&rsquo;<dd>Retrieve translated message from <var>textdomain</var>.
  9986. <br><dt>&lsquo;<samp><var>msgid</var> <var>msgid-plural</var></samp>&rsquo;<dd>Translate <var>msgid</var> (English singular) / <var>msgid-plural</var> (English plural).
  9987. <br><dt>&lsquo;<samp><var>count</var></samp>&rsquo;<dd>Choose singular/plural form based on this value.
  9988. </dl>
  9989. <p>If the <var>textdomain</var> parameter is not given, the domain is determined from
  9990. the environment variable <code>TEXTDOMAIN</code>. If the message catalog is not
  9991. found in the regular directory, another location can be specified with the
  9992. environment variable <code>TEXTDOMAINDIR</code>.
  9993. <p>Note: <code>xgettext</code> supports only the three-arguments form of the
  9994. <code>ngettext</code> invocation, where no options are present and the
  9995. <var>textdomain</var> is implicit, from the environment.
  9996. <div class="node">
  9997. <a name="envsubst-Invocation"></a>
  9998. <p><hr>
  9999. Next:&nbsp;<a rel="next" accesskey="n" href="#eval_005fgettext-Invocation">eval_gettext Invocation</a>,
  10000. Previous:&nbsp;<a rel="previous" accesskey="p" href="#ngettext-Invocation">ngettext Invocation</a>,
  10001. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  10002. </div>
  10003. <h5 class="subsubsection">15.5.2.5 Invoking the <code>envsubst</code> program</h5>
  10004. <p><a name="index-envsubst-1204"></a><a name="index-g_t_0040code_007benvsubst_007d-program_002c-usage-1205"></a>
  10005. <pre class="example"> envsubst [<var>option</var>] [<var>shell-format</var>]
  10006. </pre>
  10007. <p><a name="index-shell-format-string-1206"></a><a name="index-dollar-substitution-1207"></a><a name="index-environment-variables-1208"></a>The <code>envsubst</code> program substitutes the values of environment variables.
  10008. <p class="noindent"><strong>Operation mode</strong>
  10009. <dl>
  10010. <dt>&lsquo;<samp><span class="samp">-v</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--variables</span></samp>&rsquo;<dd><a name="index-g_t_002dv_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1209"></a><a name="index-g_t_002d_002dvariables_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1210"></a>Output the variables occurring in <var>shell-format</var>.
  10011. </dl>
  10012. <p class="noindent"><strong>Informative output</strong>
  10013. <dl>
  10014. <dt>&lsquo;<samp><span class="samp">-h</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--help</span></samp>&rsquo;<dd><a name="index-g_t_002dh_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1211"></a><a name="index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1212"></a>Display this help and exit.
  10015. <br><dt>&lsquo;<samp><span class="samp">-V</span></samp>&rsquo;<dt>&lsquo;<samp><span class="samp">--version</span></samp>&rsquo;<dd><a name="index-g_t_002dV_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1213"></a><a name="index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1214"></a>Output version information and exit.
  10016. </dl>
  10017. <p>In normal operation mode, standard input is copied to standard output,
  10018. with references to environment variables of the form <code>$VARIABLE</code> or
  10019. <code>${VARIABLE}</code> being replaced with the corresponding values. If a
  10020. <var>shell-format</var> is given, only those environment variables that are
  10021. referenced in <var>shell-format</var> are substituted; otherwise all environment
  10022. variables references occurring in standard input are substituted.
  10023. <p>These substitutions are a subset of the substitutions that a shell performs
  10024. on unquoted and double-quoted strings. Other kinds of substitutions done
  10025. by a shell, such as <code>${</code><var>variable</var><code>-</code><var>default</var><code>}</code> or
  10026. <code>$(</code><var>command-list</var><code>)</code> or <code>`</code><var>command-list</var><code>`</code>, are not performed
  10027. by the <code>envsubst</code> program, due to security reasons.
  10028. <p>When <code>--variables</code> is used, standard input is ignored, and the output
  10029. consists of the environment variables that are referenced in
  10030. <var>shell-format</var>, one per line.
  10031. <div class="node">
  10032. <a name="eval_gettext-Invocation"></a>
  10033. <a name="eval_005fgettext-Invocation"></a>
  10034. <p><hr>
  10035. Next:&nbsp;<a rel="next" accesskey="n" href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a>,
  10036. Previous:&nbsp;<a rel="previous" accesskey="p" href="#envsubst-Invocation">envsubst Invocation</a>,
  10037. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  10038. </div>
  10039. <h5 class="subsubsection">15.5.2.6 Invoking the <code>eval_gettext</code> function</h5>
  10040. <p><a name="index-g_t_0040code_007beval_005fgettext_007d-function_002c-usage-1215"></a>
  10041. <pre class="example"> eval_gettext <var>msgid</var>
  10042. </pre>
  10043. <p><a name="index-lookup-message-translation-1216"></a>This function outputs the native language translation of a textual message,
  10044. performing dollar-substitution on the result. Note that only shell variables
  10045. mentioned in <var>msgid</var> will be dollar-substituted in the result.
  10046. <div class="node">
  10047. <a name="eval_ngettext-Invocation"></a>
  10048. <a name="eval_005fngettext-Invocation"></a>
  10049. <p><hr>
  10050. Previous:&nbsp;<a rel="previous" accesskey="p" href="#eval_005fgettext-Invocation">eval_gettext Invocation</a>,
  10051. Up:&nbsp;<a rel="up" accesskey="u" href="#sh">sh</a>
  10052. </div>
  10053. <h5 class="subsubsection">15.5.2.7 Invoking the <code>eval_ngettext</code> function</h5>
  10054. <p><a name="index-g_t_0040code_007beval_005fngettext_007d-function_002c-usage-1217"></a>
  10055. <pre class="example"> eval_ngettext <var>msgid</var> <var>msgid-plural</var> <var>count</var>
  10056. </pre>
  10057. <p><a name="index-lookup-plural-message-translation-1218"></a>This function outputs the native language translation of a textual message
  10058. whose grammatical form depends on a number, performing dollar-substitution
  10059. on the result. Note that only shell variables mentioned in <var>msgid</var> or
  10060. <var>msgid-plural</var> will be dollar-substituted in the result.
  10061. <div class="node">
  10062. <a name="bash"></a>
  10063. <p><hr>
  10064. Next:&nbsp;<a rel="next" accesskey="n" href="#Python">Python</a>,
  10065. Previous:&nbsp;<a rel="previous" accesskey="p" href="#sh">sh</a>,
  10066. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10067. </div>
  10068. <h4 class="subsection">15.5.3 bash - Bourne-Again Shell Script</h4>
  10069. <p><a name="index-bash-1219"></a>
  10070. GNU <code>bash</code> 2.0 or newer has a special shorthand for translating a
  10071. string and substituting variable values in it: <code>$"msgid"</code>. But
  10072. the use of this construct is <strong>discouraged</strong>, due to the security
  10073. holes it opens and due to its portability problems.
  10074. <p>The security holes of <code>$"..."</code> come from the fact that after looking up
  10075. the translation of the string, <code>bash</code> processes it like it processes
  10076. any double-quoted string: dollar and backquote processing, like &lsquo;<samp><span class="samp">eval</span></samp>&rsquo;
  10077. does.
  10078. <ol type=1 start=1>
  10079. <li>In a locale whose encoding is one of BIG5, BIG5-HKSCS, GBK, GB18030, SHIFT_JIS,
  10080. JOHAB, some double-byte characters have a second byte whose value is
  10081. <code>0x60</code>. For example, the byte sequence <code>\xe0\x60</code> is a single
  10082. character in these locales. Many versions of <code>bash</code> (all versions
  10083. up to bash-2.05, and newer versions on platforms without <code>mbsrtowcs()</code>
  10084. function) don't know about character boundaries and see a backquote character
  10085. where there is only a particular Chinese character. Thus it can start
  10086. executing part of the translation as a command list. This situation can occur
  10087. even without the translator being aware of it: if the translator provides
  10088. translations in the UTF-8 encoding, it is the <code>gettext()</code> function which
  10089. will, during its conversion from the translator's encoding to the user's
  10090. locale's encoding, produce the dangerous <code>\x60</code> bytes.
  10091. <li>A translator could - voluntarily or inadvertently - use backquotes
  10092. <code>"`...`"</code> or dollar-parentheses <code>"$(...)"</code> in her translations.
  10093. The enclosed strings would be executed as command lists by the shell.
  10094. </ol>
  10095. <p>The portability problem is that <code>bash</code> must be built with
  10096. internationalization support; this is normally not the case on systems
  10097. that don't have the <code>gettext()</code> function in libc.
  10098. <div class="node">
  10099. <a name="Python"></a>
  10100. <p><hr>
  10101. Next:&nbsp;<a rel="next" accesskey="n" href="#Common-Lisp">Common Lisp</a>,
  10102. Previous:&nbsp;<a rel="previous" accesskey="p" href="#bash">bash</a>,
  10103. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10104. </div>
  10105. <h4 class="subsection">15.5.4 Python</h4>
  10106. <p><a name="index-Python-1220"></a>
  10107. <dl>
  10108. <dt>RPMs<dd>python
  10109. <br><dt>File extension<dd><code>py</code>
  10110. <br><dt>String syntax<dd><code>'abc'</code>, <code>u'abc'</code>, <code>r'abc'</code>, <code>ur'abc'</code>,
  10111. <br><code>"abc"</code>, <code>u"abc"</code>, <code>r"abc"</code>, <code>ur"abc"</code>,
  10112. <br><code>'''abc'''</code>, <code>u'''abc'''</code>, <code>r'''abc'''</code>, <code>ur'''abc'''</code>,
  10113. <br><code>"""abc"""</code>, <code>u"""abc"""</code>, <code>r"""abc"""</code>, <code>ur"""abc"""</code>
  10114. <br><dt>gettext shorthand<dd><code>_('abc')</code> etc.
  10115. <br><dt>gettext/ngettext functions<dd><code>gettext.gettext</code>, <code>gettext.dgettext</code>,
  10116. <code>gettext.ngettext</code>, <code>gettext.dngettext</code>,
  10117. also <code>ugettext</code>, <code>ungettext</code>
  10118. <br><dt>textdomain<dd><code>gettext.textdomain</code> function, or
  10119. <code>gettext.install(</code><var>domain</var><code>)</code> function
  10120. <br><dt>bindtextdomain<dd><code>gettext.bindtextdomain</code> function, or
  10121. <code>gettext.install(</code><var>domain</var><code>,</code><var>localedir</var><code>)</code> function
  10122. <br><dt>setlocale<dd>not used by the gettext emulation
  10123. <br><dt>Prerequisite<dd><code>import gettext</code>
  10124. <br><dt>Use or emulate GNU gettext<dd>emulate
  10125. <br><dt>Extractor<dd><code>xgettext</code>
  10126. <br><dt>Formatting with positions<dd><code>'...%(ident)d...' % { 'ident': value }</code>
  10127. <br><dt>Portability<dd>fully portable
  10128. <br><dt>po-mode marking<dd>&mdash;
  10129. </dl>
  10130. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-python</code>.
  10131. <p>A note about format strings: Python supports format strings with unnamed
  10132. arguments, such as <code>'...%d...'</code>, and format strings with named arguments,
  10133. such as <code>'...%(ident)d...'</code>. The latter are preferable for
  10134. internationalized programs, for two reasons:
  10135. <ul>
  10136. <li>When a format string takes more than one argument, the translator can provide
  10137. a translation that uses the arguments in a different order, if the format
  10138. string uses named arguments. For example, the translator can reformulate
  10139. <pre class="smallexample"> "'%(volume)s' has only %(freespace)d bytes free."
  10140. </pre>
  10141. <p class="noindent">to
  10142. <pre class="smallexample"> "Only %(freespace)d bytes free on '%(volume)s'."
  10143. </pre>
  10144. <p class="noindent">Additionally, the identifiers also provide some context to the translator.
  10145. <li>In the context of plural forms, the format string used for the singular form
  10146. does not use the numeric argument in many languages. Even in English, one
  10147. prefers to write <code>"one hour"</code> instead of <code>"1 hour"</code>. Omitting
  10148. individual arguments from format strings like this is only possible with
  10149. the named argument syntax. (With unnamed arguments, Python &ndash; unlike C &ndash;
  10150. verifies that the format string uses all supplied arguments.)
  10151. </ul>
  10152. <div class="node">
  10153. <a name="Common-Lisp"></a>
  10154. <p><hr>
  10155. Next:&nbsp;<a rel="next" accesskey="n" href="#clisp-C">clisp C</a>,
  10156. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Python">Python</a>,
  10157. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10158. </div>
  10159. <h4 class="subsection">15.5.5 GNU clisp - Common Lisp</h4>
  10160. <p><a name="index-Common-Lisp-1221"></a><a name="index-Lisp-1222"></a><a name="index-clisp-1223"></a>
  10161. <dl>
  10162. <dt>RPMs<dd>clisp 2.28 or newer
  10163. <br><dt>File extension<dd><code>lisp</code>
  10164. <br><dt>String syntax<dd><code>"abc"</code>
  10165. <br><dt>gettext shorthand<dd><code>(_ "abc")</code>, <code>(ENGLISH "abc")</code>
  10166. <br><dt>gettext/ngettext functions<dd><code>i18n:gettext</code>, <code>i18n:ngettext</code>
  10167. <br><dt>textdomain<dd><code>i18n:textdomain</code>
  10168. <br><dt>bindtextdomain<dd><code>i18n:textdomaindir</code>
  10169. <br><dt>setlocale<dd>automatic
  10170. <br><dt>Prerequisite<dd>&mdash;
  10171. <br><dt>Use or emulate GNU gettext<dd>use
  10172. <br><dt>Extractor<dd><code>xgettext -k_ -kENGLISH</code>
  10173. <br><dt>Formatting with positions<dd><code>format "~1@*~D ~0@*~D"</code>
  10174. <br><dt>Portability<dd>On platforms without gettext, no translation.
  10175. <br><dt>po-mode marking<dd>&mdash;
  10176. </dl>
  10177. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-clisp</code>.
  10178. <div class="node">
  10179. <a name="clisp-C"></a>
  10180. <p><hr>
  10181. Next:&nbsp;<a rel="next" accesskey="n" href="#Emacs-Lisp">Emacs Lisp</a>,
  10182. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Common-Lisp">Common Lisp</a>,
  10183. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10184. </div>
  10185. <h4 class="subsection">15.5.6 GNU clisp C sources</h4>
  10186. <p><a name="index-clisp-C-sources-1224"></a>
  10187. <dl>
  10188. <dt>RPMs<dd>clisp
  10189. <br><dt>File extension<dd><code>d</code>
  10190. <br><dt>String syntax<dd><code>"abc"</code>
  10191. <br><dt>gettext shorthand<dd><code>ENGLISH ? "abc" : ""</code>
  10192. <br><code>GETTEXT("abc")</code>
  10193. <br><code>GETTEXTL("abc")</code>
  10194. <br><dt>gettext/ngettext functions<dd><code>clgettext</code>, <code>clgettextl</code>
  10195. <br><dt>textdomain<dd>&mdash;
  10196. <br><dt>bindtextdomain<dd>&mdash;
  10197. <br><dt>setlocale<dd>automatic
  10198. <br><dt>Prerequisite<dd><code>#include "lispbibl.c"</code>
  10199. <br><dt>Use or emulate GNU gettext<dd>use
  10200. <br><dt>Extractor<dd><code>clisp-xgettext</code>
  10201. <br><dt>Formatting with positions<dd><code>fprintf "%2$d %1$d"</code>
  10202. <br><dt>Portability<dd>On platforms without gettext, no translation.
  10203. <br><dt>po-mode marking<dd>&mdash;
  10204. </dl>
  10205. <div class="node">
  10206. <a name="Emacs-Lisp"></a>
  10207. <p><hr>
  10208. Next:&nbsp;<a rel="next" accesskey="n" href="#librep">librep</a>,
  10209. Previous:&nbsp;<a rel="previous" accesskey="p" href="#clisp-C">clisp C</a>,
  10210. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10211. </div>
  10212. <h4 class="subsection">15.5.7 Emacs Lisp</h4>
  10213. <p><a name="index-Emacs-Lisp-1225"></a>
  10214. <dl>
  10215. <dt>RPMs<dd>emacs, xemacs
  10216. <br><dt>File extension<dd><code>el</code>
  10217. <br><dt>String syntax<dd><code>"abc"</code>
  10218. <br><dt>gettext shorthand<dd><code>(_"abc")</code>
  10219. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>dgettext</code> (xemacs only)
  10220. <br><dt>textdomain<dd><code>domain</code> special form (xemacs only)
  10221. <br><dt>bindtextdomain<dd><code>bind-text-domain</code> function (xemacs only)
  10222. <br><dt>setlocale<dd>automatic
  10223. <br><dt>Prerequisite<dd>&mdash;
  10224. <br><dt>Use or emulate GNU gettext<dd>use
  10225. <br><dt>Extractor<dd><code>xgettext</code>
  10226. <br><dt>Formatting with positions<dd><code>format "%2$d %1$d"</code>
  10227. <br><dt>Portability<dd>Only XEmacs. Without <code>I18N3</code> defined at build time, no translation.
  10228. <br><dt>po-mode marking<dd>&mdash;
  10229. </dl>
  10230. <div class="node">
  10231. <a name="librep"></a>
  10232. <p><hr>
  10233. Next:&nbsp;<a rel="next" accesskey="n" href="#Scheme">Scheme</a>,
  10234. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Emacs-Lisp">Emacs Lisp</a>,
  10235. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10236. </div>
  10237. <h4 class="subsection">15.5.8 librep</h4>
  10238. <p><a name="index-g_t_0040code_007blibrep_007d-Lisp-1226"></a>
  10239. <dl>
  10240. <dt>RPMs<dd>librep 0.15.3 or newer
  10241. <br><dt>File extension<dd><code>jl</code>
  10242. <br><dt>String syntax<dd><code>"abc"</code>
  10243. <br><dt>gettext shorthand<dd><code>(_"abc")</code>
  10244. <br><dt>gettext/ngettext functions<dd><code>gettext</code>
  10245. <br><dt>textdomain<dd><code>textdomain</code> function
  10246. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  10247. <br><dt>setlocale<dd>&mdash;
  10248. <br><dt>Prerequisite<dd><code>(require 'rep.i18n.gettext)</code>
  10249. <br><dt>Use or emulate GNU gettext<dd>use
  10250. <br><dt>Extractor<dd><code>xgettext</code>
  10251. <br><dt>Formatting with positions<dd><code>format "%2$d %1$d"</code>
  10252. <br><dt>Portability<dd>On platforms without gettext, no translation.
  10253. <br><dt>po-mode marking<dd>&mdash;
  10254. </dl>
  10255. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-librep</code>.
  10256. <div class="node">
  10257. <a name="Scheme"></a>
  10258. <p><hr>
  10259. Next:&nbsp;<a rel="next" accesskey="n" href="#Smalltalk">Smalltalk</a>,
  10260. Previous:&nbsp;<a rel="previous" accesskey="p" href="#librep">librep</a>,
  10261. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10262. </div>
  10263. <h4 class="subsection">15.5.9 GNU guile - Scheme</h4>
  10264. <p><a name="index-Scheme-1227"></a><a name="index-guile-1228"></a>
  10265. <dl>
  10266. <dt>RPMs<dd>guile
  10267. <br><dt>File extension<dd><code>scm</code>
  10268. <br><dt>String syntax<dd><code>"abc"</code>
  10269. <br><dt>gettext shorthand<dd><code>(_ "abc")</code>
  10270. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>ngettext</code>
  10271. <br><dt>textdomain<dd><code>textdomain</code>
  10272. <br><dt>bindtextdomain<dd><code>bindtextdomain</code>
  10273. <br><dt>setlocale<dd><code>(catch #t (lambda () (setlocale LC_ALL "")) (lambda args #f))</code>
  10274. <br><dt>Prerequisite<dd><code>(use-modules (ice-9 format))</code>
  10275. <br><dt>Use or emulate GNU gettext<dd>use
  10276. <br><dt>Extractor<dd><code>xgettext -k_</code>
  10277. <br><dt>Formatting with positions<dd><!-- @code{format "~1@@*~D ~0@@*~D~2@@*"}, requires @code{(use-modules (ice-9 format))} -->
  10278. <!-- not yet supported -->
  10279. &mdash;
  10280. <br><dt>Portability<dd>On platforms without gettext, no translation.
  10281. <br><dt>po-mode marking<dd>&mdash;
  10282. </dl>
  10283. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-guile</code>.
  10284. <div class="node">
  10285. <a name="Smalltalk"></a>
  10286. <p><hr>
  10287. Next:&nbsp;<a rel="next" accesskey="n" href="#Java">Java</a>,
  10288. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Scheme">Scheme</a>,
  10289. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10290. </div>
  10291. <h4 class="subsection">15.5.10 GNU Smalltalk</h4>
  10292. <p><a name="index-Smalltalk-1229"></a>
  10293. <dl>
  10294. <dt>RPMs<dd>smalltalk
  10295. <br><dt>File extension<dd><code>st</code>
  10296. <br><dt>String syntax<dd><code>'abc'</code>
  10297. <br><dt>gettext shorthand<dd><code>NLS ? 'abc'</code>
  10298. <br><dt>gettext/ngettext functions<dd><code>LcMessagesDomain&gt;&gt;#at:</code>, <code>LcMessagesDomain&gt;&gt;#at:plural:with:</code>
  10299. <br><dt>textdomain<dd><code>LcMessages&gt;&gt;#domain:localeDirectory:</code> (returns a <code>LcMessagesDomain</code>
  10300. object).<br>
  10301. Example: <code>I18N Locale default messages domain: 'gettext' localeDirectory: /usr/local/share/locale'</code>
  10302. <br><dt>bindtextdomain<dd><code>LcMessages&gt;&gt;#domain:localeDirectory:</code>, see above.
  10303. <br><dt>setlocale<dd>Automatic if you use <code>I18N Locale default</code>.
  10304. <br><dt>Prerequisite<dd><code>PackageLoader fileInPackage: 'I18N'!</code>
  10305. <br><dt>Use or emulate GNU gettext<dd>emulate
  10306. <br><dt>Extractor<dd><code>xgettext</code>
  10307. <br><dt>Formatting with positions<dd><code>'%1 %2' bindWith: 'Hello' with: 'world'</code>
  10308. <br><dt>Portability<dd>fully portable
  10309. <br><dt>po-mode marking<dd>&mdash;
  10310. </dl>
  10311. <p>An example is available in the <samp><span class="file">examples</span></samp> directory:
  10312. <code>hello-smalltalk</code>.
  10313. <div class="node">
  10314. <a name="Java"></a>
  10315. <p><hr>
  10316. Next:&nbsp;<a rel="next" accesskey="n" href="#C_0023">C#</a>,
  10317. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Smalltalk">Smalltalk</a>,
  10318. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10319. </div>
  10320. <h4 class="subsection">15.5.11 Java</h4>
  10321. <p><a name="index-Java-1230"></a>
  10322. <dl>
  10323. <dt>RPMs<dd>java, java2
  10324. <br><dt>File extension<dd><code>java</code>
  10325. <br><dt>String syntax<dd>"abc"
  10326. <br><dt>gettext shorthand<dd>_("abc")
  10327. <br><dt>gettext/ngettext functions<dd><code>GettextResource.gettext</code>, <code>GettextResource.ngettext</code>,
  10328. <code>GettextResource.pgettext</code>, <code>GettextResource.npgettext</code>
  10329. <br><dt>textdomain<dd>&mdash;, use <code>ResourceBundle.getResource</code> instead
  10330. <br><dt>bindtextdomain<dd>&mdash;, use CLASSPATH instead
  10331. <br><dt>setlocale<dd>automatic
  10332. <br><dt>Prerequisite<dd>&mdash;
  10333. <br><dt>Use or emulate GNU gettext<dd>&mdash;, uses a Java specific message catalog format
  10334. <br><dt>Extractor<dd><code>xgettext -k_</code>
  10335. <br><dt>Formatting with positions<dd><code>MessageFormat.format "{1,number} {0,number}"</code>
  10336. <br><dt>Portability<dd>fully portable
  10337. <br><dt>po-mode marking<dd>&mdash;
  10338. </dl>
  10339. <p>Before marking strings as internationalizable, uses of the string
  10340. concatenation operator need to be converted to <code>MessageFormat</code>
  10341. applications. For example, <code>"file "+filename+" not found"</code> becomes
  10342. <code>MessageFormat.format("file {0} not found", new Object[] { filename })</code>.
  10343. Only after this is done, can the strings be marked and extracted.
  10344. <p>GNU gettext uses the native Java internationalization mechanism, namely
  10345. <code>ResourceBundle</code>s. There are two formats of <code>ResourceBundle</code>s:
  10346. <code>.properties</code> files and <code>.class</code> files. The <code>.properties</code>
  10347. format is a text file which the translators can directly edit, like PO
  10348. files, but which doesn't support plural forms. Whereas the <code>.class</code>
  10349. format is compiled from <code>.java</code> source code and can support plural
  10350. forms (provided it is accessed through an appropriate API, see below).
  10351. <p>To convert a PO file to a <code>.properties</code> file, the <code>msgcat</code>
  10352. program can be used with the option <code>--properties-output</code>. To convert
  10353. a <code>.properties</code> file back to a PO file, the <code>msgcat</code> program
  10354. can be used with the option <code>--properties-input</code>. All the tools
  10355. that manipulate PO files can work with <code>.properties</code> files as well,
  10356. if given the <code>--properties-input</code> and/or <code>--properties-output</code>
  10357. option.
  10358. <p>To convert a PO file to a ResourceBundle class, the <code>msgfmt</code> program
  10359. can be used with the option <code>--java</code> or <code>--java2</code>. To convert a
  10360. ResourceBundle back to a PO file, the <code>msgunfmt</code> program can be used
  10361. with the option <code>--java</code>.
  10362. <p>Two different programmatic APIs can be used to access ResourceBundles.
  10363. Note that both APIs work with all kinds of ResourceBundles, whether
  10364. GNU gettext generated classes, or other <code>.class</code> or <code>.properties</code>
  10365. files.
  10366. <ol type=1 start=1>
  10367. <li>The <code>java.util.ResourceBundle</code> API.
  10368. <p>In particular, its <code>getString</code> function returns a string translation.
  10369. Note that a missing translation yields a <code>MissingResourceException</code>.
  10370. <p>This has the advantage of being the standard API. And it does not require
  10371. any additional libraries, only the <code>msgcat</code> generated <code>.properties</code>
  10372. files or the <code>msgfmt</code> generated <code>.class</code> files. But it cannot do
  10373. plural handling, even if the resource was generated by <code>msgfmt</code> from
  10374. a PO file with plural handling.
  10375. <li>The <code>gnu.gettext.GettextResource</code> API.
  10376. <p>Reference documentation in Javadoc 1.1 style format is in the
  10377. <a href="javadoc2/index.html">javadoc2 directory</a>.
  10378. <p>Its <code>gettext</code> function returns a string translation. Note that when
  10379. a translation is missing, the <var>msgid</var> argument is returned unchanged.
  10380. <p>This has the advantage of having the <code>ngettext</code> function for plural
  10381. handling and the <code>pgettext</code> and <code>npgettext</code> for strings constraint
  10382. to a particular context.
  10383. <p><a name="index-g_t_0040code_007blibintl_007d-for-Java-1231"></a>To use this API, one needs the <code>libintl.jar</code> file which is part of
  10384. the GNU gettext package and distributed under the LGPL.
  10385. </ol>
  10386. <p>Four examples, using the second API, are available in the <samp><span class="file">examples</span></samp>
  10387. directory: <code>hello-java</code>, <code>hello-java-awt</code>, <code>hello-java-swing</code>,
  10388. <code>hello-java-qtjambi</code>.
  10389. <p>Now, to make use of the API and define a shorthand for &lsquo;<samp><span class="samp">getString</span></samp>&rsquo;,
  10390. there are three idioms that you can choose from:
  10391. <ul>
  10392. <li>(This one assumes Java 1.5 or newer.)
  10393. In a unique class of your project, say &lsquo;<samp><span class="samp">Util</span></samp>&rsquo;, define a static variable
  10394. holding the <code>ResourceBundle</code> instance and the shorthand:
  10395. <pre class="smallexample"> private static ResourceBundle myResources =
  10396. ResourceBundle.getBundle("domain-name");
  10397. public static String _(String s) {
  10398. return myResources.getString(s);
  10399. }
  10400. </pre>
  10401. <p>All classes containing internationalized strings then contain
  10402. <pre class="smallexample"> import static Util._;
  10403. </pre>
  10404. <p class="noindent">and the shorthand is used like this:
  10405. <pre class="smallexample"> System.out.println(_("Operation completed."));
  10406. </pre>
  10407. <li>In a unique class of your project, say &lsquo;<samp><span class="samp">Util</span></samp>&rsquo;, define a static variable
  10408. holding the <code>ResourceBundle</code> instance:
  10409. <pre class="smallexample"> public static ResourceBundle myResources =
  10410. ResourceBundle.getBundle("domain-name");
  10411. </pre>
  10412. <p>All classes containing internationalized strings then contain
  10413. <pre class="smallexample"> private static ResourceBundle res = Util.myResources;
  10414. private static String _(String s) { return res.getString(s); }
  10415. </pre>
  10416. <p class="noindent">and the shorthand is used like this:
  10417. <pre class="smallexample"> System.out.println(_("Operation completed."));
  10418. </pre>
  10419. <li>You add a class with a very short name, say &lsquo;<samp><span class="samp">S</span></samp>&rsquo;, containing just the
  10420. definition of the resource bundle and of the shorthand:
  10421. <pre class="smallexample"> public class S {
  10422. public static ResourceBundle myResources =
  10423. ResourceBundle.getBundle("domain-name");
  10424. public static String _(String s) {
  10425. return myResources.getString(s);
  10426. }
  10427. }
  10428. </pre>
  10429. <p class="noindent">and the shorthand is used like this:
  10430. <pre class="smallexample"> System.out.println(S._("Operation completed."));
  10431. </pre>
  10432. </ul>
  10433. <p>Which of the three idioms you choose, will depend on whether your project
  10434. requires portability to Java versions prior to Java 1.5 and, if so, whether
  10435. copying two lines of codes into every class is more acceptable in your project
  10436. than a class with a single-letter name.
  10437. <div class="node">
  10438. <a name="C%23"></a>
  10439. <a name="C_0023"></a>
  10440. <p><hr>
  10441. Next:&nbsp;<a rel="next" accesskey="n" href="#gawk">gawk</a>,
  10442. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Java">Java</a>,
  10443. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10444. </div>
  10445. <h4 class="subsection">15.5.12 C#</h4>
  10446. <p><a name="index-C_0023-1232"></a>
  10447. <dl>
  10448. <dt>RPMs<dd>pnet, pnetlib 0.6.2 or newer, or mono 0.29 or newer
  10449. <br><dt>File extension<dd><code>cs</code>
  10450. <br><dt>String syntax<dd><code>"abc"</code>, <code>@"abc"</code>
  10451. <br><dt>gettext shorthand<dd>_("abc")
  10452. <br><dt>gettext/ngettext functions<dd><code>GettextResourceManager.GetString</code>,
  10453. <code>GettextResourceManager.GetPluralString</code>
  10454. <code>GettextResourceManager.GetParticularString</code>
  10455. <code>GettextResourceManager.GetParticularPluralString</code>
  10456. <br><dt>textdomain<dd><code>new GettextResourceManager(domain)</code>
  10457. <br><dt>bindtextdomain<dd>&mdash;, compiled message catalogs are located in subdirectories of the directory
  10458. containing the executable
  10459. <br><dt>setlocale<dd>automatic
  10460. <br><dt>Prerequisite<dd>&mdash;
  10461. <br><dt>Use or emulate GNU gettext<dd>&mdash;, uses a C# specific message catalog format
  10462. <br><dt>Extractor<dd><code>xgettext -k_</code>
  10463. <br><dt>Formatting with positions<dd><code>String.Format "{1} {0}"</code>
  10464. <br><dt>Portability<dd>fully portable
  10465. <br><dt>po-mode marking<dd>&mdash;
  10466. </dl>
  10467. <p>Before marking strings as internationalizable, uses of the string
  10468. concatenation operator need to be converted to <code>String.Format</code>
  10469. invocations. For example, <code>"file "+filename+" not found"</code> becomes
  10470. <code>String.Format("file {0} not found", filename)</code>.
  10471. Only after this is done, can the strings be marked and extracted.
  10472. <p>GNU gettext uses the native C#/.NET internationalization mechanism, namely
  10473. the classes <code>ResourceManager</code> and <code>ResourceSet</code>. Applications
  10474. use the <code>ResourceManager</code> methods to retrieve the native language
  10475. translation of strings. An instance of <code>ResourceSet</code> is the in-memory
  10476. representation of a message catalog file. The <code>ResourceManager</code> loads
  10477. and accesses <code>ResourceSet</code> instances as needed to look up the
  10478. translations.
  10479. <p>There are two formats of <code>ResourceSet</code>s that can be directly loaded by
  10480. the C# runtime: <code>.resources</code> files and <code>.dll</code> files.
  10481. <ul>
  10482. <li>The <code>.resources</code> format is a binary file usually generated through the
  10483. <code>resgen</code> or <code>monoresgen</code> utility, but which doesn't support plural
  10484. forms. <code>.resources</code> files can also be embedded in .NET <code>.exe</code> files.
  10485. This only affects whether a file system access is performed to load the message
  10486. catalog; it doesn't affect the contents of the message catalog.
  10487. <li>On the other hand, the <code>.dll</code> format is a binary file that is compiled
  10488. from <code>.cs</code> source code and can support plural forms (provided it is
  10489. accessed through the GNU gettext API, see below).
  10490. </ul>
  10491. <p>Note that these .NET <code>.dll</code> and <code>.exe</code> files are not tied to a
  10492. particular platform; their file format and GNU gettext for C# can be used
  10493. on any platform.
  10494. <p>To convert a PO file to a <code>.resources</code> file, the <code>msgfmt</code> program
  10495. can be used with the option &lsquo;<samp><span class="samp">--csharp-resources</span></samp>&rsquo;. To convert a
  10496. <code>.resources</code> file back to a PO file, the <code>msgunfmt</code> program can be
  10497. used with the option &lsquo;<samp><span class="samp">--csharp-resources</span></samp>&rsquo;. You can also, in some cases,
  10498. use the <code>resgen</code> program (from the <code>pnet</code> package) or the
  10499. <code>monoresgen</code> program (from the <code>mono</code>/<code>mcs</code> package). These
  10500. programs can also convert a <code>.resources</code> file back to a PO file. But
  10501. beware: as of this writing (January 2004), the <code>monoresgen</code> converter is
  10502. quite buggy and the <code>resgen</code> converter ignores the encoding of the PO
  10503. files.
  10504. <p>To convert a PO file to a <code>.dll</code> file, the <code>msgfmt</code> program can be
  10505. used with the option <code>--csharp</code>. The result will be a <code>.dll</code> file
  10506. containing a subclass of <code>GettextResourceSet</code>, which itself is a subclass
  10507. of <code>ResourceSet</code>. To convert a <code>.dll</code> file containing a
  10508. <code>GettextResourceSet</code> subclass back to a PO file, the <code>msgunfmt</code>
  10509. program can be used with the option <code>--csharp</code>.
  10510. <p>The advantages of the <code>.dll</code> format over the <code>.resources</code> format
  10511. are:
  10512. <ol type=1 start=1>
  10513. <li>Freedom to localize: Users can add their own translations to an application
  10514. after it has been built and distributed. Whereas when the programmer uses
  10515. a <code>ResourceManager</code> constructor provided by the system, the set of
  10516. <code>.resources</code> files for an application must be specified when the
  10517. application is built and cannot be extended afterwards.
  10518. <!-- If this were the only issue with the @code{.resources} format, one could -->
  10519. <!-- use the @code{ResourceManager.CreateFileBasedResourceManager} function. -->
  10520. <li>Plural handling: A message catalog in <code>.dll</code> format supports the plural
  10521. handling function <code>GetPluralString</code>. Whereas <code>.resources</code> files can
  10522. only contain data and only support lookups that depend on a single string.
  10523. <li>Context handling: A message catalog in <code>.dll</code> format supports the
  10524. query-with-context functions <code>GetParticularString</code> and
  10525. <code>GetParticularPluralString</code>. Whereas <code>.resources</code> files can
  10526. only contain data and only support lookups that depend on a single string.
  10527. <li>The <code>GettextResourceManager</code> that loads the message catalogs in
  10528. <code>.dll</code> format also provides for inheritance on a per-message basis.
  10529. For example, in Austrian (<code>de_AT</code>) locale, translations from the German
  10530. (<code>de</code>) message catalog will be used for messages not found in the
  10531. Austrian message catalog. This has the consequence that the Austrian
  10532. translators need only translate those few messages for which the translation
  10533. into Austrian differs from the German one. Whereas when working with
  10534. <code>.resources</code> files, each message catalog must provide the translations
  10535. of all messages by itself.
  10536. <li>The <code>GettextResourceManager</code> that loads the message catalogs in
  10537. <code>.dll</code> format also provides for a fallback: The English <var>msgid</var> is
  10538. returned when no translation can be found. Whereas when working with
  10539. <code>.resources</code> files, a language-neutral <code>.resources</code> file must
  10540. explicitly be provided as a fallback.
  10541. </ol>
  10542. <p>On the side of the programmatic APIs, the programmer can use either the
  10543. standard <code>ResourceManager</code> API and the GNU <code>GettextResourceManager</code>
  10544. API. The latter is an extension of the former, because
  10545. <code>GettextResourceManager</code> is a subclass of <code>ResourceManager</code>.
  10546. <ol type=1 start=1>
  10547. <li>The <code>System.Resources.ResourceManager</code> API.
  10548. <p>This API works with resources in <code>.resources</code> format.
  10549. <p>The creation of the <code>ResourceManager</code> is done through
  10550. <pre class="smallexample"> new ResourceManager(domainname, Assembly.GetExecutingAssembly())
  10551. </pre>
  10552. <p class="noindent">The <code>GetString</code> function returns a string's translation. Note that this
  10553. function returns null when a translation is missing (i.e. not even found in
  10554. the fallback resource file).
  10555. <li>The <code>GNU.Gettext.GettextResourceManager</code> API.
  10556. <p>This API works with resources in <code>.dll</code> format.
  10557. <p>Reference documentation is in the
  10558. <a href="csharpdoc/index.html">csharpdoc directory</a>.
  10559. <p>The creation of the <code>ResourceManager</code> is done through
  10560. <pre class="smallexample"> new GettextResourceManager(domainname)
  10561. </pre>
  10562. <p>The <code>GetString</code> function returns a string's translation. Note that when
  10563. a translation is missing, the <var>msgid</var> argument is returned unchanged.
  10564. <p>The <code>GetPluralString</code> function returns a string translation with plural
  10565. handling, like the <code>ngettext</code> function in C.
  10566. <p>The <code>GetParticularString</code> function returns a string's translation,
  10567. specific to a particular context, like the <code>pgettext</code> function in C.
  10568. Note that when a translation is missing, the <var>msgid</var> argument is returned
  10569. unchanged.
  10570. <p>The <code>GetParticularPluralString</code> function returns a string translation,
  10571. specific to a particular context, with plural handling, like the
  10572. <code>npgettext</code> function in C.
  10573. <p><a name="index-g_t_0040code_007blibintl_007d-for-C_0023-1233"></a>To use this API, one needs the <code>GNU.Gettext.dll</code> file which is part of
  10574. the GNU gettext package and distributed under the LGPL.
  10575. </ol>
  10576. <p>You can also mix both approaches: use the
  10577. <code>GNU.Gettext.GettextResourceManager</code> constructor, but otherwise use
  10578. only the <code>ResourceManager</code> type and only the <code>GetString</code> method.
  10579. This is appropriate when you want to profit from the tools for PO files,
  10580. but don't want to change an existing source code that uses
  10581. <code>ResourceManager</code> and don't (yet) need the <code>GetPluralString</code> method.
  10582. <p>Two examples, using the second API, are available in the <samp><span class="file">examples</span></samp>
  10583. directory: <code>hello-csharp</code>, <code>hello-csharp-forms</code>.
  10584. <p>Now, to make use of the API and define a shorthand for &lsquo;<samp><span class="samp">GetString</span></samp>&rsquo;,
  10585. there are two idioms that you can choose from:
  10586. <ul>
  10587. <li>In a unique class of your project, say &lsquo;<samp><span class="samp">Util</span></samp>&rsquo;, define a static variable
  10588. holding the <code>ResourceManager</code> instance:
  10589. <pre class="smallexample"> public static GettextResourceManager MyResourceManager =
  10590. new GettextResourceManager("domain-name");
  10591. </pre>
  10592. <p>All classes containing internationalized strings then contain
  10593. <pre class="smallexample"> private static GettextResourceManager Res = Util.MyResourceManager;
  10594. private static String _(String s) { return Res.GetString(s); }
  10595. </pre>
  10596. <p class="noindent">and the shorthand is used like this:
  10597. <pre class="smallexample"> Console.WriteLine(_("Operation completed."));
  10598. </pre>
  10599. <li>You add a class with a very short name, say &lsquo;<samp><span class="samp">S</span></samp>&rsquo;, containing just the
  10600. definition of the resource manager and of the shorthand:
  10601. <pre class="smallexample"> public class S {
  10602. public static GettextResourceManager MyResourceManager =
  10603. new GettextResourceManager("domain-name");
  10604. public static String _(String s) {
  10605. return MyResourceManager.GetString(s);
  10606. }
  10607. }
  10608. </pre>
  10609. <p class="noindent">and the shorthand is used like this:
  10610. <pre class="smallexample"> Console.WriteLine(S._("Operation completed."));
  10611. </pre>
  10612. </ul>
  10613. <p>Which of the two idioms you choose, will depend on whether copying two lines
  10614. of codes into every class is more acceptable in your project than a class
  10615. with a single-letter name.
  10616. <div class="node">
  10617. <a name="gawk"></a>
  10618. <p><hr>
  10619. Next:&nbsp;<a rel="next" accesskey="n" href="#Pascal">Pascal</a>,
  10620. Previous:&nbsp;<a rel="previous" accesskey="p" href="#C_0023">C#</a>,
  10621. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10622. </div>
  10623. <h4 class="subsection">15.5.13 GNU awk</h4>
  10624. <p><a name="index-awk-1234"></a><a name="index-gawk-1235"></a>
  10625. <dl>
  10626. <dt>RPMs<dd>gawk 3.1 or newer
  10627. <br><dt>File extension<dd><code>awk</code>
  10628. <br><dt>String syntax<dd><code>"abc"</code>
  10629. <br><dt>gettext shorthand<dd><code>_"abc"</code>
  10630. <br><dt>gettext/ngettext functions<dd><code>dcgettext</code>, missing <code>dcngettext</code> in gawk-3.1.0
  10631. <br><dt>textdomain<dd><code>TEXTDOMAIN</code> variable
  10632. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  10633. <br><dt>setlocale<dd>automatic, but missing <code>setlocale (LC_MESSAGES, "")</code> in gawk-3.1.0
  10634. <br><dt>Prerequisite<dd>&mdash;
  10635. <br><dt>Use or emulate GNU gettext<dd>use
  10636. <br><dt>Extractor<dd><code>xgettext</code>
  10637. <br><dt>Formatting with positions<dd><code>printf "%2$d %1$d"</code> (GNU awk only)
  10638. <br><dt>Portability<dd>On platforms without gettext, no translation. On non-GNU awks, you must
  10639. define <code>dcgettext</code>, <code>dcngettext</code> and <code>bindtextdomain</code>
  10640. yourself.
  10641. <br><dt>po-mode marking<dd>&mdash;
  10642. </dl>
  10643. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-gawk</code>.
  10644. <div class="node">
  10645. <a name="Pascal"></a>
  10646. <p><hr>
  10647. Next:&nbsp;<a rel="next" accesskey="n" href="#wxWidgets">wxWidgets</a>,
  10648. Previous:&nbsp;<a rel="previous" accesskey="p" href="#gawk">gawk</a>,
  10649. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10650. </div>
  10651. <h4 class="subsection">15.5.14 Pascal - Free Pascal Compiler</h4>
  10652. <p><a name="index-Pascal-1236"></a><a name="index-Free-Pascal-1237"></a><a name="index-Object-Pascal-1238"></a>
  10653. <dl>
  10654. <dt>RPMs<dd>fpk
  10655. <br><dt>File extension<dd><code>pp</code>, <code>pas</code>
  10656. <br><dt>String syntax<dd><code>'abc'</code>
  10657. <br><dt>gettext shorthand<dd>automatic
  10658. <br><dt>gettext/ngettext functions<dd>&mdash;, use <code>ResourceString</code> data type instead
  10659. <br><dt>textdomain<dd>&mdash;, use <code>TranslateResourceStrings</code> function instead
  10660. <br><dt>bindtextdomain<dd>&mdash;, use <code>TranslateResourceStrings</code> function instead
  10661. <br><dt>setlocale<dd>automatic, but uses only LANG, not LC_MESSAGES or LC_ALL
  10662. <br><dt>Prerequisite<dd><code>{$mode delphi}</code> or <code>{$mode objfpc}</code><br><code>uses gettext;</code>
  10663. <br><dt>Use or emulate GNU gettext<dd>emulate partially
  10664. <br><dt>Extractor<dd><code>ppc386</code> followed by <code>xgettext</code> or <code>rstconv</code>
  10665. <br><dt>Formatting with positions<dd><code>uses sysutils;</code><br><code>format "%1:d %0:d"</code>
  10666. <br><dt>Portability<dd>?
  10667. <br><dt>po-mode marking<dd>&mdash;
  10668. </dl>
  10669. <p>The Pascal compiler has special support for the <code>ResourceString</code> data
  10670. type. It generates a <code>.rst</code> file. This is then converted to a
  10671. <code>.pot</code> file by use of <code>xgettext</code> or <code>rstconv</code>. At runtime,
  10672. a <code>.mo</code> file corresponding to translations of this <code>.pot</code> file
  10673. can be loaded using the <code>TranslateResourceStrings</code> function in the
  10674. <code>gettext</code> unit.
  10675. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-pascal</code>.
  10676. <div class="node">
  10677. <a name="wxWidgets"></a>
  10678. <p><hr>
  10679. Next:&nbsp;<a rel="next" accesskey="n" href="#YCP">YCP</a>,
  10680. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Pascal">Pascal</a>,
  10681. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10682. </div>
  10683. <h4 class="subsection">15.5.15 wxWidgets library</h4>
  10684. <p><a name="index-g_t_0040code_007bwxWidgets_007d-library-1239"></a>
  10685. <dl>
  10686. <dt>RPMs<dd>wxGTK, gettext
  10687. <br><dt>File extension<dd><code>cpp</code>
  10688. <br><dt>String syntax<dd><code>"abc"</code>
  10689. <br><dt>gettext shorthand<dd><code>_("abc")</code>
  10690. <br><dt>gettext/ngettext functions<dd><code>wxLocale::GetString</code>, <code>wxGetTranslation</code>
  10691. <br><dt>textdomain<dd><code>wxLocale::AddCatalog</code>
  10692. <br><dt>bindtextdomain<dd><code>wxLocale::AddCatalogLookupPathPrefix</code>
  10693. <br><dt>setlocale<dd><code>wxLocale::Init</code>, <code>wxSetLocale</code>
  10694. <br><dt>Prerequisite<dd><code>#include &lt;wx/intl.h&gt;</code>
  10695. <br><dt>Use or emulate GNU gettext<dd>emulate, see <code>include/wx/intl.h</code> and <code>src/common/intl.cpp</code>
  10696. <br><dt>Extractor<dd><code>xgettext</code>
  10697. <br><dt>Formatting with positions<dd>wxString::Format supports positions if and only if the system has
  10698. <code>wprintf()</code>, <code>vswprintf()</code> functions and they support positions
  10699. according to POSIX.
  10700. <br><dt>Portability<dd>fully portable
  10701. <br><dt>po-mode marking<dd>yes
  10702. </dl>
  10703. <div class="node">
  10704. <a name="YCP"></a>
  10705. <p><hr>
  10706. Next:&nbsp;<a rel="next" accesskey="n" href="#Tcl">Tcl</a>,
  10707. Previous:&nbsp;<a rel="previous" accesskey="p" href="#wxWidgets">wxWidgets</a>,
  10708. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10709. </div>
  10710. <h4 class="subsection">15.5.16 YCP - YaST2 scripting language</h4>
  10711. <p><a name="index-YCP-1240"></a><a name="index-YaST2-scripting-language-1241"></a>
  10712. <dl>
  10713. <dt>RPMs<dd>libycp, libycp-devel, yast2-core, yast2-core-devel
  10714. <br><dt>File extension<dd><code>ycp</code>
  10715. <br><dt>String syntax<dd><code>"abc"</code>
  10716. <br><dt>gettext shorthand<dd><code>_("abc")</code>
  10717. <br><dt>gettext/ngettext functions<dd><code>_()</code> with 1 or 3 arguments
  10718. <br><dt>textdomain<dd><code>textdomain</code> statement
  10719. <br><dt>bindtextdomain<dd>&mdash;
  10720. <br><dt>setlocale<dd>&mdash;
  10721. <br><dt>Prerequisite<dd>&mdash;
  10722. <br><dt>Use or emulate GNU gettext<dd>use
  10723. <br><dt>Extractor<dd><code>xgettext</code>
  10724. <br><dt>Formatting with positions<dd><code>sformat "%2 %1"</code>
  10725. <br><dt>Portability<dd>fully portable
  10726. <br><dt>po-mode marking<dd>&mdash;
  10727. </dl>
  10728. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-ycp</code>.
  10729. <div class="node">
  10730. <a name="Tcl"></a>
  10731. <p><hr>
  10732. Next:&nbsp;<a rel="next" accesskey="n" href="#Perl">Perl</a>,
  10733. Previous:&nbsp;<a rel="previous" accesskey="p" href="#YCP">YCP</a>,
  10734. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10735. </div>
  10736. <h4 class="subsection">15.5.17 Tcl - Tk's scripting language</h4>
  10737. <p><a name="index-Tcl-1242"></a><a name="index-Tk_0027s-scripting-language-1243"></a>
  10738. <dl>
  10739. <dt>RPMs<dd>tcl
  10740. <br><dt>File extension<dd><code>tcl</code>
  10741. <br><dt>String syntax<dd><code>"abc"</code>
  10742. <br><dt>gettext shorthand<dd><code>[_ "abc"]</code>
  10743. <br><dt>gettext/ngettext functions<dd><code>::msgcat::mc</code>
  10744. <br><dt>textdomain<dd>&mdash;
  10745. <br><dt>bindtextdomain<dd>&mdash;, use <code>::msgcat::mcload</code> instead
  10746. <br><dt>setlocale<dd>automatic, uses LANG, but ignores LC_MESSAGES and LC_ALL
  10747. <br><dt>Prerequisite<dd><code>package require msgcat</code>
  10748. <br><code>proc _ {s} {return [::msgcat::mc $s]}</code>
  10749. <br><dt>Use or emulate GNU gettext<dd>&mdash;, uses a Tcl specific message catalog format
  10750. <br><dt>Extractor<dd><code>xgettext -k_</code>
  10751. <br><dt>Formatting with positions<dd><code>format "%2\$d %1\$d"</code>
  10752. <br><dt>Portability<dd>fully portable
  10753. <br><dt>po-mode marking<dd>&mdash;
  10754. </dl>
  10755. <p>Two examples are available in the <samp><span class="file">examples</span></samp> directory:
  10756. <code>hello-tcl</code>, <code>hello-tcl-tk</code>.
  10757. <p>Before marking strings as internationalizable, substitutions of variables
  10758. into the string need to be converted to <code>format</code> applications. For
  10759. example, <code>"file $filename not found"</code> becomes
  10760. <code>[format "file %s not found" $filename]</code>.
  10761. Only after this is done, can the strings be marked and extracted.
  10762. After marking, this example becomes
  10763. <code>[format [_ "file %s not found"] $filename]</code> or
  10764. <code>[msgcat::mc "file %s not found" $filename]</code>. Note that the
  10765. <code>msgcat::mc</code> function implicitly calls <code>format</code> when more than one
  10766. argument is given.
  10767. <div class="node">
  10768. <a name="Perl"></a>
  10769. <p><hr>
  10770. Next:&nbsp;<a rel="next" accesskey="n" href="#PHP">PHP</a>,
  10771. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Tcl">Tcl</a>,
  10772. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  10773. </div>
  10774. <h4 class="subsection">15.5.18 Perl</h4>
  10775. <p><a name="index-Perl-1244"></a>
  10776. <dl>
  10777. <dt>RPMs<dd>perl
  10778. <br><dt>File extension<dd><code>pl</code>, <code>PL</code>, <code>pm</code>, <code>cgi</code>
  10779. <br><dt>String syntax<dd>
  10780. <ul>
  10781. <li><code>"abc"</code>
  10782. <li><code>'abc'</code>
  10783. <li><code>qq (abc)</code>
  10784. <li><code>q (abc)</code>
  10785. <li><code>qr /abc/</code>
  10786. <li><code>qx (/bin/date)</code>
  10787. <li><code>/pattern match/</code>
  10788. <li><code>?pattern match?</code>
  10789. <li><code>s/substitution/operators/</code>
  10790. <li><code>$tied_hash{"message"}</code>
  10791. <li><code>$tied_hash_reference-&gt;{"message"}</code>
  10792. <li>etc., issue the command &lsquo;<samp><span class="samp">man perlsyn</span></samp>&rsquo; for details
  10793. </ul>
  10794. <br><dt>gettext shorthand<dd><code>__</code> (double underscore)
  10795. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>dgettext</code>, <code>dcgettext</code>, <code>ngettext</code>,
  10796. <code>dngettext</code>, <code>dcngettext</code>
  10797. <br><dt>textdomain<dd><code>textdomain</code> function
  10798. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  10799. <br><dt>bind_textdomain_codeset<dd><code>bind_textdomain_codeset</code> function
  10800. <br><dt>setlocale<dd>Use <code>setlocale (LC_ALL, "");</code>
  10801. <br><dt>Prerequisite<dd><code>use POSIX;</code>
  10802. <br><code>use Locale::TextDomain;</code> (included in the package libintl-perl
  10803. which is available on the Comprehensive Perl Archive Network CPAN,
  10804. http://www.cpan.org/).
  10805. <br><dt>Use or emulate GNU gettext<dd>platform dependent: gettext_pp emulates, gettext_xs uses GNU gettext
  10806. <br><dt>Extractor<dd><code>xgettext -k__ -k\$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -k</code>
  10807. <br><dt>Formatting with positions<dd>Both kinds of format strings support formatting with positions.
  10808. <br><code>printf "%2\$d %1\$d", ...</code> (requires Perl 5.8.0 or newer)
  10809. <br><code>__expand("[new] replaces [old]", old =&gt; $oldvalue, new =&gt; $newvalue)</code>
  10810. <br><dt>Portability<dd>The <code>libintl-perl</code> package is platform independent but is not
  10811. part of the Perl core. The programmer is responsible for
  10812. providing a dummy implementation of the required functions if the
  10813. package is not installed on the target system.
  10814. <br><dt>po-mode marking<dd>&mdash;
  10815. <br><dt>Documentation<dd>Included in <code>libintl-perl</code>, available on CPAN
  10816. (http://www.cpan.org/).
  10817. </dl>
  10818. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-perl</code>.
  10819. <p><a name="index-marking-Perl-sources-1245"></a>
  10820. The <code>xgettext</code> parser backend for Perl differs significantly from
  10821. the parser backends for other programming languages, just as Perl
  10822. itself differs significantly from other programming languages. The
  10823. Perl parser backend offers many more string marking facilities than
  10824. the other backends but it also has some Perl specific limitations, the
  10825. worst probably being its imperfectness.
  10826. <ul class="menu">
  10827. <li><a accesskey="1" href="#General-Problems">General Problems</a>: General Problems Parsing Perl Code
  10828. <li><a accesskey="2" href="#Default-Keywords">Default Keywords</a>: Which Keywords Will xgettext Look For?
  10829. <li><a accesskey="3" href="#Special-Keywords">Special Keywords</a>: How to Extract Hash Keys
  10830. <li><a accesskey="4" href="#Quote_002dlike-Expressions">Quote-like Expressions</a>: What are Strings And Quote-like Expressions?
  10831. <li><a accesskey="5" href="#Interpolation-I">Interpolation I</a>: Invalid String Interpolation
  10832. <li><a accesskey="6" href="#Interpolation-II">Interpolation II</a>: Valid String Interpolation
  10833. <li><a accesskey="7" href="#Parentheses">Parentheses</a>: When To Use Parentheses
  10834. <li><a accesskey="8" href="#Long-Lines">Long Lines</a>: How To Grok with Long Lines
  10835. <li><a accesskey="9" href="#Perl-Pitfalls">Perl Pitfalls</a>: Bugs, Pitfalls, and Things That Do Not Work
  10836. </ul>
  10837. <div class="node">
  10838. <a name="General-Problems"></a>
  10839. <p><hr>
  10840. Next:&nbsp;<a rel="next" accesskey="n" href="#Default-Keywords">Default Keywords</a>,
  10841. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  10842. </div>
  10843. <h5 class="subsubsection">15.5.18.1 General Problems Parsing Perl Code</h5>
  10844. <p>It is often heard that only Perl can parse Perl. This is not true.
  10845. Perl cannot be <em>parsed</em> at all, it can only be <em>executed</em>.
  10846. Perl has various built-in ambiguities that can only be resolved at runtime.
  10847. <p>The following example may illustrate one common problem:
  10848. <pre class="example"> print gettext "Hello World!";
  10849. </pre>
  10850. <p>Although this example looks like a bullet-proof case of a function
  10851. invocation, it is not:
  10852. <pre class="example"> open gettext, "&gt;testfile" or die;
  10853. print gettext "Hello world!"
  10854. </pre>
  10855. <p>In this context, the string <code>gettext</code> looks more like a
  10856. file handle. But not necessarily:
  10857. <pre class="example"> use Locale::Messages qw (:libintl_h);
  10858. open gettext "&gt;testfile" or die;
  10859. print gettext "Hello world!";
  10860. </pre>
  10861. <p>Now, the file is probably syntactically incorrect, provided that the module
  10862. <code>Locale::Messages</code> found first in the Perl include path exports a
  10863. function <code>gettext</code>. But what if the module
  10864. <code>Locale::Messages</code> really looks like this?
  10865. <pre class="example"> use vars qw (*gettext);
  10866. 1;
  10867. </pre>
  10868. <p>In this case, the string <code>gettext</code> will be interpreted as a file
  10869. handle again, and the above example will create a file <samp><span class="file">testfile</span></samp>
  10870. and write the string &ldquo;Hello world!&rdquo; into it. Even advanced
  10871. control flow analysis will not really help:
  10872. <pre class="example"> if (0.5 &lt; rand) {
  10873. eval "use Sane";
  10874. } else {
  10875. eval "use InSane";
  10876. }
  10877. print gettext "Hello world!";
  10878. </pre>
  10879. <p>If the module <code>Sane</code> exports a function <code>gettext</code> that does
  10880. what we expect, and the module <code>InSane</code> opens a file for writing
  10881. and associates the <em>handle</em> <code>gettext</code> with this output
  10882. stream, we are clueless again about what will happen at runtime. It is
  10883. completely unpredictable. The truth is that Perl has so many ways to
  10884. fill its symbol table at runtime that it is impossible to interpret a
  10885. particular piece of code without executing it.
  10886. <p>Of course, <code>xgettext</code> will not execute your Perl sources while
  10887. scanning for translatable strings, but rather use heuristics in order
  10888. to guess what you meant.
  10889. <p>Another problem is the ambiguity of the slash and the question mark.
  10890. Their interpretation depends on the context:
  10891. <pre class="example"> # A pattern match.
  10892. print "OK\n" if /foobar/;
  10893. # A division.
  10894. print 1 / 2;
  10895. # Another pattern match.
  10896. print "OK\n" if ?foobar?;
  10897. # Conditional.
  10898. print $x ? "foo" : "bar";
  10899. </pre>
  10900. <p>The slash may either act as the division operator or introduce a
  10901. pattern match, whereas the question mark may act as the ternary
  10902. conditional operator or as a pattern match, too. Other programming
  10903. languages like <code>awk</code> present similar problems, but the consequences of a
  10904. misinterpretation are particularly nasty with Perl sources. In <code>awk</code>
  10905. for instance, a statement can never exceed one line and the parser
  10906. can recover from a parsing error at the next newline and interpret
  10907. the rest of the input stream correctly. Perl is different, as a
  10908. pattern match is terminated by the next appearance of the delimiter
  10909. (the slash or the question mark) in the input stream, regardless of
  10910. the semantic context. If a slash is really a division sign but
  10911. mis-interpreted as a pattern match, the rest of the input file is most
  10912. probably parsed incorrectly.
  10913. <p>There are certain cases, where the ambiguity cannot be resolved at all:
  10914. <pre class="example"> $x = wantarray ? 1 : 0;
  10915. </pre>
  10916. <p>The Perl built-in function <code>wantarray</code> does not accept any arguments.
  10917. The Perl parser therefore knows that the question mark does not start
  10918. a regular expression but is the ternary conditional operator.
  10919. <pre class="example"> sub wantarrays {}
  10920. $x = wantarrays ? 1 : 0;
  10921. </pre>
  10922. <p>Now the situation is different. The function <code>wantarrays</code> takes
  10923. a variable number of arguments (like any non-prototyped Perl function).
  10924. The question mark is now the delimiter of a pattern match, and hence
  10925. the piece of code does not compile.
  10926. <pre class="example"> sub wantarrays() {}
  10927. $x = wantarrays ? 1 : 0;
  10928. </pre>
  10929. <p>Now the function is prototyped, Perl knows that it does not accept any
  10930. arguments, and the question mark is therefore interpreted as the
  10931. ternaray operator again. But that unfortunately outsmarts <code>xgettext</code>.
  10932. <p>The Perl parser in <code>xgettext</code> cannot know whether a function has
  10933. a prototype and what that prototype would look like. It therefore makes
  10934. an educated guess. If a function is known to be a Perl built-in and
  10935. this function does not accept any arguments, a following question mark
  10936. or slash is treated as an operator, otherwise as the delimiter of a
  10937. following regular expression. The Perl built-ins that do not accept
  10938. arguments are <code>wantarray</code>, <code>fork</code>, <code>time</code>, <code>times</code>,
  10939. <code>getlogin</code>, <code>getppid</code>, <code>getpwent</code>, <code>getgrent</code>,
  10940. <code>gethostent</code>, <code>getnetent</code>, <code>getprotoent</code>, <code>getservent</code>,
  10941. <code>setpwent</code>, <code>setgrent</code>, <code>endpwent</code>, <code>endgrent</code>,
  10942. <code>endhostent</code>, <code>endnetent</code>, <code>endprotoent</code>, and
  10943. <code>endservent</code>.
  10944. <p>If you find that <code>xgettext</code> fails to extract strings from
  10945. portions of your sources, you should therefore look out for slashes
  10946. and/or question marks preceding these sections. You may have come
  10947. across a bug in <code>xgettext</code>'s Perl parser (and of course you
  10948. should report that bug). In the meantime you should consider to
  10949. reformulate your code in a manner less challenging to <code>xgettext</code>.
  10950. <p>In particular, if the parser is too dumb to see that a function
  10951. does not accept arguments, use parentheses:
  10952. <pre class="example"> $x = somefunc() ? 1 : 0;
  10953. $y = (somefunc) ? 1 : 0;
  10954. </pre>
  10955. <p>In fact the Perl parser itself has similar problems and warns you
  10956. about such constructs.
  10957. <div class="node">
  10958. <a name="Default-Keywords"></a>
  10959. <p><hr>
  10960. Next:&nbsp;<a rel="next" accesskey="n" href="#Special-Keywords">Special Keywords</a>,
  10961. Previous:&nbsp;<a rel="previous" accesskey="p" href="#General-Problems">General Problems</a>,
  10962. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  10963. </div>
  10964. <h5 class="subsubsection">15.5.18.2 Which keywords will xgettext look for?</h5>
  10965. <p><a name="index-Perl-default-keywords-1246"></a>
  10966. Unless you instruct <code>xgettext</code> otherwise by invoking it with one
  10967. of the options <code>--keyword</code> or <code>-k</code>, it will recognize the
  10968. following keywords in your Perl sources:
  10969. <ul>
  10970. <li><code>gettext</code>
  10971. <li><code>dgettext</code>
  10972. <li><code>dcgettext</code>
  10973. <li><code>ngettext:1,2</code>
  10974. <p>The first (singular) and the second (plural) argument will be
  10975. extracted.
  10976. <li><code>dngettext:1,2</code>
  10977. <p>The first (singular) and the second (plural) argument will be
  10978. extracted.
  10979. <li><code>dcngettext:1,2</code>
  10980. <p>The first (singular) and the second (plural) argument will be
  10981. extracted.
  10982. <li><code>gettext_noop</code>
  10983. <li><code>%gettext</code>
  10984. <p>The keys of lookups into the hash <code>%gettext</code> will be extracted.
  10985. <li><code>$gettext</code>
  10986. <p>The keys of lookups into the hash reference <code>$gettext</code> will be extracted.
  10987. </ul>
  10988. <div class="node">
  10989. <a name="Special-Keywords"></a>
  10990. <p><hr>
  10991. Next:&nbsp;<a rel="next" accesskey="n" href="#Quote_002dlike-Expressions">Quote-like Expressions</a>,
  10992. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Default-Keywords">Default Keywords</a>,
  10993. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  10994. </div>
  10995. <h5 class="subsubsection">15.5.18.3 How to Extract Hash Keys</h5>
  10996. <p><a name="index-Perl-special-keywords-for-hash_002dlookups-1247"></a>
  10997. Translating messages at runtime is normally performed by looking up the
  10998. original string in the translation database and returning the
  10999. translated version. The &ldquo;natural&rdquo; Perl implementation is a hash
  11000. lookup, and, of course, <code>xgettext</code> supports such practice.
  11001. <pre class="example"> print __"Hello world!";
  11002. print $__{"Hello world!"};
  11003. print $__-&gt;{"Hello world!"};
  11004. print $$__{"Hello world!"};
  11005. </pre>
  11006. <p>The above four lines all do the same thing. The Perl module
  11007. <code>Locale::TextDomain</code> exports by default a hash <code>%__</code> that
  11008. is tied to the function <code>__()</code>. It also exports a reference
  11009. <code>$__</code> to <code>%__</code>.
  11010. <p>If an argument to the <code>xgettext</code> option <code>--keyword</code>,
  11011. resp. <code>-k</code> starts with a percent sign, the rest of the keyword is
  11012. interpreted as the name of a hash. If it starts with a dollar
  11013. sign, the rest of the keyword is interpreted as a reference to a
  11014. hash.
  11015. <p>Note that you can omit the quotation marks (single or double) around
  11016. the hash key (almost) whenever Perl itself allows it:
  11017. <pre class="example"> print $gettext{Error};
  11018. </pre>
  11019. <p>The exact rule is: You can omit the surrounding quotes, when the hash
  11020. key is a valid C (!) identifier, i.e. when it starts with an
  11021. underscore or an ASCII letter and is followed by an arbitrary number
  11022. of underscores, ASCII letters or digits. Other Unicode characters
  11023. are <em>not</em> allowed, regardless of the <code>use utf8</code> pragma.
  11024. <div class="node">
  11025. <a name="Quote-like-Expressions"></a>
  11026. <a name="Quote_002dlike-Expressions"></a>
  11027. <p><hr>
  11028. Next:&nbsp;<a rel="next" accesskey="n" href="#Interpolation-I">Interpolation I</a>,
  11029. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Special-Keywords">Special Keywords</a>,
  11030. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  11031. </div>
  11032. <h5 class="subsubsection">15.5.18.4 What are Strings And Quote-like Expressions?</h5>
  11033. <p><a name="index-Perl-quote_002dlike-expressions-1248"></a>
  11034. Perl offers a plethora of different string constructs. Those that can
  11035. be used either as arguments to functions or inside braces for hash
  11036. lookups are generally supported by <code>xgettext</code>.
  11037. <ul>
  11038. <li><strong>double-quoted strings</strong>
  11039. <br>
  11040. <pre class="example"> print gettext "Hello World!";
  11041. </pre>
  11042. <li><strong>single-quoted strings</strong>
  11043. <br>
  11044. <pre class="example"> print gettext 'Hello World!';
  11045. </pre>
  11046. <li><strong>the operator qq</strong>
  11047. <br>
  11048. <pre class="example"> print gettext qq |Hello World!|;
  11049. print gettext qq &lt;E-mail: &lt;guido\@imperia.net&gt;&gt;;
  11050. </pre>
  11051. <p>The operator <code>qq</code> is fully supported. You can use arbitrary
  11052. delimiters, including the four bracketing delimiters (round, angle,
  11053. square, curly) that nest.
  11054. <li><strong>the operator q</strong>
  11055. <br>
  11056. <pre class="example"> print gettext q |Hello World!|;
  11057. print gettext q &lt;E-mail: &lt;guido@imperia.net&gt;&gt;;
  11058. </pre>
  11059. <p>The operator <code>q</code> is fully supported. You can use arbitrary
  11060. delimiters, including the four bracketing delimiters (round, angle,
  11061. square, curly) that nest.
  11062. <li><strong>the operator qx</strong>
  11063. <br>
  11064. <pre class="example"> print gettext qx ;LANGUAGE=C /bin/date;
  11065. print gettext qx [/usr/bin/ls | grep '^[A-Z]*'];
  11066. </pre>
  11067. <p>The operator <code>qx</code> is fully supported. You can use arbitrary
  11068. delimiters, including the four bracketing delimiters (round, angle,
  11069. square, curly) that nest.
  11070. <p>The example is actually a useless use of <code>gettext</code>. It will
  11071. invoke the <code>gettext</code> function on the output of the command
  11072. specified with the <code>qx</code> operator. The feature was included
  11073. in order to make the interface consistent (the parser will extract
  11074. all strings and quote-like expressions).
  11075. <li><strong>here documents</strong>
  11076. <br>
  11077. <pre class="example"> print gettext &lt;&lt;'EOF';
  11078. program not found in $PATH
  11079. EOF
  11080. print ngettext &lt;&lt;EOF, &lt;&lt;"EOF";
  11081. one file deleted
  11082. EOF
  11083. several files deleted
  11084. EOF
  11085. </pre>
  11086. <p>Here-documents are recognized. If the delimiter is enclosed in single
  11087. quotes, the string is not interpolated. If it is enclosed in double
  11088. quotes or has no quotes at all, the string is interpolated.
  11089. <p>Delimiters that start with a digit are not supported!
  11090. </ul>
  11091. <div class="node">
  11092. <a name="Interpolation-I"></a>
  11093. <p><hr>
  11094. Next:&nbsp;<a rel="next" accesskey="n" href="#Interpolation-II">Interpolation II</a>,
  11095. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Quote_002dlike-Expressions">Quote-like Expressions</a>,
  11096. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  11097. </div>
  11098. <h5 class="subsubsection">15.5.18.5 Invalid Uses Of String Interpolation</h5>
  11099. <p><a name="index-Perl-invalid-string-interpolation-1249"></a>
  11100. Perl is capable of interpolating variables into strings. This offers
  11101. some nice features in localized programs but can also lead to
  11102. problems.
  11103. <p>A common error is a construct like the following:
  11104. <pre class="example"> print gettext "This is the program $0!\n";
  11105. </pre>
  11106. <p>Perl will interpolate at runtime the value of the variable <code>$0</code>
  11107. into the argument of the <code>gettext()</code> function. Hence, this
  11108. argument is not a string constant but a variable argument (<code>$0</code>
  11109. is a global variable that holds the name of the Perl script being
  11110. executed). The interpolation is performed by Perl before the string
  11111. argument is passed to <code>gettext()</code> and will therefore depend on
  11112. the name of the script which can only be determined at runtime.
  11113. Consequently, it is almost impossible that a translation can be looked
  11114. up at runtime (except if, by accident, the interpolated string is found
  11115. in the message catalog).
  11116. <p>The <code>xgettext</code> program will therefore terminate parsing with a fatal
  11117. error if it encounters a variable inside of an extracted string. In
  11118. general, this will happen for all kinds of string interpolations that
  11119. cannot be safely performed at compile time. If you absolutely know
  11120. what you are doing, you can always circumvent this behavior:
  11121. <pre class="example"> my $know_what_i_am_doing = "This is program $0!\n";
  11122. print gettext $know_what_i_am_doing;
  11123. </pre>
  11124. <p>Since the parser only recognizes strings and quote-like expressions,
  11125. but not variables or other terms, the above construct will be
  11126. accepted. You will have to find another way, however, to let your
  11127. original string make it into your message catalog.
  11128. <p>If invoked with the option <code>--extract-all</code>, resp. <code>-a</code>,
  11129. variable interpolation will be accepted. Rationale: You will
  11130. generally use this option in order to prepare your sources for
  11131. internationalization.
  11132. <p>Please see the manual page &lsquo;<samp><span class="samp">man perlop</span></samp>&rsquo; for details of strings and
  11133. quote-like expressions that are subject to interpolation and those
  11134. that are not. Safe interpolations (that will not lead to a fatal
  11135. error) are:
  11136. <ul>
  11137. <li>the escape sequences <code>\t</code> (tab, HT, TAB), <code>\n</code>
  11138. (newline, NL), <code>\r</code> (return, CR), <code>\f</code> (form feed, FF),
  11139. <code>\b</code> (backspace, BS), <code>\a</code> (alarm, bell, BEL), and <code>\e</code>
  11140. (escape, ESC).
  11141. <li>octal chars, like <code>\033</code>
  11142. <br>
  11143. Note that octal escapes in the range of 400-777 are translated into a
  11144. UTF-8 representation, regardless of the presence of the <code>use utf8</code> pragma.
  11145. <li>hex chars, like <code>\x1b</code>
  11146. <li>wide hex chars, like <code>\x{263a}</code>
  11147. <br>
  11148. Note that this escape is translated into a UTF-8 representation,
  11149. regardless of the presence of the <code>use utf8</code> pragma.
  11150. <li>control chars, like <code>\c[</code> (CTRL-[)
  11151. <li>named Unicode chars, like <code>\N{LATIN CAPITAL LETTER C WITH CEDILLA}</code>
  11152. <br>
  11153. Note that this escape is translated into a UTF-8 representation,
  11154. regardless of the presence of the <code>use utf8</code> pragma.
  11155. </ul>
  11156. <p>The following escapes are considered partially safe:
  11157. <ul>
  11158. <li><code>\l</code> lowercase next char
  11159. <li><code>\u</code> uppercase next char
  11160. <li><code>\L</code> lowercase till \E
  11161. <li><code>\U</code> uppercase till \E
  11162. <li><code>\E</code> end case modification
  11163. <li><code>\Q</code> quote non-word characters till \E
  11164. </ul>
  11165. <p>These escapes are only considered safe if the string consists of
  11166. ASCII characters only. Translation of characters outside the range
  11167. defined by ASCII is locale-dependent and can actually only be performed
  11168. at runtime; <code>xgettext</code> doesn't do these locale-dependent translations
  11169. at extraction time.
  11170. <p>Except for the modifier <code>\Q</code>, these translations, albeit valid,
  11171. are generally useless and only obfuscate your sources. If a
  11172. translation can be safely performed at compile time you can just as
  11173. well write what you mean.
  11174. <div class="node">
  11175. <a name="Interpolation-II"></a>
  11176. <p><hr>
  11177. Next:&nbsp;<a rel="next" accesskey="n" href="#Parentheses">Parentheses</a>,
  11178. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Interpolation-I">Interpolation I</a>,
  11179. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  11180. </div>
  11181. <h5 class="subsubsection">15.5.18.6 Valid Uses Of String Interpolation</h5>
  11182. <p><a name="index-Perl-valid-string-interpolation-1250"></a>
  11183. Perl is often used to generate sources for other programming languages
  11184. or arbitrary file formats. Web applications that output HTML code
  11185. make a prominent example for such usage.
  11186. <p>You will often come across situations where you want to intersperse
  11187. code written in the target (programming) language with translatable
  11188. messages, like in the following HTML example:
  11189. <pre class="example"> print gettext &lt;&lt;EOF;
  11190. &lt;h1&gt;My Homepage&lt;/h1&gt;
  11191. &lt;script language="JavaScript"&gt;&lt;!--
  11192. for (i = 0; i &lt; 100; ++i) {
  11193. alert ("Thank you so much for visiting my homepage!");
  11194. }
  11195. //--&gt;&lt;/script&gt;
  11196. EOF
  11197. </pre>
  11198. <p>The parser will extract the entire here document, and it will appear
  11199. entirely in the resulting PO file, including the JavaScript snippet
  11200. embedded in the HTML code. If you exaggerate with constructs like
  11201. the above, you will run the risk that the translators of your package
  11202. will look out for a less challenging project. You should consider an
  11203. alternative expression here:
  11204. <pre class="example"> print &lt;&lt;EOF;
  11205. &lt;h1&gt;$gettext{"My Homepage"}&lt;/h1&gt;
  11206. &lt;script language="JavaScript"&gt;&lt;!--
  11207. for (i = 0; i &lt; 100; ++i) {
  11208. alert ("$gettext{'Thank you so much for visiting my homepage!'}");
  11209. }
  11210. //--&gt;&lt;/script&gt;
  11211. EOF
  11212. </pre>
  11213. <p>Only the translatable portions of the code will be extracted here, and
  11214. the resulting PO file will begrudgingly improve in terms of readability.
  11215. <p>You can interpolate hash lookups in all strings or quote-like
  11216. expressions that are subject to interpolation (see the manual page
  11217. &lsquo;<samp><span class="samp">man perlop</span></samp>&rsquo; for details). Double interpolation is invalid, however:
  11218. <pre class="example"> # TRANSLATORS: Replace "the earth" with the name of your planet.
  11219. print gettext qq{Welcome to $gettext-&gt;{"the earth"}};
  11220. </pre>
  11221. <p>The <code>qq</code>-quoted string is recognized as an argument to <code>xgettext</code> in
  11222. the first place, and checked for invalid variable interpolation. The
  11223. dollar sign of hash-dereferencing will therefore terminate the parser
  11224. with an &ldquo;invalid interpolation&rdquo; error.
  11225. <p>It is valid to interpolate hash lookups in regular expressions:
  11226. <pre class="example"> if ($var =~ /$gettext{"the earth"}/) {
  11227. print gettext "Match!\n";
  11228. }
  11229. s/$gettext{"U. S. A."}/$gettext{"U. S. A."} $gettext{"(dial +0)"}/g;
  11230. </pre>
  11231. <div class="node">
  11232. <a name="Parentheses"></a>
  11233. <p><hr>
  11234. Next:&nbsp;<a rel="next" accesskey="n" href="#Long-Lines">Long Lines</a>,
  11235. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Interpolation-II">Interpolation II</a>,
  11236. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  11237. </div>
  11238. <h5 class="subsubsection">15.5.18.7 When To Use Parentheses</h5>
  11239. <p><a name="index-Perl-parentheses-1251"></a>
  11240. In Perl, parentheses around function arguments are mostly optional.
  11241. <code>xgettext</code> will always assume that all
  11242. recognized keywords (except for hashes and hash references) are names
  11243. of properly prototyped functions, and will (hopefully) only require
  11244. parentheses where Perl itself requires them. All constructs in the
  11245. following example are therefore ok to use:
  11246. <pre class="example"> print gettext ("Hello World!\n");
  11247. print gettext "Hello World!\n";
  11248. print dgettext ($package =&gt; "Hello World!\n");
  11249. print dgettext $package, "Hello World!\n";
  11250. # The "fat comma" =&gt; turns the left-hand side argument into a
  11251. # single-quoted string!
  11252. print dgettext smellovision =&gt; "Hello World!\n";
  11253. # The following assignment only works with prototyped functions.
  11254. # Otherwise, the functions will act as "greedy" list operators and
  11255. # eat up all following arguments.
  11256. my $anonymous_hash = {
  11257. planet =&gt; gettext "earth",
  11258. cakes =&gt; ngettext "one cake", "several cakes", $n,
  11259. still =&gt; $works,
  11260. };
  11261. # The same without fat comma:
  11262. my $other_hash = {
  11263. 'planet', gettext "earth",
  11264. 'cakes', ngettext "one cake", "several cakes", $n,
  11265. 'still', $works,
  11266. };
  11267. # Parentheses are only significant for the first argument.
  11268. print dngettext 'package', ("one cake", "several cakes", $n), $discarded;
  11269. </pre>
  11270. <div class="node">
  11271. <a name="Long-Lines"></a>
  11272. <p><hr>
  11273. Next:&nbsp;<a rel="next" accesskey="n" href="#Perl-Pitfalls">Perl Pitfalls</a>,
  11274. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Parentheses">Parentheses</a>,
  11275. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  11276. </div>
  11277. <h5 class="subsubsection">15.5.18.8 How To Grok with Long Lines</h5>
  11278. <p><a name="index-Perl-long-lines-1252"></a>
  11279. The necessity of long messages can often lead to a cumbersome or
  11280. unreadable coding style. Perl has several options that may prevent
  11281. you from writing unreadable code, and
  11282. <code>xgettext</code> does its best to do likewise. This is where the dot
  11283. operator (the string concatenation operator) may come in handy:
  11284. <pre class="example"> print gettext ("This is a very long"
  11285. . " message that is still"
  11286. . " readable, because"
  11287. . " it is split into"
  11288. . " multiple lines.\n");
  11289. </pre>
  11290. <p>Perl is smart enough to concatenate these constant string fragments
  11291. into one long string at compile time, and so is
  11292. <code>xgettext</code>. You will only find one long message in the resulting
  11293. POT file.
  11294. <p>Note that the future Perl 6 will probably use the underscore
  11295. (&lsquo;<samp><span class="samp">_</span></samp>&rsquo;) as the string concatenation operator, and the dot
  11296. (&lsquo;<samp><span class="samp">.</span></samp>&rsquo;) for dereferencing. This new syntax is not yet supported by
  11297. <code>xgettext</code>.
  11298. <p>If embedded newline characters are not an issue, or even desired, you
  11299. may also insert newline characters inside quoted strings wherever you
  11300. feel like it:
  11301. <pre class="example"> print gettext ("&lt;em&gt;In HTML output
  11302. embedded newlines are generally no
  11303. problem, since adjacent whitespace
  11304. is always rendered into a single
  11305. space character.&lt;/em&gt;");
  11306. </pre>
  11307. <p>You may also consider to use here documents:
  11308. <pre class="example"> print gettext &lt;&lt;EOF;
  11309. &lt;em&gt;In HTML output
  11310. embedded newlines are generally no
  11311. problem, since adjacent whitespace
  11312. is always rendered into a single
  11313. space character.&lt;/em&gt;
  11314. EOF
  11315. </pre>
  11316. <p>Please do not forget that the line breaks are real, i.e. they
  11317. translate into newline characters that will consequently show up in
  11318. the resulting POT file.
  11319. <div class="node">
  11320. <a name="Perl-Pitfalls"></a>
  11321. <p><hr>
  11322. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Long-Lines">Long Lines</a>,
  11323. Up:&nbsp;<a rel="up" accesskey="u" href="#Perl">Perl</a>
  11324. </div>
  11325. <h5 class="subsubsection">15.5.18.9 Bugs, Pitfalls, And Things That Do Not Work</h5>
  11326. <p><a name="index-Perl-pitfalls-1253"></a>
  11327. The foregoing sections should have proven that
  11328. <code>xgettext</code> is quite smart in extracting translatable strings from
  11329. Perl sources. Yet, some more or less exotic constructs that could be
  11330. expected to work, actually do not work.
  11331. <p>One of the more relevant limitations can be found in the
  11332. implementation of variable interpolation inside quoted strings. Only
  11333. simple hash lookups can be used there:
  11334. <pre class="example"> print &lt;&lt;EOF;
  11335. $gettext{"The dot operator"
  11336. . " does not work"
  11337. . "here!"}
  11338. Likewise, you cannot @{[ gettext ("interpolate function calls") ]}
  11339. inside quoted strings or quote-like expressions.
  11340. EOF
  11341. </pre>
  11342. <p>This is valid Perl code and will actually trigger invocations of the
  11343. <code>gettext</code> function at runtime. Yet, the Perl parser in
  11344. <code>xgettext</code> will fail to recognize the strings. A less obvious
  11345. example can be found in the interpolation of regular expressions:
  11346. <pre class="example"> s/&lt;!--START_OF_WEEK--&gt;/gettext ("Sunday")/e;
  11347. </pre>
  11348. <p>The modifier <code>e</code> will cause the substitution to be interpreted as
  11349. an evaluable statement. Consequently, at runtime the function
  11350. <code>gettext()</code> is called, but again, the parser fails to extract the
  11351. string &ldquo;Sunday&rdquo;. Use a temporary variable as a simple workaround if
  11352. you really happen to need this feature:
  11353. <pre class="example"> my $sunday = gettext "Sunday";
  11354. s/&lt;!--START_OF_WEEK--&gt;/$sunday/;
  11355. </pre>
  11356. <p>Hash slices would also be handy but are not recognized:
  11357. <pre class="example"> my @weekdays = @gettext{'Sunday', 'Monday', 'Tuesday', 'Wednesday',
  11358. 'Thursday', 'Friday', 'Saturday'};
  11359. # Or even:
  11360. @weekdays = @gettext{qw (Sunday Monday Tuesday Wednesday Thursday
  11361. Friday Saturday) };
  11362. </pre>
  11363. <p>This is perfectly valid usage of the tied hash <code>%gettext</code> but the
  11364. strings are not recognized and therefore will not be extracted.
  11365. <p>Another caveat of the current version is its rudimentary support for
  11366. non-ASCII characters in identifiers. You may encounter serious
  11367. problems if you use identifiers with characters outside the range of
  11368. 'A'-'Z', 'a'-'z', '0'-'9' and the underscore '_'.
  11369. <p>Maybe some of these missing features will be implemented in future
  11370. versions, but since you can always make do without them at minimal effort,
  11371. these todos have very low priority.
  11372. <p>A nasty problem are brace format strings that already contain braces
  11373. as part of the normal text, for example the usage strings typically
  11374. encountered in programs:
  11375. <pre class="example"> die "usage: $0 {OPTIONS} FILENAME...\n";
  11376. </pre>
  11377. <p>If you want to internationalize this code with Perl brace format strings,
  11378. you will run into a problem:
  11379. <pre class="example"> die __x ("usage: {program} {OPTIONS} FILENAME...\n", program =&gt; $0);
  11380. </pre>
  11381. <p>Whereas &lsquo;<samp><span class="samp">{program}</span></samp>&rsquo; is a placeholder, &lsquo;<samp><span class="samp">{OPTIONS}</span></samp>&rsquo;
  11382. is not and should probably be translated. Yet, there is no way to teach
  11383. the Perl parser in <code>xgettext</code> to recognize the first one, and leave
  11384. the other one alone.
  11385. <p>There are two possible work-arounds for this problem. If you are
  11386. sure that your program will run under Perl 5.8.0 or newer (these
  11387. Perl versions handle positional parameters in <code>printf()</code>) or
  11388. if you are sure that the translator will not have to reorder the arguments
  11389. in her translation &ndash; for example if you have only one brace placeholder
  11390. in your string, or if it describes a syntax, like in this one &ndash;, you can
  11391. mark the string as <code>no-perl-brace-format</code> and use <code>printf()</code>:
  11392. <pre class="example"> # xgettext: no-perl-brace-format
  11393. die sprintf ("usage: %s {OPTIONS} FILENAME...\n", $0);
  11394. </pre>
  11395. <p>If you want to use the more portable Perl brace format, you will have to do
  11396. put placeholders in place of the literal braces:
  11397. <pre class="example"> die __x ("usage: {program} {[}OPTIONS{]} FILENAME...\n",
  11398. program =&gt; $0, '[' =&gt; '{', ']' =&gt; '}');
  11399. </pre>
  11400. <p>Perl brace format strings know no escaping mechanism. No matter how this
  11401. escaping mechanism looked like, it would either give the programmer a
  11402. hard time, make translating Perl brace format strings heavy-going, or
  11403. result in a performance penalty at runtime, when the format directives
  11404. get executed. Most of the time you will happily get along with
  11405. <code>printf()</code> for this special case.
  11406. <div class="node">
  11407. <a name="PHP"></a>
  11408. <p><hr>
  11409. Next:&nbsp;<a rel="next" accesskey="n" href="#Pike">Pike</a>,
  11410. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Perl">Perl</a>,
  11411. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  11412. </div>
  11413. <h4 class="subsection">15.5.19 PHP Hypertext Preprocessor</h4>
  11414. <p><a name="index-PHP-1254"></a>
  11415. <dl>
  11416. <dt>RPMs<dd>mod_php4, mod_php4-core, phpdoc
  11417. <br><dt>File extension<dd><code>php</code>, <code>php3</code>, <code>php4</code>
  11418. <br><dt>String syntax<dd><code>"abc"</code>, <code>'abc'</code>
  11419. <br><dt>gettext shorthand<dd><code>_("abc")</code>
  11420. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>dgettext</code>, <code>dcgettext</code>; starting with PHP 4.2.0
  11421. also <code>ngettext</code>, <code>dngettext</code>, <code>dcngettext</code>
  11422. <br><dt>textdomain<dd><code>textdomain</code> function
  11423. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  11424. <br><dt>setlocale<dd>Programmer must call <code>setlocale (LC_ALL, "")</code>
  11425. <br><dt>Prerequisite<dd>&mdash;
  11426. <br><dt>Use or emulate GNU gettext<dd>use
  11427. <br><dt>Extractor<dd><code>xgettext</code>
  11428. <br><dt>Formatting with positions<dd><code>printf "%2\$d %1\$d"</code>
  11429. <br><dt>Portability<dd>On platforms without gettext, the functions are not available.
  11430. <br><dt>po-mode marking<dd>&mdash;
  11431. </dl>
  11432. <p>An example is available in the <samp><span class="file">examples</span></samp> directory: <code>hello-php</code>.
  11433. <div class="node">
  11434. <a name="Pike"></a>
  11435. <p><hr>
  11436. Next:&nbsp;<a rel="next" accesskey="n" href="#GCC_002dsource">GCC-source</a>,
  11437. Previous:&nbsp;<a rel="previous" accesskey="p" href="#PHP">PHP</a>,
  11438. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  11439. </div>
  11440. <h4 class="subsection">15.5.20 Pike</h4>
  11441. <p><a name="index-Pike-1255"></a>
  11442. <dl>
  11443. <dt>RPMs<dd>roxen
  11444. <br><dt>File extension<dd><code>pike</code>
  11445. <br><dt>String syntax<dd><code>"abc"</code>
  11446. <br><dt>gettext shorthand<dd>&mdash;
  11447. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>dgettext</code>, <code>dcgettext</code>
  11448. <br><dt>textdomain<dd><code>textdomain</code> function
  11449. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  11450. <br><dt>setlocale<dd><code>setlocale</code> function
  11451. <br><dt>Prerequisite<dd><code>import Locale.Gettext;</code>
  11452. <br><dt>Use or emulate GNU gettext<dd>use
  11453. <br><dt>Extractor<dd>&mdash;
  11454. <br><dt>Formatting with positions<dd>&mdash;
  11455. <br><dt>Portability<dd>On platforms without gettext, the functions are not available.
  11456. <br><dt>po-mode marking<dd>&mdash;
  11457. </dl>
  11458. <div class="node">
  11459. <a name="GCC-source"></a>
  11460. <a name="GCC_002dsource"></a>
  11461. <p><hr>
  11462. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Pike">Pike</a>,
  11463. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Programming-Languages">List of Programming Languages</a>
  11464. </div>
  11465. <h4 class="subsection">15.5.21 GNU Compiler Collection sources</h4>
  11466. <p><a name="index-GCC_002dsource-1256"></a>
  11467. <dl>
  11468. <dt>RPMs<dd>gcc
  11469. <br><dt>File extension<dd><code>c</code>, <code>h</code>.
  11470. <br><dt>String syntax<dd><code>"abc"</code>
  11471. <br><dt>gettext shorthand<dd><code>_("abc")</code>
  11472. <br><dt>gettext/ngettext functions<dd><code>gettext</code>, <code>dgettext</code>, <code>dcgettext</code>, <code>ngettext</code>,
  11473. <code>dngettext</code>, <code>dcngettext</code>
  11474. <br><dt>textdomain<dd><code>textdomain</code> function
  11475. <br><dt>bindtextdomain<dd><code>bindtextdomain</code> function
  11476. <br><dt>setlocale<dd>Programmer must call <code>setlocale (LC_ALL, "")</code>
  11477. <br><dt>Prerequisite<dd><code>#include "intl.h"</code>
  11478. <br><dt>Use or emulate GNU gettext<dd>Use
  11479. <br><dt>Extractor<dd><code>xgettext -k_</code>
  11480. <br><dt>Formatting with positions<dd>&mdash;
  11481. <br><dt>Portability<dd>Uses autoconf macros
  11482. <br><dt>po-mode marking<dd>yes
  11483. </dl>
  11484. <!-- This is the template for new languages. -->
  11485. <div class="node">
  11486. <a name="List-of-Data-Formats"></a>
  11487. <p><hr>
  11488. Previous:&nbsp;<a rel="previous" accesskey="p" href="#List-of-Programming-Languages">List of Programming Languages</a>,
  11489. Up:&nbsp;<a rel="up" accesskey="u" href="#Programming-Languages">Programming Languages</a>
  11490. </div>
  11491. <h3 class="section">15.6 Internationalizable Data</h3>
  11492. <p>Here is a list of other data formats which can be internationalized
  11493. using GNU gettext.
  11494. <ul class="menu">
  11495. <li><a accesskey="1" href="#POT">POT</a>: POT - Portable Object Template
  11496. <li><a accesskey="2" href="#RST">RST</a>: Resource String Table
  11497. <li><a accesskey="3" href="#Glade">Glade</a>: Glade - GNOME user interface description
  11498. </ul>
  11499. <div class="node">
  11500. <a name="POT"></a>
  11501. <p><hr>
  11502. Next:&nbsp;<a rel="next" accesskey="n" href="#RST">RST</a>,
  11503. Previous:&nbsp;<a rel="previous" accesskey="p" href="#List-of-Data-Formats">List of Data Formats</a>,
  11504. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Data-Formats">List of Data Formats</a>
  11505. </div>
  11506. <h4 class="subsection">15.6.1 POT - Portable Object Template</h4>
  11507. <dl>
  11508. <dt>RPMs<dd>gettext
  11509. <br><dt>File extension<dd><code>pot</code>, <code>po</code>
  11510. <br><dt>Extractor<dd><code>xgettext</code>
  11511. </dl>
  11512. <div class="node">
  11513. <a name="RST"></a>
  11514. <p><hr>
  11515. Next:&nbsp;<a rel="next" accesskey="n" href="#Glade">Glade</a>,
  11516. Previous:&nbsp;<a rel="previous" accesskey="p" href="#POT">POT</a>,
  11517. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Data-Formats">List of Data Formats</a>
  11518. </div>
  11519. <h4 class="subsection">15.6.2 Resource String Table</h4>
  11520. <p><a name="index-RST-1257"></a>
  11521. <dl>
  11522. <dt>RPMs<dd>fpk
  11523. <br><dt>File extension<dd><code>rst</code>
  11524. <br><dt>Extractor<dd><code>xgettext</code>, <code>rstconv</code>
  11525. </dl>
  11526. <div class="node">
  11527. <a name="Glade"></a>
  11528. <p><hr>
  11529. Previous:&nbsp;<a rel="previous" accesskey="p" href="#RST">RST</a>,
  11530. Up:&nbsp;<a rel="up" accesskey="u" href="#List-of-Data-Formats">List of Data Formats</a>
  11531. </div>
  11532. <h4 class="subsection">15.6.3 Glade - GNOME user interface description</h4>
  11533. <dl>
  11534. <dt>RPMs<dd>glade, libglade, glade2, libglade2, intltool
  11535. <br><dt>File extension<dd><code>glade</code>, <code>glade2</code>
  11536. <br><dt>Extractor<dd><code>xgettext</code>, <code>libglade-xgettext</code>, <code>xml-i18n-extract</code>, <code>intltool-extract</code>
  11537. </dl>
  11538. <!-- This is the template for new data formats. -->
  11539. <div class="node">
  11540. <a name="Conclusion"></a>
  11541. <p><hr>
  11542. Next:&nbsp;<a rel="next" accesskey="n" href="#Language-Codes">Language Codes</a>,
  11543. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Programming-Languages">Programming Languages</a>,
  11544. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  11545. </div>
  11546. <h2 class="chapter">16 Concluding Remarks</h2>
  11547. <p>We would like to conclude this GNU <code>gettext</code> manual by presenting
  11548. an history of the Translation Project so far. We finally give
  11549. a few pointers for those who want to do further research or readings
  11550. about Native Language Support matters.
  11551. <ul class="menu">
  11552. <li><a accesskey="1" href="#History">History</a>: History of GNU <code>gettext</code>
  11553. <li><a accesskey="2" href="#References">References</a>: Related Readings
  11554. </ul>
  11555. <div class="node">
  11556. <a name="History"></a>
  11557. <p><hr>
  11558. Next:&nbsp;<a rel="next" accesskey="n" href="#References">References</a>,
  11559. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Conclusion">Conclusion</a>,
  11560. Up:&nbsp;<a rel="up" accesskey="u" href="#Conclusion">Conclusion</a>
  11561. </div>
  11562. <h3 class="section">16.1 History of GNU <code>gettext</code></h3>
  11563. <p><a name="index-history-of-GNU-_0040code_007bgettext_007d-1258"></a>
  11564. Internationalization concerns and algorithms have been informally
  11565. and casually discussed for years in GNU, sometimes around GNU
  11566. <code>libc</code>, maybe around the incoming <code>Hurd</code>, or otherwise
  11567. (nobody clearly remembers). And even then, when the work started for
  11568. real, this was somewhat independently of these previous discussions.
  11569. <p>This all began in July 1994, when Patrick D'Cruze had the idea and
  11570. initiative of internationalizing version 3.9.2 of GNU <code>fileutils</code>.
  11571. He then asked Jim Meyering, the maintainer, how to get those changes
  11572. folded into an official release. That first draft was full of
  11573. <code>#ifdef</code>s and somewhat disconcerting, and Jim wanted to find
  11574. nicer ways. Patrick and Jim shared some tries and experimentations
  11575. in this area. Then, feeling that this might eventually have a deeper
  11576. impact on GNU, Jim wanted to know what standards were, and contacted
  11577. Richard Stallman, who very quickly and verbally described an overall
  11578. design for what was meant to become <code>glocale</code>, at that time.
  11579. <p>Jim implemented <code>glocale</code> and got a lot of exhausting feedback
  11580. from Patrick and Richard, of course, but also from Mitchum DSouza
  11581. (who wrote a <code>catgets</code>-like package), Roland McGrath, maybe David
  11582. MacKenzie, Fran&ccedil;ois Pinard, and Paul Eggert, all pushing and
  11583. pulling in various directions, not always compatible, to the extent
  11584. that after a couple of test releases, <code>glocale</code> was torn apart.
  11585. In particular, Paul Eggert &ndash; always keeping an eye on developments
  11586. in Solaris &ndash; advocated the use of the <code>gettext</code> API over
  11587. <code>glocale</code>'s <code>catgets</code>-based API.
  11588. <p>While Jim took some distance and time and became dad for a second
  11589. time, Roland wanted to get GNU <code>libc</code> internationalized, and
  11590. got Ulrich Drepper involved in that project. Instead of starting
  11591. from <code>glocale</code>, Ulrich rewrote something from scratch, but
  11592. more conforming to the set of guidelines who emerged out of the
  11593. <code>glocale</code> effort. Then, Ulrich got people from the previous
  11594. forum to involve themselves into this new project, and the switch
  11595. from <code>glocale</code> to what was first named <code>msgutils</code>, renamed
  11596. <code>nlsutils</code>, and later <code>gettext</code>, became officially accepted
  11597. by Richard in May 1995 or so.
  11598. <p>Let's summarize by saying that Ulrich Drepper wrote GNU <code>gettext</code>
  11599. in April 1995. The first official release of the package, including
  11600. PO mode, occurred in July 1995, and was numbered 0.7. Other people
  11601. contributed to the effort by providing a discussion forum around
  11602. Ulrich, writing little pieces of code, or testing. These are quoted
  11603. in the <code>THANKS</code> file which comes with the GNU <code>gettext</code>
  11604. distribution.
  11605. <p>While this was being done, Fran&ccedil;ois adapted half a dozen of
  11606. GNU packages to <code>glocale</code> first, then later to <code>gettext</code>,
  11607. putting them in pretest, so providing along the way an effective
  11608. user environment for fine tuning the evolving tools. He also took
  11609. the responsibility of organizing and coordinating the Translation
  11610. Project. After nearly a year of informal exchanges between people from
  11611. many countries, translator teams started to exist in May 1995, through
  11612. the creation and support by Patrick D'Cruze of twenty unmoderated
  11613. mailing lists for that many native languages, and two moderated
  11614. lists: one for reaching all teams at once, the other for reaching
  11615. all willing maintainers of internationalized free software packages.
  11616. <p>Fran&ccedil;ois also wrote PO mode in June 1995 with the collaboration
  11617. of Greg McGary, as a kind of contribution to Ulrich's package.
  11618. He also gave a hand with the GNU <code>gettext</code> Texinfo manual.
  11619. <p>In 1997, Ulrich Drepper released the GNU libc 2.0, which included the
  11620. <code>gettext</code>, <code>textdomain</code> and <code>bindtextdomain</code> functions.
  11621. <p>In 2000, Ulrich Drepper added plural form handling (the <code>ngettext</code>
  11622. function) to GNU libc. Later, in 2001, he released GNU libc 2.2.x,
  11623. which is the first free C library with full internationalization support.
  11624. <p>Ulrich being quite busy in his role of General Maintainer of GNU libc,
  11625. he handed over the GNU <code>gettext</code> maintenance to Bruno Haible in
  11626. 2000. Bruno added the plural form handling to the tools as well, added
  11627. support for UTF-8 and CJK locales, and wrote a few new tools for
  11628. manipulating PO files.
  11629. <div class="node">
  11630. <a name="References"></a>
  11631. <p><hr>
  11632. Previous:&nbsp;<a rel="previous" accesskey="p" href="#History">History</a>,
  11633. Up:&nbsp;<a rel="up" accesskey="u" href="#Conclusion">Conclusion</a>
  11634. </div>
  11635. <h3 class="section">16.2 Related Readings</h3>
  11636. <p><a name="index-related-reading-1259"></a><a name="index-bibliography-1260"></a>
  11637. <strong> NOTE: </strong> This documentation section is outdated and needs to be
  11638. revised.
  11639. <p>Eugene H. Dorr (<samp><span class="file">dorre@well.com</span></samp>) maintains an interesting
  11640. bibliography on internationalization matters, called
  11641. <cite>Internationalization Reference List</cite>, which is available as:
  11642. <pre class="example"> ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt
  11643. </pre>
  11644. <p>Michael Gschwind (<samp><span class="file">mike@vlsivie.tuwien.ac.at</span></samp>) maintains a
  11645. Frequently Asked Questions (FAQ) list, entitled <cite>Programming for
  11646. Internationalisation</cite>. This FAQ discusses writing programs which
  11647. can handle different language conventions, character sets, etc.;
  11648. and is applicable to all character set encodings, with particular
  11649. emphasis on ISO&nbsp;8859-1<!-- /@w -->. It is regularly published in Usenet
  11650. groups <samp><span class="file">comp.unix.questions</span></samp>, <samp><span class="file">comp.std.internat</span></samp>,
  11651. <samp><span class="file">comp.software.international</span></samp>, <samp><span class="file">comp.lang.c</span></samp>,
  11652. <samp><span class="file">comp.windows.x</span></samp>, <samp><span class="file">comp.std.c</span></samp>, <samp><span class="file">comp.answers</span></samp>
  11653. and <samp><span class="file">news.answers</span></samp>. The home location of this document is:
  11654. <pre class="example"> ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming
  11655. </pre>
  11656. <p>Patrick D'Cruze (<samp><span class="file">pdcruze@li.org</span></samp>) wrote a tutorial about NLS
  11657. matters, and Jochen Hein (<samp><span class="file">Hein@student.tu-clausthal.de</span></samp>) took
  11658. over the responsibility of maintaining it. It may be found as:
  11659. <pre class="example"> ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/...
  11660. ...locale-tutorial-0.8.txt.gz
  11661. </pre>
  11662. <p class="noindent">This site is mirrored in:
  11663. <pre class="example"> ftp://ftp.ibp.fr/pub/linux/sunsite/
  11664. </pre>
  11665. <p>A French version of the same tutorial should be findable at:
  11666. <pre class="example"> ftp://ftp.ibp.fr/pub/linux/french/docs/
  11667. </pre>
  11668. <p class="noindent">together with French translations of many Linux-related documents.
  11669. <div class="node">
  11670. <a name="Language-Codes"></a>
  11671. <p><hr>
  11672. Next:&nbsp;<a rel="next" accesskey="n" href="#Country-Codes">Country Codes</a>,
  11673. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Conclusion">Conclusion</a>,
  11674. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  11675. </div>
  11676. <h2 class="appendix">Appendix A Language Codes</h2>
  11677. <p><a name="index-language-codes-1261"></a><a name="index-ISO-639-1262"></a>
  11678. The ISO&nbsp;639<!-- /@w --> standard defines two-letter codes for many languages, and
  11679. three-letter codes for more rarely used languages.
  11680. All abbreviations for languages used in the Translation Project should
  11681. come from this standard.
  11682. <ul class="menu">
  11683. <li><a accesskey="1" href="#Usual-Language-Codes">Usual Language Codes</a>: Two-letter ISO 639 language codes
  11684. <li><a accesskey="2" href="#Rare-Language-Codes">Rare Language Codes</a>: Three-letter ISO 639 language codes
  11685. </ul>
  11686. <div class="node">
  11687. <a name="Usual-Language-Codes"></a>
  11688. <p><hr>
  11689. Next:&nbsp;<a rel="next" accesskey="n" href="#Rare-Language-Codes">Rare Language Codes</a>,
  11690. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-Codes">Language Codes</a>,
  11691. Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Codes">Language Codes</a>
  11692. </div>
  11693. <h3 class="appendixsec">A.1 Usual Language Codes</h3>
  11694. <p>For the commonly used languages, the ISO&nbsp;639-1<!-- /@w --> standard defines two-letter
  11695. codes.
  11696. <dl>
  11697. <dt>&lsquo;<samp><span class="samp">aa</span></samp>&rsquo;<dd>Afar.
  11698. <br><dt>&lsquo;<samp><span class="samp">ab</span></samp>&rsquo;<dd>Abkhazian.
  11699. <br><dt>&lsquo;<samp><span class="samp">ae</span></samp>&rsquo;<dd>Avestan.
  11700. <br><dt>&lsquo;<samp><span class="samp">af</span></samp>&rsquo;<dd>Afrikaans.
  11701. <br><dt>&lsquo;<samp><span class="samp">ak</span></samp>&rsquo;<dd>Akan.
  11702. <br><dt>&lsquo;<samp><span class="samp">am</span></samp>&rsquo;<dd>Amharic.
  11703. <br><dt>&lsquo;<samp><span class="samp">an</span></samp>&rsquo;<dd>Aragonese.
  11704. <br><dt>&lsquo;<samp><span class="samp">ar</span></samp>&rsquo;<dd>Arabic.
  11705. <br><dt>&lsquo;<samp><span class="samp">as</span></samp>&rsquo;<dd>Assamese.
  11706. <br><dt>&lsquo;<samp><span class="samp">av</span></samp>&rsquo;<dd>Avaric.
  11707. <br><dt>&lsquo;<samp><span class="samp">ay</span></samp>&rsquo;<dd>Aymara.
  11708. <br><dt>&lsquo;<samp><span class="samp">az</span></samp>&rsquo;<dd>Azerbaijani.
  11709. <br><dt>&lsquo;<samp><span class="samp">ba</span></samp>&rsquo;<dd>Bashkir.
  11710. <br><dt>&lsquo;<samp><span class="samp">be</span></samp>&rsquo;<dd>Belarusian.
  11711. <br><dt>&lsquo;<samp><span class="samp">bg</span></samp>&rsquo;<dd>Bulgarian.
  11712. <br><dt>&lsquo;<samp><span class="samp">bh</span></samp>&rsquo;<dd>Bihari.
  11713. <br><dt>&lsquo;<samp><span class="samp">bi</span></samp>&rsquo;<dd>Bislama.
  11714. <br><dt>&lsquo;<samp><span class="samp">bm</span></samp>&rsquo;<dd>Bambara.
  11715. <br><dt>&lsquo;<samp><span class="samp">bn</span></samp>&rsquo;<dd>Bengali; Bangla.
  11716. <br><dt>&lsquo;<samp><span class="samp">bo</span></samp>&rsquo;<dd>Tibetan.
  11717. <br><dt>&lsquo;<samp><span class="samp">br</span></samp>&rsquo;<dd>Breton.
  11718. <br><dt>&lsquo;<samp><span class="samp">bs</span></samp>&rsquo;<dd>Bosnian.
  11719. <br><dt>&lsquo;<samp><span class="samp">ca</span></samp>&rsquo;<dd>Catalan.
  11720. <br><dt>&lsquo;<samp><span class="samp">ce</span></samp>&rsquo;<dd>Chechen.
  11721. <br><dt>&lsquo;<samp><span class="samp">ch</span></samp>&rsquo;<dd>Chamorro.
  11722. <br><dt>&lsquo;<samp><span class="samp">co</span></samp>&rsquo;<dd>Corsican.
  11723. <br><dt>&lsquo;<samp><span class="samp">cr</span></samp>&rsquo;<dd>Cree.
  11724. <br><dt>&lsquo;<samp><span class="samp">cs</span></samp>&rsquo;<dd>Czech.
  11725. <br><dt>&lsquo;<samp><span class="samp">cu</span></samp>&rsquo;<dd>Church Slavic.
  11726. <br><dt>&lsquo;<samp><span class="samp">cv</span></samp>&rsquo;<dd>Chuvash.
  11727. <br><dt>&lsquo;<samp><span class="samp">cy</span></samp>&rsquo;<dd>Welsh.
  11728. <br><dt>&lsquo;<samp><span class="samp">da</span></samp>&rsquo;<dd>Danish.
  11729. <br><dt>&lsquo;<samp><span class="samp">de</span></samp>&rsquo;<dd>German.
  11730. <br><dt>&lsquo;<samp><span class="samp">dv</span></samp>&rsquo;<dd>Divehi; Maldivian.
  11731. <br><dt>&lsquo;<samp><span class="samp">dz</span></samp>&rsquo;<dd>Dzongkha; Bhutani.
  11732. <br><dt>&lsquo;<samp><span class="samp">ee</span></samp>&rsquo;<dd>&Eacute;w&eacute;.
  11733. <br><dt>&lsquo;<samp><span class="samp">el</span></samp>&rsquo;<dd>Greek.
  11734. <br><dt>&lsquo;<samp><span class="samp">en</span></samp>&rsquo;<dd>English.
  11735. <br><dt>&lsquo;<samp><span class="samp">eo</span></samp>&rsquo;<dd>Esperanto.
  11736. <br><dt>&lsquo;<samp><span class="samp">es</span></samp>&rsquo;<dd>Spanish.
  11737. <br><dt>&lsquo;<samp><span class="samp">et</span></samp>&rsquo;<dd>Estonian.
  11738. <br><dt>&lsquo;<samp><span class="samp">eu</span></samp>&rsquo;<dd>Basque.
  11739. <br><dt>&lsquo;<samp><span class="samp">fa</span></samp>&rsquo;<dd>Persian.
  11740. <br><dt>&lsquo;<samp><span class="samp">ff</span></samp>&rsquo;<dd>Fulah.
  11741. <br><dt>&lsquo;<samp><span class="samp">fi</span></samp>&rsquo;<dd>Finnish.
  11742. <br><dt>&lsquo;<samp><span class="samp">fj</span></samp>&rsquo;<dd>Fijian; Fiji.
  11743. <br><dt>&lsquo;<samp><span class="samp">fo</span></samp>&rsquo;<dd>Faroese.
  11744. <br><dt>&lsquo;<samp><span class="samp">fr</span></samp>&rsquo;<dd>French.
  11745. <br><dt>&lsquo;<samp><span class="samp">fy</span></samp>&rsquo;<dd>Western Frisian.
  11746. <br><dt>&lsquo;<samp><span class="samp">ga</span></samp>&rsquo;<dd>Irish.
  11747. <br><dt>&lsquo;<samp><span class="samp">gd</span></samp>&rsquo;<dd>Scottish Gaelic.
  11748. <br><dt>&lsquo;<samp><span class="samp">gl</span></samp>&rsquo;<dd>Galician.
  11749. <br><dt>&lsquo;<samp><span class="samp">gn</span></samp>&rsquo;<dd>Guarani.
  11750. <br><dt>&lsquo;<samp><span class="samp">gu</span></samp>&rsquo;<dd>Gujarati.
  11751. <br><dt>&lsquo;<samp><span class="samp">gv</span></samp>&rsquo;<dd>Manx.
  11752. <br><dt>&lsquo;<samp><span class="samp">ha</span></samp>&rsquo;<dd>Hausa.
  11753. <br><dt>&lsquo;<samp><span class="samp">he</span></samp>&rsquo;<dd>Hebrew (formerly iw).
  11754. <br><dt>&lsquo;<samp><span class="samp">hi</span></samp>&rsquo;<dd>Hindi.
  11755. <br><dt>&lsquo;<samp><span class="samp">ho</span></samp>&rsquo;<dd>Hiri Motu.
  11756. <br><dt>&lsquo;<samp><span class="samp">hr</span></samp>&rsquo;<dd>Croatian.
  11757. <br><dt>&lsquo;<samp><span class="samp">ht</span></samp>&rsquo;<dd>Haitian; Haitian Creole.
  11758. <br><dt>&lsquo;<samp><span class="samp">hu</span></samp>&rsquo;<dd>Hungarian.
  11759. <br><dt>&lsquo;<samp><span class="samp">hy</span></samp>&rsquo;<dd>Armenian.
  11760. <br><dt>&lsquo;<samp><span class="samp">hz</span></samp>&rsquo;<dd>Herero.
  11761. <br><dt>&lsquo;<samp><span class="samp">ia</span></samp>&rsquo;<dd>Interlingua.
  11762. <br><dt>&lsquo;<samp><span class="samp">id</span></samp>&rsquo;<dd>Indonesian (formerly in).
  11763. <br><dt>&lsquo;<samp><span class="samp">ie</span></samp>&rsquo;<dd>Interlingue; Occidental.
  11764. <br><dt>&lsquo;<samp><span class="samp">ig</span></samp>&rsquo;<dd>Igbo.
  11765. <br><dt>&lsquo;<samp><span class="samp">ii</span></samp>&rsquo;<dd>Sichuan Yi; Nuosu.
  11766. <br><dt>&lsquo;<samp><span class="samp">ik</span></samp>&rsquo;<dd>Inupiak; Inupiaq.
  11767. <br><dt>&lsquo;<samp><span class="samp">io</span></samp>&rsquo;<dd>Ido.
  11768. <br><dt>&lsquo;<samp><span class="samp">is</span></samp>&rsquo;<dd>Icelandic.
  11769. <br><dt>&lsquo;<samp><span class="samp">it</span></samp>&rsquo;<dd>Italian.
  11770. <br><dt>&lsquo;<samp><span class="samp">iu</span></samp>&rsquo;<dd>Inuktitut.
  11771. <br><dt>&lsquo;<samp><span class="samp">ja</span></samp>&rsquo;<dd>Japanese.
  11772. <br><dt>&lsquo;<samp><span class="samp">jv</span></samp>&rsquo;<dd>Javanese.
  11773. <br><dt>&lsquo;<samp><span class="samp">ka</span></samp>&rsquo;<dd>Georgian.
  11774. <br><dt>&lsquo;<samp><span class="samp">kg</span></samp>&rsquo;<dd>Kongo.
  11775. <br><dt>&lsquo;<samp><span class="samp">ki</span></samp>&rsquo;<dd>Kikuyu; Gikuyu.
  11776. <br><dt>&lsquo;<samp><span class="samp">kj</span></samp>&rsquo;<dd>Kuanyama; Kwanyama.
  11777. <br><dt>&lsquo;<samp><span class="samp">kk</span></samp>&rsquo;<dd>Kazakh.
  11778. <br><dt>&lsquo;<samp><span class="samp">kl</span></samp>&rsquo;<dd>Kalaallisut; Greenlandic.
  11779. <br><dt>&lsquo;<samp><span class="samp">km</span></samp>&rsquo;<dd>Central Khmer; Cambodian.
  11780. <br><dt>&lsquo;<samp><span class="samp">kn</span></samp>&rsquo;<dd>Kannada.
  11781. <br><dt>&lsquo;<samp><span class="samp">ko</span></samp>&rsquo;<dd>Korean.
  11782. <br><dt>&lsquo;<samp><span class="samp">kr</span></samp>&rsquo;<dd>Kanuri.
  11783. <br><dt>&lsquo;<samp><span class="samp">ks</span></samp>&rsquo;<dd>Kashmiri.
  11784. <br><dt>&lsquo;<samp><span class="samp">ku</span></samp>&rsquo;<dd>Kurdish.
  11785. <br><dt>&lsquo;<samp><span class="samp">kv</span></samp>&rsquo;<dd>Komi.
  11786. <br><dt>&lsquo;<samp><span class="samp">kw</span></samp>&rsquo;<dd>Cornish.
  11787. <br><dt>&lsquo;<samp><span class="samp">ky</span></samp>&rsquo;<dd>Kirghiz.
  11788. <br><dt>&lsquo;<samp><span class="samp">la</span></samp>&rsquo;<dd>Latin.
  11789. <br><dt>&lsquo;<samp><span class="samp">lb</span></samp>&rsquo;<dd>Letzeburgesch; Luxembourgish.
  11790. <br><dt>&lsquo;<samp><span class="samp">lg</span></samp>&rsquo;<dd>Ganda.
  11791. <br><dt>&lsquo;<samp><span class="samp">li</span></samp>&rsquo;<dd>Limburgish; Limburger; Limburgan.
  11792. <br><dt>&lsquo;<samp><span class="samp">ln</span></samp>&rsquo;<dd>Lingala.
  11793. <br><dt>&lsquo;<samp><span class="samp">lo</span></samp>&rsquo;<dd>Lao; Laotian.
  11794. <br><dt>&lsquo;<samp><span class="samp">lt</span></samp>&rsquo;<dd>Lithuanian.
  11795. <br><dt>&lsquo;<samp><span class="samp">lu</span></samp>&rsquo;<dd>Luba-Katanga.
  11796. <br><dt>&lsquo;<samp><span class="samp">lv</span></samp>&rsquo;<dd>Latvian; Lettish.
  11797. <br><dt>&lsquo;<samp><span class="samp">mg</span></samp>&rsquo;<dd>Malagasy.
  11798. <br><dt>&lsquo;<samp><span class="samp">mh</span></samp>&rsquo;<dd>Marshallese.
  11799. <br><dt>&lsquo;<samp><span class="samp">mi</span></samp>&rsquo;<dd>Maori.
  11800. <br><dt>&lsquo;<samp><span class="samp">mk</span></samp>&rsquo;<dd>Macedonian.
  11801. <br><dt>&lsquo;<samp><span class="samp">ml</span></samp>&rsquo;<dd>Malayalam.
  11802. <br><dt>&lsquo;<samp><span class="samp">mn</span></samp>&rsquo;<dd>Mongolian.
  11803. <br><dt>&lsquo;<samp><span class="samp">mo</span></samp>&rsquo;<dd>Moldavian.
  11804. <br><dt>&lsquo;<samp><span class="samp">mr</span></samp>&rsquo;<dd>Marathi.
  11805. <br><dt>&lsquo;<samp><span class="samp">ms</span></samp>&rsquo;<dd>Malay.
  11806. <br><dt>&lsquo;<samp><span class="samp">mt</span></samp>&rsquo;<dd>Maltese.
  11807. <br><dt>&lsquo;<samp><span class="samp">my</span></samp>&rsquo;<dd>Burmese.
  11808. <br><dt>&lsquo;<samp><span class="samp">na</span></samp>&rsquo;<dd>Nauru.
  11809. <br><dt>&lsquo;<samp><span class="samp">nb</span></samp>&rsquo;<dd>Norwegian Bokm&aring;l.
  11810. <br><dt>&lsquo;<samp><span class="samp">nd</span></samp>&rsquo;<dd>Ndebele, North.
  11811. <br><dt>&lsquo;<samp><span class="samp">ne</span></samp>&rsquo;<dd>Nepali.
  11812. <br><dt>&lsquo;<samp><span class="samp">ng</span></samp>&rsquo;<dd>Ndonga.
  11813. <br><dt>&lsquo;<samp><span class="samp">nl</span></samp>&rsquo;<dd>Dutch.
  11814. <br><dt>&lsquo;<samp><span class="samp">nn</span></samp>&rsquo;<dd>Norwegian Nynorsk.
  11815. <br><dt>&lsquo;<samp><span class="samp">no</span></samp>&rsquo;<dd>Norwegian.
  11816. <br><dt>&lsquo;<samp><span class="samp">nr</span></samp>&rsquo;<dd>Ndebele, South.
  11817. <br><dt>&lsquo;<samp><span class="samp">nv</span></samp>&rsquo;<dd>Navajo; Navaho.
  11818. <br><dt>&lsquo;<samp><span class="samp">ny</span></samp>&rsquo;<dd>Chichewa; Nyanja.
  11819. <br><dt>&lsquo;<samp><span class="samp">oc</span></samp>&rsquo;<dd>Occitan; Proven&ccedil;al.
  11820. <br><dt>&lsquo;<samp><span class="samp">oj</span></samp>&rsquo;<dd>Ojibwa.
  11821. <br><dt>&lsquo;<samp><span class="samp">om</span></samp>&rsquo;<dd>(Afan) Oromo.
  11822. <br><dt>&lsquo;<samp><span class="samp">or</span></samp>&rsquo;<dd>Oriya.
  11823. <br><dt>&lsquo;<samp><span class="samp">os</span></samp>&rsquo;<dd>Ossetian; Ossetic.
  11824. <br><dt>&lsquo;<samp><span class="samp">pa</span></samp>&rsquo;<dd>Panjabi; Punjabi.
  11825. <br><dt>&lsquo;<samp><span class="samp">pi</span></samp>&rsquo;<dd>Pali.
  11826. <br><dt>&lsquo;<samp><span class="samp">pl</span></samp>&rsquo;<dd>Polish.
  11827. <br><dt>&lsquo;<samp><span class="samp">ps</span></samp>&rsquo;<dd>Pashto; Pushto.
  11828. <br><dt>&lsquo;<samp><span class="samp">pt</span></samp>&rsquo;<dd>Portuguese.
  11829. <br><dt>&lsquo;<samp><span class="samp">qu</span></samp>&rsquo;<dd>Quechua.
  11830. <br><dt>&lsquo;<samp><span class="samp">rm</span></samp>&rsquo;<dd>Romansh.
  11831. <br><dt>&lsquo;<samp><span class="samp">rn</span></samp>&rsquo;<dd>Rundi; Kirundi.
  11832. <br><dt>&lsquo;<samp><span class="samp">ro</span></samp>&rsquo;<dd>Romanian.
  11833. <br><dt>&lsquo;<samp><span class="samp">ru</span></samp>&rsquo;<dd>Russian.
  11834. <br><dt>&lsquo;<samp><span class="samp">rw</span></samp>&rsquo;<dd>Kinyarwanda.
  11835. <br><dt>&lsquo;<samp><span class="samp">sa</span></samp>&rsquo;<dd>Sanskrit.
  11836. <br><dt>&lsquo;<samp><span class="samp">sc</span></samp>&rsquo;<dd>Sardinian.
  11837. <br><dt>&lsquo;<samp><span class="samp">sd</span></samp>&rsquo;<dd>Sindhi.
  11838. <br><dt>&lsquo;<samp><span class="samp">se</span></samp>&rsquo;<dd>Northern Sami.
  11839. <br><dt>&lsquo;<samp><span class="samp">sg</span></samp>&rsquo;<dd>Sango; Sangro.
  11840. <br><dt>&lsquo;<samp><span class="samp">si</span></samp>&rsquo;<dd>Sinhala; Sinhalese.
  11841. <br><dt>&lsquo;<samp><span class="samp">sk</span></samp>&rsquo;<dd>Slovak.
  11842. <br><dt>&lsquo;<samp><span class="samp">sl</span></samp>&rsquo;<dd>Slovenian.
  11843. <br><dt>&lsquo;<samp><span class="samp">sm</span></samp>&rsquo;<dd>Samoan.
  11844. <br><dt>&lsquo;<samp><span class="samp">sn</span></samp>&rsquo;<dd>Shona.
  11845. <br><dt>&lsquo;<samp><span class="samp">so</span></samp>&rsquo;<dd>Somali.
  11846. <br><dt>&lsquo;<samp><span class="samp">sq</span></samp>&rsquo;<dd>Albanian.
  11847. <br><dt>&lsquo;<samp><span class="samp">sr</span></samp>&rsquo;<dd>Serbian.
  11848. <br><dt>&lsquo;<samp><span class="samp">ss</span></samp>&rsquo;<dd>Swati; Siswati.
  11849. <br><dt>&lsquo;<samp><span class="samp">st</span></samp>&rsquo;<dd>Sesotho; Sotho, Southern.
  11850. <br><dt>&lsquo;<samp><span class="samp">su</span></samp>&rsquo;<dd>Sundanese.
  11851. <br><dt>&lsquo;<samp><span class="samp">sv</span></samp>&rsquo;<dd>Swedish.
  11852. <br><dt>&lsquo;<samp><span class="samp">sw</span></samp>&rsquo;<dd>Swahili.
  11853. <br><dt>&lsquo;<samp><span class="samp">ta</span></samp>&rsquo;<dd>Tamil.
  11854. <br><dt>&lsquo;<samp><span class="samp">te</span></samp>&rsquo;<dd>Telugu.
  11855. <br><dt>&lsquo;<samp><span class="samp">tg</span></samp>&rsquo;<dd>Tajik.
  11856. <br><dt>&lsquo;<samp><span class="samp">th</span></samp>&rsquo;<dd>Thai.
  11857. <br><dt>&lsquo;<samp><span class="samp">ti</span></samp>&rsquo;<dd>Tigrinya.
  11858. <br><dt>&lsquo;<samp><span class="samp">tk</span></samp>&rsquo;<dd>Turkmen.
  11859. <br><dt>&lsquo;<samp><span class="samp">tl</span></samp>&rsquo;<dd>Tagalog.
  11860. <br><dt>&lsquo;<samp><span class="samp">tn</span></samp>&rsquo;<dd>Tswana; Setswana.
  11861. <br><dt>&lsquo;<samp><span class="samp">to</span></samp>&rsquo;<dd>Tonga.
  11862. <br><dt>&lsquo;<samp><span class="samp">tr</span></samp>&rsquo;<dd>Turkish.
  11863. <br><dt>&lsquo;<samp><span class="samp">ts</span></samp>&rsquo;<dd>Tsonga.
  11864. <br><dt>&lsquo;<samp><span class="samp">tt</span></samp>&rsquo;<dd>Tatar.
  11865. <br><dt>&lsquo;<samp><span class="samp">tw</span></samp>&rsquo;<dd>Twi.
  11866. <br><dt>&lsquo;<samp><span class="samp">ty</span></samp>&rsquo;<dd>Tahitian.
  11867. <br><dt>&lsquo;<samp><span class="samp">ug</span></samp>&rsquo;<dd>Uighur.
  11868. <br><dt>&lsquo;<samp><span class="samp">uk</span></samp>&rsquo;<dd>Ukrainian.
  11869. <br><dt>&lsquo;<samp><span class="samp">ur</span></samp>&rsquo;<dd>Urdu.
  11870. <br><dt>&lsquo;<samp><span class="samp">uz</span></samp>&rsquo;<dd>Uzbek.
  11871. <br><dt>&lsquo;<samp><span class="samp">ve</span></samp>&rsquo;<dd>Venda.
  11872. <br><dt>&lsquo;<samp><span class="samp">vi</span></samp>&rsquo;<dd>Vietnamese.
  11873. <br><dt>&lsquo;<samp><span class="samp">vo</span></samp>&rsquo;<dd>Volap&uuml;k; Volapuk.
  11874. <br><dt>&lsquo;<samp><span class="samp">wa</span></samp>&rsquo;<dd>Walloon.
  11875. <br><dt>&lsquo;<samp><span class="samp">wo</span></samp>&rsquo;<dd>Wolof.
  11876. <br><dt>&lsquo;<samp><span class="samp">xh</span></samp>&rsquo;<dd>Xhosa.
  11877. <br><dt>&lsquo;<samp><span class="samp">yi</span></samp>&rsquo;<dd>Yiddish (formerly ji).
  11878. <br><dt>&lsquo;<samp><span class="samp">yo</span></samp>&rsquo;<dd>Yoruba.
  11879. <br><dt>&lsquo;<samp><span class="samp">za</span></samp>&rsquo;<dd>Zhuang.
  11880. <br><dt>&lsquo;<samp><span class="samp">zh</span></samp>&rsquo;<dd>Chinese.
  11881. <br><dt>&lsquo;<samp><span class="samp">zu</span></samp>&rsquo;<dd>Zulu.
  11882. </dl>
  11883. <div class="node">
  11884. <a name="Rare-Language-Codes"></a>
  11885. <p><hr>
  11886. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Usual-Language-Codes">Usual Language Codes</a>,
  11887. Up:&nbsp;<a rel="up" accesskey="u" href="#Language-Codes">Language Codes</a>
  11888. </div>
  11889. <h3 class="appendixsec">A.2 Rare Language Codes</h3>
  11890. <p>For rarely used languages, the ISO&nbsp;639-2<!-- /@w --> standard defines three-letter
  11891. codes. Here is the current list, reduced to only living languages with at least
  11892. one million of speakers.
  11893. <dl>
  11894. <dt>&lsquo;<samp><span class="samp">ace</span></samp>&rsquo;<dd>Achinese.
  11895. <br><dt>&lsquo;<samp><span class="samp">awa</span></samp>&rsquo;<dd>Awadhi.
  11896. <br><dt>&lsquo;<samp><span class="samp">bal</span></samp>&rsquo;<dd>Baluchi.
  11897. <br><dt>&lsquo;<samp><span class="samp">ban</span></samp>&rsquo;<dd>Balinese.
  11898. <br><dt>&lsquo;<samp><span class="samp">bej</span></samp>&rsquo;<dd>Beja; Bedawiyet.
  11899. <br><dt>&lsquo;<samp><span class="samp">bem</span></samp>&rsquo;<dd>Bemba.
  11900. <br><dt>&lsquo;<samp><span class="samp">bho</span></samp>&rsquo;<dd>Bhojpuri.
  11901. <br><dt>&lsquo;<samp><span class="samp">bik</span></samp>&rsquo;<dd>Bikol.
  11902. <br><dt>&lsquo;<samp><span class="samp">bin</span></samp>&rsquo;<dd>Bini; Edo.
  11903. <br><dt>&lsquo;<samp><span class="samp">bug</span></samp>&rsquo;<dd>Buginese.
  11904. <br><dt>&lsquo;<samp><span class="samp">ceb</span></samp>&rsquo;<dd>Cebuano.
  11905. <br><dt>&lsquo;<samp><span class="samp">din</span></samp>&rsquo;<dd>Dinka.
  11906. <br><dt>&lsquo;<samp><span class="samp">doi</span></samp>&rsquo;<dd>Dogri.
  11907. <br><dt>&lsquo;<samp><span class="samp">fil</span></samp>&rsquo;<dd>Filipino; Pilipino.
  11908. <br><dt>&lsquo;<samp><span class="samp">fon</span></samp>&rsquo;<dd>Fon.
  11909. <br><dt>&lsquo;<samp><span class="samp">gon</span></samp>&rsquo;<dd>Gondi.
  11910. <br><dt>&lsquo;<samp><span class="samp">gsw</span></samp>&rsquo;<dd>Swiss German; Alemannic; Alsatian.
  11911. <br><dt>&lsquo;<samp><span class="samp">hil</span></samp>&rsquo;<dd>Hiligaynon.
  11912. <br><dt>&lsquo;<samp><span class="samp">hmn</span></samp>&rsquo;<dd>Hmong.
  11913. <br><dt>&lsquo;<samp><span class="samp">ilo</span></samp>&rsquo;<dd>Iloko.
  11914. <br><dt>&lsquo;<samp><span class="samp">kab</span></samp>&rsquo;<dd>Kabyle.
  11915. <br><dt>&lsquo;<samp><span class="samp">kam</span></samp>&rsquo;<dd>Kamba.
  11916. <br><dt>&lsquo;<samp><span class="samp">kbd</span></samp>&rsquo;<dd>Kabardian.
  11917. <br><dt>&lsquo;<samp><span class="samp">kmb</span></samp>&rsquo;<dd>Kimbundu.
  11918. <br><dt>&lsquo;<samp><span class="samp">kok</span></samp>&rsquo;<dd>Konkani.
  11919. <br><dt>&lsquo;<samp><span class="samp">kru</span></samp>&rsquo;<dd>Kurukh.
  11920. <br><dt>&lsquo;<samp><span class="samp">lua</span></samp>&rsquo;<dd>Luba-Lulua.
  11921. <br><dt>&lsquo;<samp><span class="samp">luo</span></samp>&rsquo;<dd>Luo (Kenya and Tanzania).
  11922. <br><dt>&lsquo;<samp><span class="samp">mad</span></samp>&rsquo;<dd>Madurese.
  11923. <br><dt>&lsquo;<samp><span class="samp">mag</span></samp>&rsquo;<dd>Magahi.
  11924. <br><dt>&lsquo;<samp><span class="samp">mai</span></samp>&rsquo;<dd>Maithili.
  11925. <br><dt>&lsquo;<samp><span class="samp">mak</span></samp>&rsquo;<dd>Makasar.
  11926. <br><dt>&lsquo;<samp><span class="samp">man</span></samp>&rsquo;<dd>Mandingo.
  11927. <br><dt>&lsquo;<samp><span class="samp">men</span></samp>&rsquo;<dd>Mende.
  11928. <br><dt>&lsquo;<samp><span class="samp">min</span></samp>&rsquo;<dd>Minangkabau.
  11929. <br><dt>&lsquo;<samp><span class="samp">mni</span></samp>&rsquo;<dd>Manipuri.
  11930. <br><dt>&lsquo;<samp><span class="samp">mos</span></samp>&rsquo;<dd>Mossi.
  11931. <br><dt>&lsquo;<samp><span class="samp">mwr</span></samp>&rsquo;<dd>Marwari.
  11932. <br><dt>&lsquo;<samp><span class="samp">nap</span></samp>&rsquo;<dd>Neapolitan.
  11933. <br><dt>&lsquo;<samp><span class="samp">nso</span></samp>&rsquo;<dd>Pedi; Sepedi; Northern Sotho.
  11934. <br><dt>&lsquo;<samp><span class="samp">nym</span></samp>&rsquo;<dd>Nyamwezi.
  11935. <br><dt>&lsquo;<samp><span class="samp">nyn</span></samp>&rsquo;<dd>Nyankole.
  11936. <br><dt>&lsquo;<samp><span class="samp">pag</span></samp>&rsquo;<dd>Pangasinan.
  11937. <br><dt>&lsquo;<samp><span class="samp">pam</span></samp>&rsquo;<dd>Pampanga; Kapampangan.
  11938. <br><dt>&lsquo;<samp><span class="samp">raj</span></samp>&rsquo;<dd>Rajasthani.
  11939. <br><dt>&lsquo;<samp><span class="samp">sas</span></samp>&rsquo;<dd>Sasak.
  11940. <br><dt>&lsquo;<samp><span class="samp">sat</span></samp>&rsquo;<dd>Santali.
  11941. <br><dt>&lsquo;<samp><span class="samp">scn</span></samp>&rsquo;<dd>Sicilian.
  11942. <br><dt>&lsquo;<samp><span class="samp">shn</span></samp>&rsquo;<dd>Shan.
  11943. <br><dt>&lsquo;<samp><span class="samp">sid</span></samp>&rsquo;<dd>Sidamo.
  11944. <br><dt>&lsquo;<samp><span class="samp">srr</span></samp>&rsquo;<dd>Serer.
  11945. <br><dt>&lsquo;<samp><span class="samp">suk</span></samp>&rsquo;<dd>Sukuma.
  11946. <br><dt>&lsquo;<samp><span class="samp">sus</span></samp>&rsquo;<dd>Susu.
  11947. <br><dt>&lsquo;<samp><span class="samp">tem</span></samp>&rsquo;<dd>Timne.
  11948. <br><dt>&lsquo;<samp><span class="samp">tiv</span></samp>&rsquo;<dd>Tiv.
  11949. <br><dt>&lsquo;<samp><span class="samp">tum</span></samp>&rsquo;<dd>Tumbuka.
  11950. <br><dt>&lsquo;<samp><span class="samp">umb</span></samp>&rsquo;<dd>Umbundu.
  11951. <br><dt>&lsquo;<samp><span class="samp">wal</span></samp>&rsquo;<dd>Walamo.
  11952. <br><dt>&lsquo;<samp><span class="samp">war</span></samp>&rsquo;<dd>Waray.
  11953. <br><dt>&lsquo;<samp><span class="samp">yao</span></samp>&rsquo;<dd>Yao.
  11954. </dl>
  11955. <div class="node">
  11956. <a name="Country-Codes"></a>
  11957. <p><hr>
  11958. Next:&nbsp;<a rel="next" accesskey="n" href="#Licenses">Licenses</a>,
  11959. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Language-Codes">Language Codes</a>,
  11960. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  11961. </div>
  11962. <h2 class="appendix">Appendix B Country Codes</h2>
  11963. <p><a name="index-country-codes-1263"></a><a name="index-ISO-3166-1264"></a>
  11964. The ISO&nbsp;3166<!-- /@w --> standard defines two character codes for many countries
  11965. and territories. All abbreviations for countries used in the Translation
  11966. Project should come from this standard.
  11967. <dl>
  11968. <dt>&lsquo;<samp><span class="samp">AD</span></samp>&rsquo;<dd>Andorra.
  11969. <br><dt>&lsquo;<samp><span class="samp">AE</span></samp>&rsquo;<dd>United Arab Emirates.
  11970. <br><dt>&lsquo;<samp><span class="samp">AF</span></samp>&rsquo;<dd>Afghanistan.
  11971. <br><dt>&lsquo;<samp><span class="samp">AG</span></samp>&rsquo;<dd>Antigua and Barbuda.
  11972. <br><dt>&lsquo;<samp><span class="samp">AI</span></samp>&rsquo;<dd>Anguilla.
  11973. <br><dt>&lsquo;<samp><span class="samp">AL</span></samp>&rsquo;<dd>Albania.
  11974. <br><dt>&lsquo;<samp><span class="samp">AM</span></samp>&rsquo;<dd>Armenia.
  11975. <br><dt>&lsquo;<samp><span class="samp">AN</span></samp>&rsquo;<dd>Netherlands Antilles.
  11976. <br><dt>&lsquo;<samp><span class="samp">AO</span></samp>&rsquo;<dd>Angola.
  11977. <br><dt>&lsquo;<samp><span class="samp">AQ</span></samp>&rsquo;<dd>Antarctica.
  11978. <br><dt>&lsquo;<samp><span class="samp">AR</span></samp>&rsquo;<dd>Argentina.
  11979. <br><dt>&lsquo;<samp><span class="samp">AS</span></samp>&rsquo;<dd>Samoa (American).
  11980. <br><dt>&lsquo;<samp><span class="samp">AT</span></samp>&rsquo;<dd>Austria.
  11981. <br><dt>&lsquo;<samp><span class="samp">AU</span></samp>&rsquo;<dd>Australia.
  11982. <br><dt>&lsquo;<samp><span class="samp">AW</span></samp>&rsquo;<dd>Aruba.
  11983. <br><dt>&lsquo;<samp><span class="samp">AX</span></samp>&rsquo;<dd>Aaland Islands.
  11984. <br><dt>&lsquo;<samp><span class="samp">AZ</span></samp>&rsquo;<dd>Azerbaijan.
  11985. <br><dt>&lsquo;<samp><span class="samp">BA</span></samp>&rsquo;<dd>Bosnia and Herzegovina.
  11986. <br><dt>&lsquo;<samp><span class="samp">BB</span></samp>&rsquo;<dd>Barbados.
  11987. <br><dt>&lsquo;<samp><span class="samp">BD</span></samp>&rsquo;<dd>Bangladesh.
  11988. <br><dt>&lsquo;<samp><span class="samp">BE</span></samp>&rsquo;<dd>Belgium.
  11989. <br><dt>&lsquo;<samp><span class="samp">BF</span></samp>&rsquo;<dd>Burkina Faso.
  11990. <br><dt>&lsquo;<samp><span class="samp">BG</span></samp>&rsquo;<dd>Bulgaria.
  11991. <br><dt>&lsquo;<samp><span class="samp">BH</span></samp>&rsquo;<dd>Bahrain.
  11992. <br><dt>&lsquo;<samp><span class="samp">BI</span></samp>&rsquo;<dd>Burundi.
  11993. <br><dt>&lsquo;<samp><span class="samp">BJ</span></samp>&rsquo;<dd>Benin.
  11994. <br><dt>&lsquo;<samp><span class="samp">BM</span></samp>&rsquo;<dd>Bermuda.
  11995. <br><dt>&lsquo;<samp><span class="samp">BN</span></samp>&rsquo;<dd>Brunei.
  11996. <br><dt>&lsquo;<samp><span class="samp">BO</span></samp>&rsquo;<dd>Bolivia.
  11997. <br><dt>&lsquo;<samp><span class="samp">BR</span></samp>&rsquo;<dd>Brazil.
  11998. <br><dt>&lsquo;<samp><span class="samp">BS</span></samp>&rsquo;<dd>Bahamas.
  11999. <br><dt>&lsquo;<samp><span class="samp">BT</span></samp>&rsquo;<dd>Bhutan.
  12000. <br><dt>&lsquo;<samp><span class="samp">BV</span></samp>&rsquo;<dd>Bouvet Island.
  12001. <br><dt>&lsquo;<samp><span class="samp">BW</span></samp>&rsquo;<dd>Botswana.
  12002. <br><dt>&lsquo;<samp><span class="samp">BY</span></samp>&rsquo;<dd>Belarus.
  12003. <br><dt>&lsquo;<samp><span class="samp">BZ</span></samp>&rsquo;<dd>Belize.
  12004. <br><dt>&lsquo;<samp><span class="samp">CA</span></samp>&rsquo;<dd>Canada.
  12005. <br><dt>&lsquo;<samp><span class="samp">CC</span></samp>&rsquo;<dd>Cocos (Keeling) Islands.
  12006. <br><dt>&lsquo;<samp><span class="samp">CD</span></samp>&rsquo;<dd>Congo (Dem. Rep.).
  12007. <br><dt>&lsquo;<samp><span class="samp">CF</span></samp>&rsquo;<dd>Central African Republic.
  12008. <br><dt>&lsquo;<samp><span class="samp">CG</span></samp>&rsquo;<dd>Congo (Rep.).
  12009. <br><dt>&lsquo;<samp><span class="samp">CH</span></samp>&rsquo;<dd>Switzerland.
  12010. <br><dt>&lsquo;<samp><span class="samp">CI</span></samp>&rsquo;<dd>C&ocirc;te d'Ivoire.
  12011. <br><dt>&lsquo;<samp><span class="samp">CK</span></samp>&rsquo;<dd>Cook Islands.
  12012. <br><dt>&lsquo;<samp><span class="samp">CL</span></samp>&rsquo;<dd>Chile.
  12013. <br><dt>&lsquo;<samp><span class="samp">CM</span></samp>&rsquo;<dd>Cameroon.
  12014. <br><dt>&lsquo;<samp><span class="samp">CN</span></samp>&rsquo;<dd>China.
  12015. <br><dt>&lsquo;<samp><span class="samp">CO</span></samp>&rsquo;<dd>Colombia.
  12016. <br><dt>&lsquo;<samp><span class="samp">CR</span></samp>&rsquo;<dd>Costa Rica.
  12017. <br><dt>&lsquo;<samp><span class="samp">CU</span></samp>&rsquo;<dd>Cuba.
  12018. <br><dt>&lsquo;<samp><span class="samp">CV</span></samp>&rsquo;<dd>Cape Verde.
  12019. <br><dt>&lsquo;<samp><span class="samp">CX</span></samp>&rsquo;<dd>Christmas Island.
  12020. <br><dt>&lsquo;<samp><span class="samp">CY</span></samp>&rsquo;<dd>Cyprus.
  12021. <br><dt>&lsquo;<samp><span class="samp">CZ</span></samp>&rsquo;<dd>Czech Republic.
  12022. <br><dt>&lsquo;<samp><span class="samp">DE</span></samp>&rsquo;<dd>Germany.
  12023. <br><dt>&lsquo;<samp><span class="samp">DJ</span></samp>&rsquo;<dd>Djibouti.
  12024. <br><dt>&lsquo;<samp><span class="samp">DK</span></samp>&rsquo;<dd>Denmark.
  12025. <br><dt>&lsquo;<samp><span class="samp">DM</span></samp>&rsquo;<dd>Dominica.
  12026. <br><dt>&lsquo;<samp><span class="samp">DO</span></samp>&rsquo;<dd>Dominican Republic.
  12027. <br><dt>&lsquo;<samp><span class="samp">DZ</span></samp>&rsquo;<dd>Algeria.
  12028. <br><dt>&lsquo;<samp><span class="samp">EC</span></samp>&rsquo;<dd>Ecuador.
  12029. <br><dt>&lsquo;<samp><span class="samp">EE</span></samp>&rsquo;<dd>Estonia.
  12030. <br><dt>&lsquo;<samp><span class="samp">EG</span></samp>&rsquo;<dd>Egypt.
  12031. <br><dt>&lsquo;<samp><span class="samp">EH</span></samp>&rsquo;<dd>Western Sahara.
  12032. <br><dt>&lsquo;<samp><span class="samp">ER</span></samp>&rsquo;<dd>Eritrea.
  12033. <br><dt>&lsquo;<samp><span class="samp">ES</span></samp>&rsquo;<dd>Spain.
  12034. <br><dt>&lsquo;<samp><span class="samp">ET</span></samp>&rsquo;<dd>Ethiopia.
  12035. <br><dt>&lsquo;<samp><span class="samp">FI</span></samp>&rsquo;<dd>Finland.
  12036. <br><dt>&lsquo;<samp><span class="samp">FJ</span></samp>&rsquo;<dd>Fiji.
  12037. <br><dt>&lsquo;<samp><span class="samp">FK</span></samp>&rsquo;<dd>Falkland Islands.
  12038. <br><dt>&lsquo;<samp><span class="samp">FM</span></samp>&rsquo;<dd>Micronesia.
  12039. <br><dt>&lsquo;<samp><span class="samp">FO</span></samp>&rsquo;<dd>Faeroe Islands.
  12040. <br><dt>&lsquo;<samp><span class="samp">FR</span></samp>&rsquo;<dd>France.
  12041. <br><dt>&lsquo;<samp><span class="samp">GA</span></samp>&rsquo;<dd>Gabon.
  12042. <br><dt>&lsquo;<samp><span class="samp">GB</span></samp>&rsquo;<dd>Britain (United Kingdom).
  12043. <br><dt>&lsquo;<samp><span class="samp">GD</span></samp>&rsquo;<dd>Grenada.
  12044. <br><dt>&lsquo;<samp><span class="samp">GE</span></samp>&rsquo;<dd>Georgia.
  12045. <br><dt>&lsquo;<samp><span class="samp">GF</span></samp>&rsquo;<dd>French Guiana.
  12046. <br><dt>&lsquo;<samp><span class="samp">GG</span></samp>&rsquo;<dd>Guernsey.
  12047. <br><dt>&lsquo;<samp><span class="samp">GH</span></samp>&rsquo;<dd>Ghana.
  12048. <br><dt>&lsquo;<samp><span class="samp">GI</span></samp>&rsquo;<dd>Gibraltar.
  12049. <br><dt>&lsquo;<samp><span class="samp">GL</span></samp>&rsquo;<dd>Greenland.
  12050. <br><dt>&lsquo;<samp><span class="samp">GM</span></samp>&rsquo;<dd>Gambia.
  12051. <br><dt>&lsquo;<samp><span class="samp">GN</span></samp>&rsquo;<dd>Guinea.
  12052. <br><dt>&lsquo;<samp><span class="samp">GP</span></samp>&rsquo;<dd>Guadeloupe.
  12053. <br><dt>&lsquo;<samp><span class="samp">GQ</span></samp>&rsquo;<dd>Equatorial Guinea.
  12054. <br><dt>&lsquo;<samp><span class="samp">GR</span></samp>&rsquo;<dd>Greece.
  12055. <br><dt>&lsquo;<samp><span class="samp">GS</span></samp>&rsquo;<dd>South Georgia and the South Sandwich Islands.
  12056. <br><dt>&lsquo;<samp><span class="samp">GT</span></samp>&rsquo;<dd>Guatemala.
  12057. <br><dt>&lsquo;<samp><span class="samp">GU</span></samp>&rsquo;<dd>Guam.
  12058. <br><dt>&lsquo;<samp><span class="samp">GW</span></samp>&rsquo;<dd>Guinea-Bissau.
  12059. <br><dt>&lsquo;<samp><span class="samp">GY</span></samp>&rsquo;<dd>Guyana.
  12060. <br><dt>&lsquo;<samp><span class="samp">HK</span></samp>&rsquo;<dd>Hong Kong.
  12061. <br><dt>&lsquo;<samp><span class="samp">HM</span></samp>&rsquo;<dd>Heard Island and McDonald Islands.
  12062. <br><dt>&lsquo;<samp><span class="samp">HN</span></samp>&rsquo;<dd>Honduras.
  12063. <br><dt>&lsquo;<samp><span class="samp">HR</span></samp>&rsquo;<dd>Croatia.
  12064. <br><dt>&lsquo;<samp><span class="samp">HT</span></samp>&rsquo;<dd>Haiti.
  12065. <br><dt>&lsquo;<samp><span class="samp">HU</span></samp>&rsquo;<dd>Hungary.
  12066. <br><dt>&lsquo;<samp><span class="samp">ID</span></samp>&rsquo;<dd>Indonesia.
  12067. <br><dt>&lsquo;<samp><span class="samp">IE</span></samp>&rsquo;<dd>Ireland.
  12068. <br><dt>&lsquo;<samp><span class="samp">IL</span></samp>&rsquo;<dd>Israel.
  12069. <br><dt>&lsquo;<samp><span class="samp">IM</span></samp>&rsquo;<dd>Isle of Man.
  12070. <br><dt>&lsquo;<samp><span class="samp">IN</span></samp>&rsquo;<dd>India.
  12071. <br><dt>&lsquo;<samp><span class="samp">IO</span></samp>&rsquo;<dd>British Indian Ocean Territory.
  12072. <br><dt>&lsquo;<samp><span class="samp">IQ</span></samp>&rsquo;<dd>Iraq.
  12073. <br><dt>&lsquo;<samp><span class="samp">IR</span></samp>&rsquo;<dd>Iran.
  12074. <br><dt>&lsquo;<samp><span class="samp">IS</span></samp>&rsquo;<dd>Iceland.
  12075. <br><dt>&lsquo;<samp><span class="samp">IT</span></samp>&rsquo;<dd>Italy.
  12076. <br><dt>&lsquo;<samp><span class="samp">JE</span></samp>&rsquo;<dd>Jersey.
  12077. <br><dt>&lsquo;<samp><span class="samp">JM</span></samp>&rsquo;<dd>Jamaica.
  12078. <br><dt>&lsquo;<samp><span class="samp">JO</span></samp>&rsquo;<dd>Jordan.
  12079. <br><dt>&lsquo;<samp><span class="samp">JP</span></samp>&rsquo;<dd>Japan.
  12080. <br><dt>&lsquo;<samp><span class="samp">KE</span></samp>&rsquo;<dd>Kenya.
  12081. <br><dt>&lsquo;<samp><span class="samp">KG</span></samp>&rsquo;<dd>Kyrgyzstan.
  12082. <br><dt>&lsquo;<samp><span class="samp">KH</span></samp>&rsquo;<dd>Cambodia.
  12083. <br><dt>&lsquo;<samp><span class="samp">KI</span></samp>&rsquo;<dd>Kiribati.
  12084. <br><dt>&lsquo;<samp><span class="samp">KM</span></samp>&rsquo;<dd>Comoros.
  12085. <br><dt>&lsquo;<samp><span class="samp">KN</span></samp>&rsquo;<dd>St Kitts and Nevis.
  12086. <br><dt>&lsquo;<samp><span class="samp">KP</span></samp>&rsquo;<dd>Korea (North).
  12087. <br><dt>&lsquo;<samp><span class="samp">KR</span></samp>&rsquo;<dd>Korea (South).
  12088. <br><dt>&lsquo;<samp><span class="samp">KW</span></samp>&rsquo;<dd>Kuwait.
  12089. <br><dt>&lsquo;<samp><span class="samp">KY</span></samp>&rsquo;<dd>Cayman Islands.
  12090. <br><dt>&lsquo;<samp><span class="samp">KZ</span></samp>&rsquo;<dd>Kazakhstan.
  12091. <br><dt>&lsquo;<samp><span class="samp">LA</span></samp>&rsquo;<dd>Laos.
  12092. <br><dt>&lsquo;<samp><span class="samp">LB</span></samp>&rsquo;<dd>Lebanon.
  12093. <br><dt>&lsquo;<samp><span class="samp">LC</span></samp>&rsquo;<dd>St Lucia.
  12094. <br><dt>&lsquo;<samp><span class="samp">LI</span></samp>&rsquo;<dd>Liechtenstein.
  12095. <br><dt>&lsquo;<samp><span class="samp">LK</span></samp>&rsquo;<dd>Sri Lanka.
  12096. <br><dt>&lsquo;<samp><span class="samp">LR</span></samp>&rsquo;<dd>Liberia.
  12097. <br><dt>&lsquo;<samp><span class="samp">LS</span></samp>&rsquo;<dd>Lesotho.
  12098. <br><dt>&lsquo;<samp><span class="samp">LT</span></samp>&rsquo;<dd>Lithuania.
  12099. <br><dt>&lsquo;<samp><span class="samp">LU</span></samp>&rsquo;<dd>Luxembourg.
  12100. <br><dt>&lsquo;<samp><span class="samp">LV</span></samp>&rsquo;<dd>Latvia.
  12101. <br><dt>&lsquo;<samp><span class="samp">LY</span></samp>&rsquo;<dd>Libya.
  12102. <br><dt>&lsquo;<samp><span class="samp">MA</span></samp>&rsquo;<dd>Morocco.
  12103. <br><dt>&lsquo;<samp><span class="samp">MC</span></samp>&rsquo;<dd>Monaco.
  12104. <br><dt>&lsquo;<samp><span class="samp">MD</span></samp>&rsquo;<dd>Moldova.
  12105. <br><dt>&lsquo;<samp><span class="samp">ME</span></samp>&rsquo;<dd>Montenegro.
  12106. <br><dt>&lsquo;<samp><span class="samp">MG</span></samp>&rsquo;<dd>Madagascar.
  12107. <br><dt>&lsquo;<samp><span class="samp">MH</span></samp>&rsquo;<dd>Marshall Islands.
  12108. <br><dt>&lsquo;<samp><span class="samp">MK</span></samp>&rsquo;<dd>Macedonia.
  12109. <br><dt>&lsquo;<samp><span class="samp">ML</span></samp>&rsquo;<dd>Mali.
  12110. <br><dt>&lsquo;<samp><span class="samp">MM</span></samp>&rsquo;<dd>Myanmar (Burma).
  12111. <br><dt>&lsquo;<samp><span class="samp">MN</span></samp>&rsquo;<dd>Mongolia.
  12112. <br><dt>&lsquo;<samp><span class="samp">MO</span></samp>&rsquo;<dd>Macao.
  12113. <br><dt>&lsquo;<samp><span class="samp">MP</span></samp>&rsquo;<dd>Northern Mariana Islands.
  12114. <br><dt>&lsquo;<samp><span class="samp">MQ</span></samp>&rsquo;<dd>Martinique.
  12115. <br><dt>&lsquo;<samp><span class="samp">MR</span></samp>&rsquo;<dd>Mauritania.
  12116. <br><dt>&lsquo;<samp><span class="samp">MS</span></samp>&rsquo;<dd>Montserrat.
  12117. <br><dt>&lsquo;<samp><span class="samp">MT</span></samp>&rsquo;<dd>Malta.
  12118. <br><dt>&lsquo;<samp><span class="samp">MU</span></samp>&rsquo;<dd>Mauritius.
  12119. <br><dt>&lsquo;<samp><span class="samp">MV</span></samp>&rsquo;<dd>Maldives.
  12120. <br><dt>&lsquo;<samp><span class="samp">MW</span></samp>&rsquo;<dd>Malawi.
  12121. <br><dt>&lsquo;<samp><span class="samp">MX</span></samp>&rsquo;<dd>Mexico.
  12122. <br><dt>&lsquo;<samp><span class="samp">MY</span></samp>&rsquo;<dd>Malaysia.
  12123. <br><dt>&lsquo;<samp><span class="samp">MZ</span></samp>&rsquo;<dd>Mozambique.
  12124. <br><dt>&lsquo;<samp><span class="samp">NA</span></samp>&rsquo;<dd>Namibia.
  12125. <br><dt>&lsquo;<samp><span class="samp">NC</span></samp>&rsquo;<dd>New Caledonia.
  12126. <br><dt>&lsquo;<samp><span class="samp">NE</span></samp>&rsquo;<dd>Niger.
  12127. <br><dt>&lsquo;<samp><span class="samp">NF</span></samp>&rsquo;<dd>Norfolk Island.
  12128. <br><dt>&lsquo;<samp><span class="samp">NG</span></samp>&rsquo;<dd>Nigeria.
  12129. <br><dt>&lsquo;<samp><span class="samp">NI</span></samp>&rsquo;<dd>Nicaragua.
  12130. <br><dt>&lsquo;<samp><span class="samp">NL</span></samp>&rsquo;<dd>Netherlands.
  12131. <br><dt>&lsquo;<samp><span class="samp">NO</span></samp>&rsquo;<dd>Norway.
  12132. <br><dt>&lsquo;<samp><span class="samp">NP</span></samp>&rsquo;<dd>Nepal.
  12133. <br><dt>&lsquo;<samp><span class="samp">NR</span></samp>&rsquo;<dd>Nauru.
  12134. <br><dt>&lsquo;<samp><span class="samp">NU</span></samp>&rsquo;<dd>Niue.
  12135. <br><dt>&lsquo;<samp><span class="samp">NZ</span></samp>&rsquo;<dd>New Zealand.
  12136. <br><dt>&lsquo;<samp><span class="samp">OM</span></samp>&rsquo;<dd>Oman.
  12137. <br><dt>&lsquo;<samp><span class="samp">PA</span></samp>&rsquo;<dd>Panama.
  12138. <br><dt>&lsquo;<samp><span class="samp">PE</span></samp>&rsquo;<dd>Peru.
  12139. <br><dt>&lsquo;<samp><span class="samp">PF</span></samp>&rsquo;<dd>French Polynesia.
  12140. <br><dt>&lsquo;<samp><span class="samp">PG</span></samp>&rsquo;<dd>Papua New Guinea.
  12141. <br><dt>&lsquo;<samp><span class="samp">PH</span></samp>&rsquo;<dd>Philippines.
  12142. <br><dt>&lsquo;<samp><span class="samp">PK</span></samp>&rsquo;<dd>Pakistan.
  12143. <br><dt>&lsquo;<samp><span class="samp">PL</span></samp>&rsquo;<dd>Poland.
  12144. <br><dt>&lsquo;<samp><span class="samp">PM</span></samp>&rsquo;<dd>St Pierre and Miquelon.
  12145. <br><dt>&lsquo;<samp><span class="samp">PN</span></samp>&rsquo;<dd>Pitcairn.
  12146. <br><dt>&lsquo;<samp><span class="samp">PR</span></samp>&rsquo;<dd>Puerto Rico.
  12147. <br><dt>&lsquo;<samp><span class="samp">PS</span></samp>&rsquo;<dd>Palestine.
  12148. <br><dt>&lsquo;<samp><span class="samp">PT</span></samp>&rsquo;<dd>Portugal.
  12149. <br><dt>&lsquo;<samp><span class="samp">PW</span></samp>&rsquo;<dd>Palau.
  12150. <br><dt>&lsquo;<samp><span class="samp">PY</span></samp>&rsquo;<dd>Paraguay.
  12151. <br><dt>&lsquo;<samp><span class="samp">QA</span></samp>&rsquo;<dd>Qatar.
  12152. <br><dt>&lsquo;<samp><span class="samp">RE</span></samp>&rsquo;<dd>Reunion.
  12153. <br><dt>&lsquo;<samp><span class="samp">RO</span></samp>&rsquo;<dd>Romania.
  12154. <br><dt>&lsquo;<samp><span class="samp">RS</span></samp>&rsquo;<dd>Serbia.
  12155. <br><dt>&lsquo;<samp><span class="samp">RU</span></samp>&rsquo;<dd>Russia.
  12156. <br><dt>&lsquo;<samp><span class="samp">RW</span></samp>&rsquo;<dd>Rwanda.
  12157. <br><dt>&lsquo;<samp><span class="samp">SA</span></samp>&rsquo;<dd>Saudi Arabia.
  12158. <br><dt>&lsquo;<samp><span class="samp">SB</span></samp>&rsquo;<dd>Solomon Islands.
  12159. <br><dt>&lsquo;<samp><span class="samp">SC</span></samp>&rsquo;<dd>Seychelles.
  12160. <br><dt>&lsquo;<samp><span class="samp">SD</span></samp>&rsquo;<dd>Sudan.
  12161. <br><dt>&lsquo;<samp><span class="samp">SE</span></samp>&rsquo;<dd>Sweden.
  12162. <br><dt>&lsquo;<samp><span class="samp">SG</span></samp>&rsquo;<dd>Singapore.
  12163. <br><dt>&lsquo;<samp><span class="samp">SH</span></samp>&rsquo;<dd>St Helena.
  12164. <br><dt>&lsquo;<samp><span class="samp">SI</span></samp>&rsquo;<dd>Slovenia.
  12165. <br><dt>&lsquo;<samp><span class="samp">SJ</span></samp>&rsquo;<dd>Svalbard and Jan Mayen.
  12166. <br><dt>&lsquo;<samp><span class="samp">SK</span></samp>&rsquo;<dd>Slovakia.
  12167. <br><dt>&lsquo;<samp><span class="samp">SL</span></samp>&rsquo;<dd>Sierra Leone.
  12168. <br><dt>&lsquo;<samp><span class="samp">SM</span></samp>&rsquo;<dd>San Marino.
  12169. <br><dt>&lsquo;<samp><span class="samp">SN</span></samp>&rsquo;<dd>Senegal.
  12170. <br><dt>&lsquo;<samp><span class="samp">SO</span></samp>&rsquo;<dd>Somalia.
  12171. <br><dt>&lsquo;<samp><span class="samp">SR</span></samp>&rsquo;<dd>Suriname.
  12172. <br><dt>&lsquo;<samp><span class="samp">ST</span></samp>&rsquo;<dd>Sao Tome and Principe.
  12173. <br><dt>&lsquo;<samp><span class="samp">SV</span></samp>&rsquo;<dd>El Salvador.
  12174. <br><dt>&lsquo;<samp><span class="samp">SY</span></samp>&rsquo;<dd>Syria.
  12175. <br><dt>&lsquo;<samp><span class="samp">SZ</span></samp>&rsquo;<dd>Swaziland.
  12176. <br><dt>&lsquo;<samp><span class="samp">TC</span></samp>&rsquo;<dd>Turks and Caicos Islands.
  12177. <br><dt>&lsquo;<samp><span class="samp">TD</span></samp>&rsquo;<dd>Chad.
  12178. <br><dt>&lsquo;<samp><span class="samp">TF</span></samp>&rsquo;<dd>French Southern and Antarctic Lands.
  12179. <br><dt>&lsquo;<samp><span class="samp">TG</span></samp>&rsquo;<dd>Togo.
  12180. <br><dt>&lsquo;<samp><span class="samp">TH</span></samp>&rsquo;<dd>Thailand.
  12181. <br><dt>&lsquo;<samp><span class="samp">TJ</span></samp>&rsquo;<dd>Tajikistan.
  12182. <br><dt>&lsquo;<samp><span class="samp">TK</span></samp>&rsquo;<dd>Tokelau.
  12183. <br><dt>&lsquo;<samp><span class="samp">TL</span></samp>&rsquo;<dd>Timor-Leste.
  12184. <br><dt>&lsquo;<samp><span class="samp">TM</span></samp>&rsquo;<dd>Turkmenistan.
  12185. <br><dt>&lsquo;<samp><span class="samp">TN</span></samp>&rsquo;<dd>Tunisia.
  12186. <br><dt>&lsquo;<samp><span class="samp">TO</span></samp>&rsquo;<dd>Tonga.
  12187. <br><dt>&lsquo;<samp><span class="samp">TR</span></samp>&rsquo;<dd>Turkey.
  12188. <br><dt>&lsquo;<samp><span class="samp">TT</span></samp>&rsquo;<dd>Trinidad and Tobago.
  12189. <br><dt>&lsquo;<samp><span class="samp">TV</span></samp>&rsquo;<dd>Tuvalu.
  12190. <br><dt>&lsquo;<samp><span class="samp">TW</span></samp>&rsquo;<dd>Taiwan.
  12191. <br><dt>&lsquo;<samp><span class="samp">TZ</span></samp>&rsquo;<dd>Tanzania.
  12192. <br><dt>&lsquo;<samp><span class="samp">UA</span></samp>&rsquo;<dd>Ukraine.
  12193. <br><dt>&lsquo;<samp><span class="samp">UG</span></samp>&rsquo;<dd>Uganda.
  12194. <br><dt>&lsquo;<samp><span class="samp">UM</span></samp>&rsquo;<dd>US minor outlying islands.
  12195. <br><dt>&lsquo;<samp><span class="samp">US</span></samp>&rsquo;<dd>United States.
  12196. <br><dt>&lsquo;<samp><span class="samp">UY</span></samp>&rsquo;<dd>Uruguay.
  12197. <br><dt>&lsquo;<samp><span class="samp">UZ</span></samp>&rsquo;<dd>Uzbekistan.
  12198. <br><dt>&lsquo;<samp><span class="samp">VA</span></samp>&rsquo;<dd>Vatican City.
  12199. <br><dt>&lsquo;<samp><span class="samp">VC</span></samp>&rsquo;<dd>St Vincent and the Grenadines.
  12200. <br><dt>&lsquo;<samp><span class="samp">VE</span></samp>&rsquo;<dd>Venezuela.
  12201. <br><dt>&lsquo;<samp><span class="samp">VG</span></samp>&rsquo;<dd>Virgin Islands (UK).
  12202. <br><dt>&lsquo;<samp><span class="samp">VI</span></samp>&rsquo;<dd>Virgin Islands (US).
  12203. <br><dt>&lsquo;<samp><span class="samp">VN</span></samp>&rsquo;<dd>Vietnam.
  12204. <br><dt>&lsquo;<samp><span class="samp">VU</span></samp>&rsquo;<dd>Vanuatu.
  12205. <br><dt>&lsquo;<samp><span class="samp">WF</span></samp>&rsquo;<dd>Wallis and Futuna.
  12206. <br><dt>&lsquo;<samp><span class="samp">WS</span></samp>&rsquo;<dd>Samoa (Western).
  12207. <br><dt>&lsquo;<samp><span class="samp">YE</span></samp>&rsquo;<dd>Yemen.
  12208. <br><dt>&lsquo;<samp><span class="samp">YT</span></samp>&rsquo;<dd>Mayotte.
  12209. <br><dt>&lsquo;<samp><span class="samp">ZA</span></samp>&rsquo;<dd>South Africa.
  12210. <br><dt>&lsquo;<samp><span class="samp">ZM</span></samp>&rsquo;<dd>Zambia.
  12211. <br><dt>&lsquo;<samp><span class="samp">ZW</span></samp>&rsquo;<dd>Zimbabwe.
  12212. </dl>
  12213. <div class="node">
  12214. <a name="Licenses"></a>
  12215. <p><hr>
  12216. Next:&nbsp;<a rel="next" accesskey="n" href="#Program-Index">Program Index</a>,
  12217. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Country-Codes">Country Codes</a>,
  12218. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  12219. </div>
  12220. <h2 class="appendix">Appendix C Licenses</h2>
  12221. <p><a name="index-Licenses-1265"></a>
  12222. The files of this package are covered by the licenses indicated in each
  12223. particular file or directory. Here is a summary:
  12224. <ul>
  12225. <li>The <code>libintl</code> and <code>libasprintf</code> libraries are covered by the
  12226. GNU Library General Public License (LGPL).
  12227. A copy of the license is included in <a href="#GNU-LGPL">GNU LGPL</a>.
  12228. <li>The executable programs of this package and the <code>libgettextpo</code> library
  12229. are covered by the GNU General Public License (GPL).
  12230. A copy of the license is included in <a href="#GNU-GPL">GNU GPL</a>.
  12231. <li>This manual is free documentation. It is dually licensed under the
  12232. GNU FDL and the GNU GPL. This means that you can redistribute this
  12233. manual under either of these two licenses, at your choice.
  12234. <br>
  12235. This manual is covered by the GNU FDL. Permission is granted to copy,
  12236. distribute and/or modify this document under the terms of the
  12237. GNU Free Documentation License (FDL), either version 1.2 of the
  12238. License, or (at your option) any later version published by the
  12239. Free Software Foundation (FSF); with no Invariant Sections, with no
  12240. Front-Cover Text, and with no Back-Cover Texts.
  12241. A copy of the license is included in <a href="#GNU-FDL">GNU FDL</a>.
  12242. <br>
  12243. This manual is covered by the GNU GPL. You can redistribute it and/or
  12244. modify it under the terms of the GNU General Public License (GPL), either
  12245. version 2 of the License, or (at your option) any later version published
  12246. by the Free Software Foundation (FSF).
  12247. A copy of the license is included in <a href="#GNU-GPL">GNU GPL</a>.
  12248. </ul>
  12249. <ul class="menu">
  12250. <li><a accesskey="1" href="#GNU-GPL">GNU GPL</a>: GNU General Public License
  12251. <li><a accesskey="2" href="#GNU-LGPL">GNU LGPL</a>: GNU Lesser General Public License
  12252. <li><a accesskey="3" href="#GNU-FDL">GNU FDL</a>: GNU Free Documentation License
  12253. </ul>
  12254. <div class="node">
  12255. <a name="GNU-GPL"></a>
  12256. <p><hr>
  12257. Next:&nbsp;<a rel="next" accesskey="n" href="#GNU-LGPL">GNU LGPL</a>,
  12258. Up:&nbsp;<a rel="up" accesskey="u" href="#Licenses">Licenses</a>
  12259. </div>
  12260. <h3 class="appendixsec">C.1 GNU GENERAL PUBLIC LICENSE</h3>
  12261. <p><a name="index-GPL_002c-GNU-General-Public-License-1266"></a><a name="index-License_002c-GNU-GPL-1267"></a><div align="center">Version 2, June 1991</div>
  12262. <!-- This file is intended to be included in another file. -->
  12263. <pre class="display"> Copyright &copy; 1989, 1991 Free Software Foundation, Inc.
  12264. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  12265. Everyone is permitted to copy and distribute verbatim copies
  12266. of this license document, but changing it is not allowed.
  12267. </pre>
  12268. <h4 class="unnumberedsubsec">Preamble</h4>
  12269. <p>The licenses for most software are designed to take away your
  12270. freedom to share and change it. By contrast, the GNU General Public
  12271. License is intended to guarantee your freedom to share and change free
  12272. software&mdash;to make sure the software is free for all its users. This
  12273. General Public License applies to most of the Free Software
  12274. Foundation's software and to any other program whose authors commit to
  12275. using it. (Some other Free Software Foundation software is covered by
  12276. the GNU Library General Public License instead.) You can apply it to
  12277. your programs, too.
  12278. <p>When we speak of free software, we are referring to freedom, not
  12279. price. Our General Public Licenses are designed to make sure that you
  12280. have the freedom to distribute copies of free software (and charge for
  12281. this service if you wish), that you receive source code or can get it
  12282. if you want it, that you can change the software or use pieces of it
  12283. in new free programs; and that you know you can do these things.
  12284. <p>To protect your rights, we need to make restrictions that forbid
  12285. anyone to deny you these rights or to ask you to surrender the rights.
  12286. These restrictions translate to certain responsibilities for you if you
  12287. distribute copies of the software, or if you modify it.
  12288. <p>For example, if you distribute copies of such a program, whether
  12289. gratis or for a fee, you must give the recipients all the rights that
  12290. you have. You must make sure that they, too, receive or can get the
  12291. source code. And you must show them these terms so they know their
  12292. rights.
  12293. <p>We protect your rights with two steps: (1) copyright the software, and
  12294. (2) offer you this license which gives you legal permission to copy,
  12295. distribute and/or modify the software.
  12296. <p>Also, for each author's protection and ours, we want to make certain
  12297. that everyone understands that there is no warranty for this free
  12298. software. If the software is modified by someone else and passed on, we
  12299. want its recipients to know that what they have is not the original, so
  12300. that any problems introduced by others will not reflect on the original
  12301. authors' reputations.
  12302. <p>Finally, any free program is threatened constantly by software
  12303. patents. We wish to avoid the danger that redistributors of a free
  12304. program will individually obtain patent licenses, in effect making the
  12305. program proprietary. To prevent this, we have made it clear that any
  12306. patent must be licensed for everyone's free use or not licensed at all.
  12307. <p>The precise terms and conditions for copying, distribution and
  12308. modification follow.
  12309. <ol type=1 start=0>
  12310. <li>This License applies to any program or other work which contains
  12311. a notice placed by the copyright holder saying it may be distributed
  12312. under the terms of this General Public License. The &ldquo;Program&rdquo;, below,
  12313. refers to any such program or work, and a &ldquo;work based on the Program&rdquo;
  12314. means either the Program or any derivative work under copyright law:
  12315. that is to say, a work containing the Program or a portion of it,
  12316. either verbatim or with modifications and/or translated into another
  12317. language. (Hereinafter, translation is included without limitation in
  12318. the term &ldquo;modification&rdquo;.) Each licensee is addressed as &ldquo;you&rdquo;.
  12319. <p>Activities other than copying, distribution and modification are not
  12320. covered by this License; they are outside its scope. The act of
  12321. running the Program is not restricted, and the output from the Program
  12322. is covered only if its contents constitute a work based on the
  12323. Program (independent of having been made by running the Program).
  12324. Whether that is true depends on what the Program does.
  12325. <li>You may copy and distribute verbatim copies of the Program's
  12326. source code as you receive it, in any medium, provided that you
  12327. conspicuously and appropriately publish on each copy an appropriate
  12328. copyright notice and disclaimer of warranty; keep intact all the
  12329. notices that refer to this License and to the absence of any warranty;
  12330. and give any other recipients of the Program a copy of this License
  12331. along with the Program.
  12332. <p>You may charge a fee for the physical act of transferring a copy, and
  12333. you may at your option offer warranty protection in exchange for a fee.
  12334. <li>You may modify your copy or copies of the Program or any portion
  12335. of it, thus forming a work based on the Program, and copy and
  12336. distribute such modifications or work under the terms of Section 1
  12337. above, provided that you also meet all of these conditions:
  12338. <ol type=a start=1>
  12339. <li>You must cause the modified files to carry prominent notices
  12340. stating that you changed the files and the date of any change.
  12341. <li>You must cause any work that you distribute or publish, that in
  12342. whole or in part contains or is derived from the Program or any
  12343. part thereof, to be licensed as a whole at no charge to all third
  12344. parties under the terms of this License.
  12345. <li>If the modified program normally reads commands interactively
  12346. when run, you must cause it, when started running for such
  12347. interactive use in the most ordinary way, to print or display an
  12348. announcement including an appropriate copyright notice and a
  12349. notice that there is no warranty (or else, saying that you provide
  12350. a warranty) and that users may redistribute the program under
  12351. these conditions, and telling the user how to view a copy of this
  12352. License. (Exception: if the Program itself is interactive but
  12353. does not normally print such an announcement, your work based on
  12354. the Program is not required to print an announcement.)
  12355. </ol>
  12356. <p>These requirements apply to the modified work as a whole. If
  12357. identifiable sections of that work are not derived from the Program,
  12358. and can be reasonably considered independent and separate works in
  12359. themselves, then this License, and its terms, do not apply to those
  12360. sections when you distribute them as separate works. But when you
  12361. distribute the same sections as part of a whole which is a work based
  12362. on the Program, the distribution of the whole must be on the terms of
  12363. this License, whose permissions for other licensees extend to the
  12364. entire whole, and thus to each and every part regardless of who wrote it.
  12365. <p>Thus, it is not the intent of this section to claim rights or contest
  12366. your rights to work written entirely by you; rather, the intent is to
  12367. exercise the right to control the distribution of derivative or
  12368. collective works based on the Program.
  12369. <p>In addition, mere aggregation of another work not based on the Program
  12370. with the Program (or with a work based on the Program) on a volume of
  12371. a storage or distribution medium does not bring the other work under
  12372. the scope of this License.
  12373. <li>You may copy and distribute the Program (or a work based on it,
  12374. under Section 2) in object code or executable form under the terms of
  12375. Sections 1 and 2 above provided that you also do one of the following:
  12376. <ol type=a start=1>
  12377. <li>Accompany it with the complete corresponding machine-readable
  12378. source code, which must be distributed under the terms of Sections
  12379. 1 and 2 above on a medium customarily used for software interchange; or,
  12380. <li>Accompany it with a written offer, valid for at least three
  12381. years, to give any third party, for a charge no more than your
  12382. cost of physically performing source distribution, a complete
  12383. machine-readable copy of the corresponding source code, to be
  12384. distributed under the terms of Sections 1 and 2 above on a medium
  12385. customarily used for software interchange; or,
  12386. <li>Accompany it with the information you received as to the offer
  12387. to distribute corresponding source code. (This alternative is
  12388. allowed only for noncommercial distribution and only if you
  12389. received the program in object code or executable form with such
  12390. an offer, in accord with Subsection b above.)
  12391. </ol>
  12392. <p>The source code for a work means the preferred form of the work for
  12393. making modifications to it. For an executable work, complete source
  12394. code means all the source code for all modules it contains, plus any
  12395. associated interface definition files, plus the scripts used to
  12396. control compilation and installation of the executable. However, as a
  12397. special exception, the source code distributed need not include
  12398. anything that is normally distributed (in either source or binary
  12399. form) with the major components (compiler, kernel, and so on) of the
  12400. operating system on which the executable runs, unless that component
  12401. itself accompanies the executable.
  12402. <p>If distribution of executable or object code is made by offering
  12403. access to copy from a designated place, then offering equivalent
  12404. access to copy the source code from the same place counts as
  12405. distribution of the source code, even though third parties are not
  12406. compelled to copy the source along with the object code.
  12407. <li>You may not copy, modify, sublicense, or distribute the Program
  12408. except as expressly provided under this License. Any attempt
  12409. otherwise to copy, modify, sublicense or distribute the Program is
  12410. void, and will automatically terminate your rights under this License.
  12411. However, parties who have received copies, or rights, from you under
  12412. this License will not have their licenses terminated so long as such
  12413. parties remain in full compliance.
  12414. <li>You are not required to accept this License, since you have not
  12415. signed it. However, nothing else grants you permission to modify or
  12416. distribute the Program or its derivative works. These actions are
  12417. prohibited by law if you do not accept this License. Therefore, by
  12418. modifying or distributing the Program (or any work based on the
  12419. Program), you indicate your acceptance of this License to do so, and
  12420. all its terms and conditions for copying, distributing or modifying
  12421. the Program or works based on it.
  12422. <li>Each time you redistribute the Program (or any work based on the
  12423. Program), the recipient automatically receives a license from the
  12424. original licensor to copy, distribute or modify the Program subject to
  12425. these terms and conditions. You may not impose any further
  12426. restrictions on the recipients' exercise of the rights granted herein.
  12427. You are not responsible for enforcing compliance by third parties to
  12428. this License.
  12429. <li>If, as a consequence of a court judgment or allegation of patent
  12430. infringement or for any other reason (not limited to patent issues),
  12431. conditions are imposed on you (whether by court order, agreement or
  12432. otherwise) that contradict the conditions of this License, they do not
  12433. excuse you from the conditions of this License. If you cannot
  12434. distribute so as to satisfy simultaneously your obligations under this
  12435. License and any other pertinent obligations, then as a consequence you
  12436. may not distribute the Program at all. For example, if a patent
  12437. license would not permit royalty-free redistribution of the Program by
  12438. all those who receive copies directly or indirectly through you, then
  12439. the only way you could satisfy both it and this License would be to
  12440. refrain entirely from distribution of the Program.
  12441. <p>If any portion of this section is held invalid or unenforceable under
  12442. any particular circumstance, the balance of the section is intended to
  12443. apply and the section as a whole is intended to apply in other
  12444. circumstances.
  12445. <p>It is not the purpose of this section to induce you to infringe any
  12446. patents or other property right claims or to contest validity of any
  12447. such claims; this section has the sole purpose of protecting the
  12448. integrity of the free software distribution system, which is
  12449. implemented by public license practices. Many people have made
  12450. generous contributions to the wide range of software distributed
  12451. through that system in reliance on consistent application of that
  12452. system; it is up to the author/donor to decide if he or she is willing
  12453. to distribute software through any other system and a licensee cannot
  12454. impose that choice.
  12455. <p>This section is intended to make thoroughly clear what is believed to
  12456. be a consequence of the rest of this License.
  12457. <li>If the distribution and/or use of the Program is restricted in
  12458. certain countries either by patents or by copyrighted interfaces, the
  12459. original copyright holder who places the Program under this License
  12460. may add an explicit geographical distribution limitation excluding
  12461. those countries, so that distribution is permitted only in or among
  12462. countries not thus excluded. In such case, this License incorporates
  12463. the limitation as if written in the body of this License.
  12464. <li>The Free Software Foundation may publish revised and/or new versions
  12465. of the General Public License from time to time. Such new versions will
  12466. be similar in spirit to the present version, but may differ in detail to
  12467. address new problems or concerns.
  12468. <p>Each version is given a distinguishing version number. If the Program
  12469. specifies a version number of this License which applies to it and &ldquo;any
  12470. later version&rdquo;, you have the option of following the terms and conditions
  12471. either of that version or of any later version published by the Free
  12472. Software Foundation. If the Program does not specify a version number of
  12473. this License, you may choose any version ever published by the Free Software
  12474. Foundation.
  12475. <li>If you wish to incorporate parts of the Program into other free
  12476. programs whose distribution conditions are different, write to the author
  12477. to ask for permission. For software which is copyrighted by the Free
  12478. Software Foundation, write to the Free Software Foundation; we sometimes
  12479. make exceptions for this. Our decision will be guided by the two goals
  12480. of preserving the free status of all derivatives of our free software and
  12481. of promoting the sharing and reuse of software generally.
  12482. <li>BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  12483. FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
  12484. OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  12485. PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  12486. OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12487. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
  12488. TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
  12489. PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  12490. REPAIR OR CORRECTION.
  12491. <li>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  12492. WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  12493. REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  12494. INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  12495. OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  12496. TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  12497. YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  12498. PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  12499. POSSIBILITY OF SUCH DAMAGES.
  12500. </ol>
  12501. <h4 class="unnumberedsubsec">Appendix: How to Apply These Terms to Your New Programs</h4>
  12502. <p>If you develop a new program, and you want it to be of the greatest
  12503. possible use to the public, the best way to achieve this is to make it
  12504. free software which everyone can redistribute and change under these terms.
  12505. <p>To do so, attach the following notices to the program. It is safest
  12506. to attach them to the start of each source file to most effectively
  12507. convey the exclusion of warranty; and each file should have at least
  12508. the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.
  12509. <pre class="smallexample"> <var>one line to give the program's name and a brief idea of what it does.</var>
  12510. Copyright (C) <var>yyyy</var> <var>name of author</var>
  12511. This program is free software; you can redistribute it and/or modify
  12512. it under the terms of the GNU General Public License as published by
  12513. the Free Software Foundation; either version 2 of the License, or
  12514. (at your option) any later version.
  12515. This program is distributed in the hope that it will be useful,
  12516. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12517. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12518. GNU General Public License for more details.
  12519. You should have received a copy of the GNU General Public License
  12520. along with this program; if not, write to the Free Software
  12521. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  12522. </pre>
  12523. <p>Also add information on how to contact you by electronic and paper mail.
  12524. <p>If the program is interactive, make it output a short notice like this
  12525. when it starts in an interactive mode:
  12526. <pre class="smallexample"> Gnomovision version 69, Copyright (C) 19<var>yy</var> <var>name of author</var>
  12527. Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  12528. This is free software, and you are welcome to redistribute it
  12529. under certain conditions; type `show c' for details.
  12530. </pre>
  12531. <p>The hypothetical commands &lsquo;<samp><span class="samp">show w</span></samp>&rsquo; and &lsquo;<samp><span class="samp">show c</span></samp>&rsquo; should show
  12532. the appropriate parts of the General Public License. Of course, the
  12533. commands you use may be called something other than &lsquo;<samp><span class="samp">show w</span></samp>&rsquo; and
  12534. &lsquo;<samp><span class="samp">show c</span></samp>&rsquo;; they could even be mouse-clicks or menu items&mdash;whatever
  12535. suits your program.
  12536. <p>You should also get your employer (if you work as a programmer) or your
  12537. school, if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if
  12538. necessary. Here is a sample; alter the names:
  12539. <pre class="example"> Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  12540. `Gnomovision' (which makes passes at compilers) written by James Hacker.
  12541. <var>signature of Ty Coon</var>, 1 April 1989
  12542. Ty Coon, President of Vice
  12543. </pre>
  12544. <p>This General Public License does not permit incorporating your program into
  12545. proprietary programs. If your program is a subroutine library, you may
  12546. consider it more useful to permit linking proprietary applications with the
  12547. library. If this is what you want to do, use the GNU Library General
  12548. Public License instead of this License.
  12549. <div class="node">
  12550. <a name="GNU-LGPL"></a>
  12551. <p><hr>
  12552. Next:&nbsp;<a rel="next" accesskey="n" href="#GNU-FDL">GNU FDL</a>,
  12553. Previous:&nbsp;<a rel="previous" accesskey="p" href="#GNU-GPL">GNU GPL</a>,
  12554. Up:&nbsp;<a rel="up" accesskey="u" href="#Licenses">Licenses</a>
  12555. </div>
  12556. <h3 class="appendixsec">C.2 GNU LESSER GENERAL PUBLIC LICENSE</h3>
  12557. <p><a name="index-LGPL_002c-GNU-Lesser-General-Public-License-1268"></a><a name="index-License_002c-GNU-LGPL-1269"></a><div align="center">Version 2.1, February 1999</div>
  12558. <pre class="display"> Copyright &copy; 1991, 1999 Free Software Foundation, Inc.
  12559. 51 Franklin St &ndash; Fifth Floor, Boston, MA 02110-1301, USA
  12560. Everyone is permitted to copy and distribute verbatim copies
  12561. of this license document, but changing it is not allowed.
  12562. [This is the first released version of the Lesser GPL. It also counts
  12563. as the successor of the GNU Library Public License, version 2, hence the
  12564. version number 2.1.]
  12565. </pre>
  12566. <h4 class="unnumberedsubsec">Preamble</h4>
  12567. <p>The licenses for most software are designed to take away your
  12568. freedom to share and change it. By contrast, the GNU General Public
  12569. Licenses are intended to guarantee your freedom to share and change
  12570. free software&mdash;to make sure the software is free for all its users.
  12571. <p>This license, the Lesser General Public License, applies to some
  12572. specially designated software&mdash;typically libraries&mdash;of the Free
  12573. Software Foundation and other authors who decide to use it. You can use
  12574. it too, but we suggest you first think carefully about whether this
  12575. license or the ordinary General Public License is the better strategy to
  12576. use in any particular case, based on the explanations below.
  12577. <p>When we speak of free software, we are referring to freedom of use,
  12578. not price. Our General Public Licenses are designed to make sure that
  12579. you have the freedom to distribute copies of free software (and charge
  12580. for this service if you wish); that you receive source code or can get
  12581. it if you want it; that you can change the software and use pieces of it
  12582. in new free programs; and that you are informed that you can do these
  12583. things.
  12584. <p>To protect your rights, we need to make restrictions that forbid
  12585. distributors to deny you these rights or to ask you to surrender these
  12586. rights. These restrictions translate to certain responsibilities for
  12587. you if you distribute copies of the library or if you modify it.
  12588. <p>For example, if you distribute copies of the library, whether gratis
  12589. or for a fee, you must give the recipients all the rights that we gave
  12590. you. You must make sure that they, too, receive or can get the source
  12591. code. If you link other code with the library, you must provide
  12592. complete object files to the recipients, so that they can relink them
  12593. with the library after making changes to the library and recompiling
  12594. it. And you must show them these terms so they know their rights.
  12595. <p>We protect your rights with a two-step method: (1) we copyright the
  12596. library, and (2) we offer you this license, which gives you legal
  12597. permission to copy, distribute and/or modify the library.
  12598. <p>To protect each distributor, we want to make it very clear that
  12599. there is no warranty for the free library. Also, if the library is
  12600. modified by someone else and passed on, the recipients should know
  12601. that what they have is not the original version, so that the original
  12602. author's reputation will not be affected by problems that might be
  12603. introduced by others.
  12604. <p>Finally, software patents pose a constant threat to the existence of
  12605. any free program. We wish to make sure that a company cannot
  12606. effectively restrict the users of a free program by obtaining a
  12607. restrictive license from a patent holder. Therefore, we insist that
  12608. any patent license obtained for a version of the library must be
  12609. consistent with the full freedom of use specified in this license.
  12610. <p>Most GNU software, including some libraries, is covered by the
  12611. ordinary GNU General Public License. This license, the GNU Lesser
  12612. General Public License, applies to certain designated libraries, and
  12613. is quite different from the ordinary General Public License. We use
  12614. this license for certain libraries in order to permit linking those
  12615. libraries into non-free programs.
  12616. <p>When a program is linked with a library, whether statically or using
  12617. a shared library, the combination of the two is legally speaking a
  12618. combined work, a derivative of the original library. The ordinary
  12619. General Public License therefore permits such linking only if the
  12620. entire combination fits its criteria of freedom. The Lesser General
  12621. Public License permits more lax criteria for linking other code with
  12622. the library.
  12623. <p>We call this license the <dfn>Lesser</dfn> General Public License because it
  12624. does <em>Less</em> to protect the user's freedom than the ordinary General
  12625. Public License. It also provides other free software developers Less
  12626. of an advantage over competing non-free programs. These disadvantages
  12627. are the reason we use the ordinary General Public License for many
  12628. libraries. However, the Lesser license provides advantages in certain
  12629. special circumstances.
  12630. <p>For example, on rare occasions, there may be a special need to
  12631. encourage the widest possible use of a certain library, so that it becomes
  12632. a de-facto standard. To achieve this, non-free programs must be
  12633. allowed to use the library. A more frequent case is that a free
  12634. library does the same job as widely used non-free libraries. In this
  12635. case, there is little to gain by limiting the free library to free
  12636. software only, so we use the Lesser General Public License.
  12637. <p>In other cases, permission to use a particular library in non-free
  12638. programs enables a greater number of people to use a large body of
  12639. free software. For example, permission to use the GNU C Library in
  12640. non-free programs enables many more people to use the whole GNU
  12641. operating system, as well as its variant, the GNU/Linux operating
  12642. system.
  12643. <p>Although the Lesser General Public License is Less protective of the
  12644. users' freedom, it does ensure that the user of a program that is
  12645. linked with the Library has the freedom and the wherewithal to run
  12646. that program using a modified version of the Library.
  12647. <p>The precise terms and conditions for copying, distribution and
  12648. modification follow. Pay close attention to the difference between a
  12649. &ldquo;work based on the library&rdquo; and a &ldquo;work that uses the library&rdquo;. The
  12650. former contains code derived from the library, whereas the latter must
  12651. be combined with the library in order to run.
  12652. <ol type=1 start=0>
  12653. <li>This License Agreement applies to any software library or other program
  12654. which contains a notice placed by the copyright holder or other
  12655. authorized party saying it may be distributed under the terms of this
  12656. Lesser General Public License (also called &ldquo;this License&rdquo;). Each
  12657. licensee is addressed as &ldquo;you&rdquo;.
  12658. <p>A &ldquo;library&rdquo; means a collection of software functions and/or data
  12659. prepared so as to be conveniently linked with application programs
  12660. (which use some of those functions and data) to form executables.
  12661. <p>The &ldquo;Library&rdquo;, below, refers to any such software library or work
  12662. which has been distributed under these terms. A &ldquo;work based on the
  12663. Library&rdquo; means either the Library or any derivative work under
  12664. copyright law: that is to say, a work containing the Library or a
  12665. portion of it, either verbatim or with modifications and/or translated
  12666. straightforwardly into another language. (Hereinafter, translation is
  12667. included without limitation in the term &ldquo;modification&rdquo;.)
  12668. <p>&ldquo;Source code&rdquo; for a work means the preferred form of the work for
  12669. making modifications to it. For a library, complete source code means
  12670. all the source code for all modules it contains, plus any associated
  12671. interface definition files, plus the scripts used to control compilation
  12672. and installation of the library.
  12673. <p>Activities other than copying, distribution and modification are not
  12674. covered by this License; they are outside its scope. The act of
  12675. running a program using the Library is not restricted, and output from
  12676. such a program is covered only if its contents constitute a work based
  12677. on the Library (independent of the use of the Library in a tool for
  12678. writing it). Whether that is true depends on what the Library does
  12679. and what the program that uses the Library does.
  12680. <li>You may copy and distribute verbatim copies of the Library's
  12681. complete source code as you receive it, in any medium, provided that
  12682. you conspicuously and appropriately publish on each copy an
  12683. appropriate copyright notice and disclaimer of warranty; keep intact
  12684. all the notices that refer to this License and to the absence of any
  12685. warranty; and distribute a copy of this License along with the
  12686. Library.
  12687. <p>You may charge a fee for the physical act of transferring a copy,
  12688. and you may at your option offer warranty protection in exchange for a
  12689. fee.
  12690. <li>You may modify your copy or copies of the Library or any portion
  12691. of it, thus forming a work based on the Library, and copy and
  12692. distribute such modifications or work under the terms of Section 1
  12693. above, provided that you also meet all of these conditions:
  12694. <ol type=a start=1>
  12695. <li>The modified work must itself be a software library.
  12696. <li>You must cause the files modified to carry prominent notices
  12697. stating that you changed the files and the date of any change.
  12698. <li>You must cause the whole of the work to be licensed at no
  12699. charge to all third parties under the terms of this License.
  12700. <li>If a facility in the modified Library refers to a function or a
  12701. table of data to be supplied by an application program that uses
  12702. the facility, other than as an argument passed when the facility
  12703. is invoked, then you must make a good faith effort to ensure that,
  12704. in the event an application does not supply such function or
  12705. table, the facility still operates, and performs whatever part of
  12706. its purpose remains meaningful.
  12707. <p>(For example, a function in a library to compute square roots has
  12708. a purpose that is entirely well-defined independent of the
  12709. application. Therefore, Subsection 2d requires that any
  12710. application-supplied function or table used by this function must
  12711. be optional: if the application does not supply it, the square
  12712. root function must still compute square roots.)
  12713. </ol>
  12714. <p>These requirements apply to the modified work as a whole. If
  12715. identifiable sections of that work are not derived from the Library,
  12716. and can be reasonably considered independent and separate works in
  12717. themselves, then this License, and its terms, do not apply to those
  12718. sections when you distribute them as separate works. But when you
  12719. distribute the same sections as part of a whole which is a work based
  12720. on the Library, the distribution of the whole must be on the terms of
  12721. this License, whose permissions for other licensees extend to the
  12722. entire whole, and thus to each and every part regardless of who wrote
  12723. it.
  12724. <p>Thus, it is not the intent of this section to claim rights or contest
  12725. your rights to work written entirely by you; rather, the intent is to
  12726. exercise the right to control the distribution of derivative or
  12727. collective works based on the Library.
  12728. <p>In addition, mere aggregation of another work not based on the Library
  12729. with the Library (or with a work based on the Library) on a volume of
  12730. a storage or distribution medium does not bring the other work under
  12731. the scope of this License.
  12732. <li>You may opt to apply the terms of the ordinary GNU General Public
  12733. License instead of this License to a given copy of the Library. To do
  12734. this, you must alter all the notices that refer to this License, so
  12735. that they refer to the ordinary GNU General Public License, version 2,
  12736. instead of to this License. (If a newer version than version 2 of the
  12737. ordinary GNU General Public License has appeared, then you can specify
  12738. that version instead if you wish.) Do not make any other change in
  12739. these notices.
  12740. <p>Once this change is made in a given copy, it is irreversible for
  12741. that copy, so the ordinary GNU General Public License applies to all
  12742. subsequent copies and derivative works made from that copy.
  12743. <p>This option is useful when you wish to copy part of the code of
  12744. the Library into a program that is not a library.
  12745. <li>You may copy and distribute the Library (or a portion or
  12746. derivative of it, under Section 2) in object code or executable form
  12747. under the terms of Sections 1 and 2 above provided that you accompany
  12748. it with the complete corresponding machine-readable source code, which
  12749. must be distributed under the terms of Sections 1 and 2 above on a
  12750. medium customarily used for software interchange.
  12751. <p>If distribution of object code is made by offering access to copy
  12752. from a designated place, then offering equivalent access to copy the
  12753. source code from the same place satisfies the requirement to
  12754. distribute the source code, even though third parties are not
  12755. compelled to copy the source along with the object code.
  12756. <li>A program that contains no derivative of any portion of the
  12757. Library, but is designed to work with the Library by being compiled or
  12758. linked with it, is called a &ldquo;work that uses the Library&rdquo;. Such a
  12759. work, in isolation, is not a derivative work of the Library, and
  12760. therefore falls outside the scope of this License.
  12761. <p>However, linking a &ldquo;work that uses the Library&rdquo; with the Library
  12762. creates an executable that is a derivative of the Library (because it
  12763. contains portions of the Library), rather than a &ldquo;work that uses the
  12764. library&rdquo;. The executable is therefore covered by this License.
  12765. Section 6 states terms for distribution of such executables.
  12766. <p>When a &ldquo;work that uses the Library&rdquo; uses material from a header file
  12767. that is part of the Library, the object code for the work may be a
  12768. derivative work of the Library even though the source code is not.
  12769. Whether this is true is especially significant if the work can be
  12770. linked without the Library, or if the work is itself a library. The
  12771. threshold for this to be true is not precisely defined by law.
  12772. <p>If such an object file uses only numerical parameters, data
  12773. structure layouts and accessors, and small macros and small inline
  12774. functions (ten lines or less in length), then the use of the object
  12775. file is unrestricted, regardless of whether it is legally a derivative
  12776. work. (Executables containing this object code plus portions of the
  12777. Library will still fall under Section 6.)
  12778. <p>Otherwise, if the work is a derivative of the Library, you may
  12779. distribute the object code for the work under the terms of Section 6.
  12780. Any executables containing that work also fall under Section 6,
  12781. whether or not they are linked directly with the Library itself.
  12782. <li>As an exception to the Sections above, you may also combine or
  12783. link a &ldquo;work that uses the Library&rdquo; with the Library to produce a
  12784. work containing portions of the Library, and distribute that work
  12785. under terms of your choice, provided that the terms permit
  12786. modification of the work for the customer's own use and reverse
  12787. engineering for debugging such modifications.
  12788. <p>You must give prominent notice with each copy of the work that the
  12789. Library is used in it and that the Library and its use are covered by
  12790. this License. You must supply a copy of this License. If the work
  12791. during execution displays copyright notices, you must include the
  12792. copyright notice for the Library among them, as well as a reference
  12793. directing the user to the copy of this License. Also, you must do one
  12794. of these things:
  12795. <ol type=a start=1>
  12796. <li>Accompany the work with the complete corresponding
  12797. machine-readable source code for the Library including whatever
  12798. changes were used in the work (which must be distributed under
  12799. Sections 1 and 2 above); and, if the work is an executable linked
  12800. with the Library, with the complete machine-readable &ldquo;work that
  12801. uses the Library&rdquo;, as object code and/or source code, so that the
  12802. user can modify the Library and then relink to produce a modified
  12803. executable containing the modified Library. (It is understood
  12804. that the user who changes the contents of definitions files in the
  12805. Library will not necessarily be able to recompile the application
  12806. to use the modified definitions.)
  12807. <li>Use a suitable shared library mechanism for linking with the Library. A
  12808. suitable mechanism is one that (1) uses at run time a copy of the
  12809. library already present on the user's computer system, rather than
  12810. copying library functions into the executable, and (2) will operate
  12811. properly with a modified version of the library, if the user installs
  12812. one, as long as the modified version is interface-compatible with the
  12813. version that the work was made with.
  12814. <li>Accompany the work with a written offer, valid for at
  12815. least three years, to give the same user the materials
  12816. specified in Subsection 6a, above, for a charge no more
  12817. than the cost of performing this distribution.
  12818. <li>If distribution of the work is made by offering access to copy
  12819. from a designated place, offer equivalent access to copy the above
  12820. specified materials from the same place.
  12821. <li>Verify that the user has already received a copy of these
  12822. materials or that you have already sent this user a copy.
  12823. </ol>
  12824. <p>For an executable, the required form of the &ldquo;work that uses the
  12825. Library&rdquo; must include any data and utility programs needed for
  12826. reproducing the executable from it. However, as a special exception,
  12827. the materials to be distributed need not include anything that is
  12828. normally distributed (in either source or binary form) with the major
  12829. components (compiler, kernel, and so on) of the operating system on
  12830. which the executable runs, unless that component itself accompanies the
  12831. executable.
  12832. <p>It may happen that this requirement contradicts the license
  12833. restrictions of other proprietary libraries that do not normally
  12834. accompany the operating system. Such a contradiction means you cannot
  12835. use both them and the Library together in an executable that you
  12836. distribute.
  12837. <li>You may place library facilities that are a work based on the
  12838. Library side-by-side in a single library together with other library
  12839. facilities not covered by this License, and distribute such a combined
  12840. library, provided that the separate distribution of the work based on
  12841. the Library and of the other library facilities is otherwise
  12842. permitted, and provided that you do these two things:
  12843. <ol type=a start=1>
  12844. <li>Accompany the combined library with a copy of the same work
  12845. based on the Library, uncombined with any other library
  12846. facilities. This must be distributed under the terms of the
  12847. Sections above.
  12848. <li>Give prominent notice with the combined library of the fact
  12849. that part of it is a work based on the Library, and explaining
  12850. where to find the accompanying uncombined form of the same work.
  12851. </ol>
  12852. <li>You may not copy, modify, sublicense, link with, or distribute
  12853. the Library except as expressly provided under this License. Any
  12854. attempt otherwise to copy, modify, sublicense, link with, or
  12855. distribute the Library is void, and will automatically terminate your
  12856. rights under this License. However, parties who have received copies,
  12857. or rights, from you under this License will not have their licenses
  12858. terminated so long as such parties remain in full compliance.
  12859. <li>You are not required to accept this License, since you have not
  12860. signed it. However, nothing else grants you permission to modify or
  12861. distribute the Library or its derivative works. These actions are
  12862. prohibited by law if you do not accept this License. Therefore, by
  12863. modifying or distributing the Library (or any work based on the
  12864. Library), you indicate your acceptance of this License to do so, and
  12865. all its terms and conditions for copying, distributing or modifying
  12866. the Library or works based on it.
  12867. <li>Each time you redistribute the Library (or any work based on the
  12868. Library), the recipient automatically receives a license from the
  12869. original licensor to copy, distribute, link with or modify the Library
  12870. subject to these terms and conditions. You may not impose any further
  12871. restrictions on the recipients' exercise of the rights granted herein.
  12872. You are not responsible for enforcing compliance by third parties with
  12873. this License.
  12874. <li>If, as a consequence of a court judgment or allegation of patent
  12875. infringement or for any other reason (not limited to patent issues),
  12876. conditions are imposed on you (whether by court order, agreement or
  12877. otherwise) that contradict the conditions of this License, they do not
  12878. excuse you from the conditions of this License. If you cannot
  12879. distribute so as to satisfy simultaneously your obligations under this
  12880. License and any other pertinent obligations, then as a consequence you
  12881. may not distribute the Library at all. For example, if a patent
  12882. license would not permit royalty-free redistribution of the Library by
  12883. all those who receive copies directly or indirectly through you, then
  12884. the only way you could satisfy both it and this License would be to
  12885. refrain entirely from distribution of the Library.
  12886. <p>If any portion of this section is held invalid or unenforceable under any
  12887. particular circumstance, the balance of the section is intended to apply,
  12888. and the section as a whole is intended to apply in other circumstances.
  12889. <p>It is not the purpose of this section to induce you to infringe any
  12890. patents or other property right claims or to contest validity of any
  12891. such claims; this section has the sole purpose of protecting the
  12892. integrity of the free software distribution system which is
  12893. implemented by public license practices. Many people have made
  12894. generous contributions to the wide range of software distributed
  12895. through that system in reliance on consistent application of that
  12896. system; it is up to the author/donor to decide if he or she is willing
  12897. to distribute software through any other system and a licensee cannot
  12898. impose that choice.
  12899. <p>This section is intended to make thoroughly clear what is believed to
  12900. be a consequence of the rest of this License.
  12901. <li>If the distribution and/or use of the Library is restricted in
  12902. certain countries either by patents or by copyrighted interfaces, the
  12903. original copyright holder who places the Library under this License may add
  12904. an explicit geographical distribution limitation excluding those countries,
  12905. so that distribution is permitted only in or among countries not thus
  12906. excluded. In such case, this License incorporates the limitation as if
  12907. written in the body of this License.
  12908. <li>The Free Software Foundation may publish revised and/or new
  12909. versions of the Lesser General Public License from time to time.
  12910. Such new versions will be similar in spirit to the present version,
  12911. but may differ in detail to address new problems or concerns.
  12912. <p>Each version is given a distinguishing version number. If the Library
  12913. specifies a version number of this License which applies to it and
  12914. &ldquo;any later version&rdquo;, you have the option of following the terms and
  12915. conditions either of that version or of any later version published by
  12916. the Free Software Foundation. If the Library does not specify a
  12917. license version number, you may choose any version ever published by
  12918. the Free Software Foundation.
  12919. <li>If you wish to incorporate parts of the Library into other free
  12920. programs whose distribution conditions are incompatible with these,
  12921. write to the author to ask for permission. For software which is
  12922. copyrighted by the Free Software Foundation, write to the Free
  12923. Software Foundation; we sometimes make exceptions for this. Our
  12924. decision will be guided by the two goals of preserving the free status
  12925. of all derivatives of our free software and of promoting the sharing
  12926. and reuse of software generally.
  12927. <li>BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
  12928. WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
  12929. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
  12930. OTHER PARTIES PROVIDE THE LIBRARY &ldquo;AS IS&rdquo; WITHOUT WARRANTY OF ANY
  12931. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
  12932. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  12933. PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
  12934. LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
  12935. THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  12936. <li>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  12937. WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
  12938. AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
  12939. FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
  12940. CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
  12941. LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
  12942. RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
  12943. FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
  12944. SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  12945. DAMAGES.
  12946. </ol>
  12947. <h4 class="unnumberedsubsec">How to Apply These Terms to Your New Libraries</h4>
  12948. <p>If you develop a new library, and you want it to be of the greatest
  12949. possible use to the public, we recommend making it free software that
  12950. everyone can redistribute and change. You can do so by permitting
  12951. redistribution under these terms (or, alternatively, under the terms of the
  12952. ordinary General Public License).
  12953. <p>To apply these terms, attach the following notices to the library. It is
  12954. safest to attach them to the start of each source file to most effectively
  12955. convey the exclusion of warranty; and each file should have at least the
  12956. &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.
  12957. <pre class="smallexample"> <var>one line to give the library's name and an idea of what it does.</var>
  12958. Copyright (C) <var>year</var> <var>name of author</var>
  12959. This library is free software; you can redistribute it and/or modify it
  12960. under the terms of the GNU Lesser General Public License as published by
  12961. the Free Software Foundation; either version 2.1 of the License, or (at
  12962. your option) any later version.
  12963. This library is distributed in the hope that it will be useful, but
  12964. WITHOUT ANY WARRANTY; without even the implied warranty of
  12965. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12966. Lesser General Public License for more details.
  12967. You should have received a copy of the GNU Lesser General Public
  12968. License along with this library; if not, write to the Free Software
  12969. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
  12970. USA.
  12971. </pre>
  12972. <p>Also add information on how to contact you by electronic and paper mail.
  12973. <p>You should also get your employer (if you work as a programmer) or your
  12974. school, if any, to sign a &ldquo;copyright disclaimer&rdquo; for the library, if
  12975. necessary. Here is a sample; alter the names:
  12976. <pre class="smallexample"> Yoyodyne, Inc., hereby disclaims all copyright interest in the library
  12977. `Frob' (a library for tweaking knobs) written by James Random Hacker.
  12978. <var>signature of Ty Coon</var>, 1 April 1990
  12979. Ty Coon, President of Vice
  12980. </pre>
  12981. <p>That's all there is to it!
  12982. <div class="node">
  12983. <a name="GNU-FDL"></a>
  12984. <p><hr>
  12985. Previous:&nbsp;<a rel="previous" accesskey="p" href="#GNU-LGPL">GNU LGPL</a>,
  12986. Up:&nbsp;<a rel="up" accesskey="u" href="#Licenses">Licenses</a>
  12987. </div>
  12988. <h3 class="appendixsec">C.3 GNU Free Documentation License</h3>
  12989. <p><a name="index-FDL_002c-GNU-Free-Documentation-License-1270"></a><a name="index-License_002c-GNU-FDL-1271"></a><div align="center">Version 1.2, November 2002</div>
  12990. <pre class="display"> Copyright &copy; 2000,2001,2002 Free Software Foundation, Inc.
  12991. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  12992. Everyone is permitted to copy and distribute verbatim copies
  12993. of this license document, but changing it is not allowed.
  12994. </pre>
  12995. <ol type=1 start=0>
  12996. <li>PREAMBLE
  12997. <p>The purpose of this License is to make a manual, textbook, or other
  12998. functional and useful document <dfn>free</dfn> in the sense of freedom: to
  12999. assure everyone the effective freedom to copy and redistribute it,
  13000. with or without modifying it, either commercially or noncommercially.
  13001. Secondarily, this License preserves for the author and publisher a way
  13002. to get credit for their work, while not being considered responsible
  13003. for modifications made by others.
  13004. <p>This License is a kind of &ldquo;copyleft&rdquo;, which means that derivative
  13005. works of the document must themselves be free in the same sense. It
  13006. complements the GNU General Public License, which is a copyleft
  13007. license designed for free software.
  13008. <p>We have designed this License in order to use it for manuals for free
  13009. software, because free software needs free documentation: a free
  13010. program should come with manuals providing the same freedoms that the
  13011. software does. But this License is not limited to software manuals;
  13012. it can be used for any textual work, regardless of subject matter or
  13013. whether it is published as a printed book. We recommend this License
  13014. principally for works whose purpose is instruction or reference.
  13015. <li>APPLICABILITY AND DEFINITIONS
  13016. <p>This License applies to any manual or other work, in any medium, that
  13017. contains a notice placed by the copyright holder saying it can be
  13018. distributed under the terms of this License. Such a notice grants a
  13019. world-wide, royalty-free license, unlimited in duration, to use that
  13020. work under the conditions stated herein. The &ldquo;Document&rdquo;, below,
  13021. refers to any such manual or work. Any member of the public is a
  13022. licensee, and is addressed as &ldquo;you&rdquo;. You accept the license if you
  13023. copy, modify or distribute the work in a way requiring permission
  13024. under copyright law.
  13025. <p>A &ldquo;Modified Version&rdquo; of the Document means any work containing the
  13026. Document or a portion of it, either copied verbatim, or with
  13027. modifications and/or translated into another language.
  13028. <p>A &ldquo;Secondary Section&rdquo; is a named appendix or a front-matter section
  13029. of the Document that deals exclusively with the relationship of the
  13030. publishers or authors of the Document to the Document's overall
  13031. subject (or to related matters) and contains nothing that could fall
  13032. directly within that overall subject. (Thus, if the Document is in
  13033. part a textbook of mathematics, a Secondary Section may not explain
  13034. any mathematics.) The relationship could be a matter of historical
  13035. connection with the subject or with related matters, or of legal,
  13036. commercial, philosophical, ethical or political position regarding
  13037. them.
  13038. <p>The &ldquo;Invariant Sections&rdquo; are certain Secondary Sections whose titles
  13039. are designated, as being those of Invariant Sections, in the notice
  13040. that says that the Document is released under this License. If a
  13041. section does not fit the above definition of Secondary then it is not
  13042. allowed to be designated as Invariant. The Document may contain zero
  13043. Invariant Sections. If the Document does not identify any Invariant
  13044. Sections then there are none.
  13045. <p>The &ldquo;Cover Texts&rdquo; are certain short passages of text that are listed,
  13046. as Front-Cover Texts or Back-Cover Texts, in the notice that says that
  13047. the Document is released under this License. A Front-Cover Text may
  13048. be at most 5 words, and a Back-Cover Text may be at most 25 words.
  13049. <p>A &ldquo;Transparent&rdquo; copy of the Document means a machine-readable copy,
  13050. represented in a format whose specification is available to the
  13051. general public, that is suitable for revising the document
  13052. straightforwardly with generic text editors or (for images composed of
  13053. pixels) generic paint programs or (for drawings) some widely available
  13054. drawing editor, and that is suitable for input to text formatters or
  13055. for automatic translation to a variety of formats suitable for input
  13056. to text formatters. A copy made in an otherwise Transparent file
  13057. format whose markup, or absence of markup, has been arranged to thwart
  13058. or discourage subsequent modification by readers is not Transparent.
  13059. An image format is not Transparent if used for any substantial amount
  13060. of text. A copy that is not &ldquo;Transparent&rdquo; is called &ldquo;Opaque&rdquo;.
  13061. <p>Examples of suitable formats for Transparent copies include plain
  13062. <span class="sc">ascii</span> without markup, Texinfo input format, LaTeX input
  13063. format, SGML or XML using a publicly available
  13064. DTD, and standard-conforming simple HTML,
  13065. PostScript or PDF designed for human modification. Examples
  13066. of transparent image formats include PNG, XCF and
  13067. JPG. Opaque formats include proprietary formats that can be
  13068. read and edited only by proprietary word processors, SGML or
  13069. XML for which the DTD and/or processing tools are
  13070. not generally available, and the machine-generated HTML,
  13071. PostScript or PDF produced by some word processors for
  13072. output purposes only.
  13073. <p>The &ldquo;Title Page&rdquo; means, for a printed book, the title page itself,
  13074. plus such following pages as are needed to hold, legibly, the material
  13075. this License requires to appear in the title page. For works in
  13076. formats which do not have any title page as such, &ldquo;Title Page&rdquo; means
  13077. the text near the most prominent appearance of the work's title,
  13078. preceding the beginning of the body of the text.
  13079. <p>A section &ldquo;Entitled XYZ&rdquo; means a named subunit of the Document whose
  13080. title either is precisely XYZ or contains XYZ in parentheses following
  13081. text that translates XYZ in another language. (Here XYZ stands for a
  13082. specific section name mentioned below, such as &ldquo;Acknowledgements&rdquo;,
  13083. &ldquo;Dedications&rdquo;, &ldquo;Endorsements&rdquo;, or &ldquo;History&rdquo;.) To &ldquo;Preserve the Title&rdquo;
  13084. of such a section when you modify the Document means that it remains a
  13085. section &ldquo;Entitled XYZ&rdquo; according to this definition.
  13086. <p>The Document may include Warranty Disclaimers next to the notice which
  13087. states that this License applies to the Document. These Warranty
  13088. Disclaimers are considered to be included by reference in this
  13089. License, but only as regards disclaiming warranties: any other
  13090. implication that these Warranty Disclaimers may have is void and has
  13091. no effect on the meaning of this License.
  13092. <li>VERBATIM COPYING
  13093. <p>You may copy and distribute the Document in any medium, either
  13094. commercially or noncommercially, provided that this License, the
  13095. copyright notices, and the license notice saying this License applies
  13096. to the Document are reproduced in all copies, and that you add no other
  13097. conditions whatsoever to those of this License. You may not use
  13098. technical measures to obstruct or control the reading or further
  13099. copying of the copies you make or distribute. However, you may accept
  13100. compensation in exchange for copies. If you distribute a large enough
  13101. number of copies you must also follow the conditions in section 3.
  13102. <p>You may also lend copies, under the same conditions stated above, and
  13103. you may publicly display copies.
  13104. <li>COPYING IN QUANTITY
  13105. <p>If you publish printed copies (or copies in media that commonly have
  13106. printed covers) of the Document, numbering more than 100, and the
  13107. Document's license notice requires Cover Texts, you must enclose the
  13108. copies in covers that carry, clearly and legibly, all these Cover
  13109. Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
  13110. the back cover. Both covers must also clearly and legibly identify
  13111. you as the publisher of these copies. The front cover must present
  13112. the full title with all words of the title equally prominent and
  13113. visible. You may add other material on the covers in addition.
  13114. Copying with changes limited to the covers, as long as they preserve
  13115. the title of the Document and satisfy these conditions, can be treated
  13116. as verbatim copying in other respects.
  13117. <p>If the required texts for either cover are too voluminous to fit
  13118. legibly, you should put the first ones listed (as many as fit
  13119. reasonably) on the actual cover, and continue the rest onto adjacent
  13120. pages.
  13121. <p>If you publish or distribute Opaque copies of the Document numbering
  13122. more than 100, you must either include a machine-readable Transparent
  13123. copy along with each Opaque copy, or state in or with each Opaque copy
  13124. a computer-network location from which the general network-using
  13125. public has access to download using public-standard network protocols
  13126. a complete Transparent copy of the Document, free of added material.
  13127. If you use the latter option, you must take reasonably prudent steps,
  13128. when you begin distribution of Opaque copies in quantity, to ensure
  13129. that this Transparent copy will remain thus accessible at the stated
  13130. location until at least one year after the last time you distribute an
  13131. Opaque copy (directly or through your agents or retailers) of that
  13132. edition to the public.
  13133. <p>It is requested, but not required, that you contact the authors of the
  13134. Document well before redistributing any large number of copies, to give
  13135. them a chance to provide you with an updated version of the Document.
  13136. <li>MODIFICATIONS
  13137. <p>You may copy and distribute a Modified Version of the Document under
  13138. the conditions of sections 2 and 3 above, provided that you release
  13139. the Modified Version under precisely this License, with the Modified
  13140. Version filling the role of the Document, thus licensing distribution
  13141. and modification of the Modified Version to whoever possesses a copy
  13142. of it. In addition, you must do these things in the Modified Version:
  13143. <ol type=A start=1>
  13144. <li>Use in the Title Page (and on the covers, if any) a title distinct
  13145. from that of the Document, and from those of previous versions
  13146. (which should, if there were any, be listed in the History section
  13147. of the Document). You may use the same title as a previous version
  13148. if the original publisher of that version gives permission.
  13149. <li>List on the Title Page, as authors, one or more persons or entities
  13150. responsible for authorship of the modifications in the Modified
  13151. Version, together with at least five of the principal authors of the
  13152. Document (all of its principal authors, if it has fewer than five),
  13153. unless they release you from this requirement.
  13154. <li>State on the Title page the name of the publisher of the
  13155. Modified Version, as the publisher.
  13156. <li>Preserve all the copyright notices of the Document.
  13157. <li>Add an appropriate copyright notice for your modifications
  13158. adjacent to the other copyright notices.
  13159. <li>Include, immediately after the copyright notices, a license notice
  13160. giving the public permission to use the Modified Version under the
  13161. terms of this License, in the form shown in the Addendum below.
  13162. <li>Preserve in that license notice the full lists of Invariant Sections
  13163. and required Cover Texts given in the Document's license notice.
  13164. <li>Include an unaltered copy of this License.
  13165. <li>Preserve the section Entitled &ldquo;History&rdquo;, Preserve its Title, and add
  13166. to it an item stating at least the title, year, new authors, and
  13167. publisher of the Modified Version as given on the Title Page. If
  13168. there is no section Entitled &ldquo;History&rdquo; in the Document, create one
  13169. stating the title, year, authors, and publisher of the Document as
  13170. given on its Title Page, then add an item describing the Modified
  13171. Version as stated in the previous sentence.
  13172. <li>Preserve the network location, if any, given in the Document for
  13173. public access to a Transparent copy of the Document, and likewise
  13174. the network locations given in the Document for previous versions
  13175. it was based on. These may be placed in the &ldquo;History&rdquo; section.
  13176. You may omit a network location for a work that was published at
  13177. least four years before the Document itself, or if the original
  13178. publisher of the version it refers to gives permission.
  13179. <li>For any section Entitled &ldquo;Acknowledgements&rdquo; or &ldquo;Dedications&rdquo;, Preserve
  13180. the Title of the section, and preserve in the section all the
  13181. substance and tone of each of the contributor acknowledgements and/or
  13182. dedications given therein.
  13183. <li>Preserve all the Invariant Sections of the Document,
  13184. unaltered in their text and in their titles. Section numbers
  13185. or the equivalent are not considered part of the section titles.
  13186. <li>Delete any section Entitled &ldquo;Endorsements&rdquo;. Such a section
  13187. may not be included in the Modified Version.
  13188. <li>Do not retitle any existing section to be Entitled &ldquo;Endorsements&rdquo; or
  13189. to conflict in title with any Invariant Section.
  13190. <li>Preserve any Warranty Disclaimers.
  13191. </ol>
  13192. <p>If the Modified Version includes new front-matter sections or
  13193. appendices that qualify as Secondary Sections and contain no material
  13194. copied from the Document, you may at your option designate some or all
  13195. of these sections as invariant. To do this, add their titles to the
  13196. list of Invariant Sections in the Modified Version's license notice.
  13197. These titles must be distinct from any other section titles.
  13198. <p>You may add a section Entitled &ldquo;Endorsements&rdquo;, provided it contains
  13199. nothing but endorsements of your Modified Version by various
  13200. parties&mdash;for example, statements of peer review or that the text has
  13201. been approved by an organization as the authoritative definition of a
  13202. standard.
  13203. <p>You may add a passage of up to five words as a Front-Cover Text, and a
  13204. passage of up to 25 words as a Back-Cover Text, to the end of the list
  13205. of Cover Texts in the Modified Version. Only one passage of
  13206. Front-Cover Text and one of Back-Cover Text may be added by (or
  13207. through arrangements made by) any one entity. If the Document already
  13208. includes a cover text for the same cover, previously added by you or
  13209. by arrangement made by the same entity you are acting on behalf of,
  13210. you may not add another; but you may replace the old one, on explicit
  13211. permission from the previous publisher that added the old one.
  13212. <p>The author(s) and publisher(s) of the Document do not by this License
  13213. give permission to use their names for publicity for or to assert or
  13214. imply endorsement of any Modified Version.
  13215. <li>COMBINING DOCUMENTS
  13216. <p>You may combine the Document with other documents released under this
  13217. License, under the terms defined in section 4 above for modified
  13218. versions, provided that you include in the combination all of the
  13219. Invariant Sections of all of the original documents, unmodified, and
  13220. list them all as Invariant Sections of your combined work in its
  13221. license notice, and that you preserve all their Warranty Disclaimers.
  13222. <p>The combined work need only contain one copy of this License, and
  13223. multiple identical Invariant Sections may be replaced with a single
  13224. copy. If there are multiple Invariant Sections with the same name but
  13225. different contents, make the title of each such section unique by
  13226. adding at the end of it, in parentheses, the name of the original
  13227. author or publisher of that section if known, or else a unique number.
  13228. Make the same adjustment to the section titles in the list of
  13229. Invariant Sections in the license notice of the combined work.
  13230. <p>In the combination, you must combine any sections Entitled &ldquo;History&rdquo;
  13231. in the various original documents, forming one section Entitled
  13232. &ldquo;History&rdquo;; likewise combine any sections Entitled &ldquo;Acknowledgements&rdquo;,
  13233. and any sections Entitled &ldquo;Dedications&rdquo;. You must delete all
  13234. sections Entitled &ldquo;Endorsements.&rdquo;
  13235. <li>COLLECTIONS OF DOCUMENTS
  13236. <p>You may make a collection consisting of the Document and other documents
  13237. released under this License, and replace the individual copies of this
  13238. License in the various documents with a single copy that is included in
  13239. the collection, provided that you follow the rules of this License for
  13240. verbatim copying of each of the documents in all other respects.
  13241. <p>You may extract a single document from such a collection, and distribute
  13242. it individually under this License, provided you insert a copy of this
  13243. License into the extracted document, and follow this License in all
  13244. other respects regarding verbatim copying of that document.
  13245. <li>AGGREGATION WITH INDEPENDENT WORKS
  13246. <p>A compilation of the Document or its derivatives with other separate
  13247. and independent documents or works, in or on a volume of a storage or
  13248. distribution medium, is called an &ldquo;aggregate&rdquo; if the copyright
  13249. resulting from the compilation is not used to limit the legal rights
  13250. of the compilation's users beyond what the individual works permit.
  13251. When the Document is included in an aggregate, this License does not
  13252. apply to the other works in the aggregate which are not themselves
  13253. derivative works of the Document.
  13254. <p>If the Cover Text requirement of section 3 is applicable to these
  13255. copies of the Document, then if the Document is less than one half of
  13256. the entire aggregate, the Document's Cover Texts may be placed on
  13257. covers that bracket the Document within the aggregate, or the
  13258. electronic equivalent of covers if the Document is in electronic form.
  13259. Otherwise they must appear on printed covers that bracket the whole
  13260. aggregate.
  13261. <li>TRANSLATION
  13262. <p>Translation is considered a kind of modification, so you may
  13263. distribute translations of the Document under the terms of section 4.
  13264. Replacing Invariant Sections with translations requires special
  13265. permission from their copyright holders, but you may include
  13266. translations of some or all Invariant Sections in addition to the
  13267. original versions of these Invariant Sections. You may include a
  13268. translation of this License, and all the license notices in the
  13269. Document, and any Warranty Disclaimers, provided that you also include
  13270. the original English version of this License and the original versions
  13271. of those notices and disclaimers. In case of a disagreement between
  13272. the translation and the original version of this License or a notice
  13273. or disclaimer, the original version will prevail.
  13274. <p>If a section in the Document is Entitled &ldquo;Acknowledgements&rdquo;,
  13275. &ldquo;Dedications&rdquo;, or &ldquo;History&rdquo;, the requirement (section 4) to Preserve
  13276. its Title (section 1) will typically require changing the actual
  13277. title.
  13278. <li>TERMINATION
  13279. <p>You may not copy, modify, sublicense, or distribute the Document except
  13280. as expressly provided for under this License. Any other attempt to
  13281. copy, modify, sublicense or distribute the Document is void, and will
  13282. automatically terminate your rights under this License. However,
  13283. parties who have received copies, or rights, from you under this
  13284. License will not have their licenses terminated so long as such
  13285. parties remain in full compliance.
  13286. <li>FUTURE REVISIONS OF THIS LICENSE
  13287. <p>The Free Software Foundation may publish new, revised versions
  13288. of the GNU Free Documentation License from time to time. Such new
  13289. versions will be similar in spirit to the present version, but may
  13290. differ in detail to address new problems or concerns. See
  13291. <a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
  13292. <p>Each version of the License is given a distinguishing version number.
  13293. If the Document specifies that a particular numbered version of this
  13294. License &ldquo;or any later version&rdquo; applies to it, you have the option of
  13295. following the terms and conditions either of that specified version or
  13296. of any later version that has been published (not as a draft) by the
  13297. Free Software Foundation. If the Document does not specify a version
  13298. number of this License, you may choose any version ever published (not
  13299. as a draft) by the Free Software Foundation.
  13300. </ol>
  13301. <h4 class="unnumberedsubsec">ADDENDUM: How to use this License for your documents</h4>
  13302. <p>To use this License in a document you have written, include a copy of
  13303. the License in the document and put the following copyright and
  13304. license notices just after the title page:
  13305. <pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
  13306. Permission is granted to copy, distribute and/or modify this document
  13307. under the terms of the GNU Free Documentation License, Version 1.2
  13308. or any later version published by the Free Software Foundation;
  13309. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  13310. Texts. A copy of the license is included in the section entitled ``GNU
  13311. Free Documentation License''.
  13312. </pre>
  13313. <p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
  13314. replace the &ldquo;with...Texts.&rdquo; line with this:
  13315. <pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
  13316. the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
  13317. being <var>list</var>.
  13318. </pre>
  13319. <p>If you have Invariant Sections without Cover Texts, or some other
  13320. combination of the three, merge those two alternatives to suit the
  13321. situation.
  13322. <p>If your document contains nontrivial examples of program code, we
  13323. recommend releasing these examples in parallel under your choice of
  13324. free software license, such as the GNU General Public License,
  13325. to permit their use in free software.
  13326. <!-- Local Variables: -->
  13327. <!-- ispell-local-pdict: "ispell-dict" -->
  13328. <!-- End: -->
  13329. <div class="node">
  13330. <a name="Program-Index"></a>
  13331. <p><hr>
  13332. Next:&nbsp;<a rel="next" accesskey="n" href="#Option-Index">Option Index</a>,
  13333. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Licenses">Licenses</a>,
  13334. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  13335. </div>
  13336. <h2 class="unnumbered">Program Index</h2>
  13337. <ul class="index-pg" compact>
  13338. <li><a href="#index-autopoint-1155"><code>autopoint</code></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13339. <li><a href="#index-envsubst-1204"><code>envsubst</code></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13340. <li><a href="#index-gettext-1181"><code>gettext</code></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13341. <li><a href="#index-gettext-1176"><code>gettext</code></a>: <a href="#sh">sh</a></li>
  13342. <li><a href="#index-gettextize-1117"><code>gettextize</code></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13343. <li><a href="#index-msgattrib-828"><code>msgattrib</code></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13344. <li><a href="#index-msgcat-542"><code>msgcat</code></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13345. <li><a href="#index-msgcmp-810"><code>msgcmp</code></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13346. <li><a href="#index-msgcomm-768"><code>msgcomm</code></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13347. <li><a href="#index-msgconv-590"><code>msgconv</code></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13348. <li><a href="#index-msgen-878"><code>msgen</code></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13349. <li><a href="#index-msgexec-911"><code>msgexec</code></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13350. <li><a href="#index-msgfilter-679"><code>msgfilter</code></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13351. <li><a href="#index-msgfmt-947"><code>msgfmt</code></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13352. <li><a href="#index-msggrep-624"><code>msggrep</code></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13353. <li><a href="#index-msginit-239"><code>msginit</code></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13354. <li><a href="#index-msgmerge-276"><code>msgmerge</code></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13355. <li><a href="#index-msgunfmt-1009"><code>msgunfmt</code></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13356. <li><a href="#index-msguniq-727"><code>msguniq</code></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13357. <li><a href="#index-ngettext-1193"><code>ngettext</code></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13358. <li><a href="#index-ngettext-1177"><code>ngettext</code></a>: <a href="#sh">sh</a></li>
  13359. <li><a href="#index-recode_002dsr_002dlatin-700"><code>recode-sr-latin</code></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13360. <li><a href="#index-xgettext-159"><code>xgettext</code></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13361. </ul><div class="node">
  13362. <a name="Option-Index"></a>
  13363. <p><hr>
  13364. Next:&nbsp;<a rel="next" accesskey="n" href="#Variable-Index">Variable Index</a>,
  13365. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Program-Index">Program Index</a>,
  13366. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  13367. </div>
  13368. <h2 class="unnumbered">Option Index</h2>
  13369. <ul class="index-op" compact>
  13370. <li><a href="#index-g_t_002d_002dadd_002dcomments_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-183"><code>--add-comments</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13371. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-862"><code>--add-location</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13372. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-573"><code>--add-location</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13373. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-793"><code>--add-location</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13374. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-608"><code>--add-location</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13375. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-895"><code>--add-location</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13376. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-711"><code>--add-location</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13377. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-665"><code>--add-location</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13378. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-306"><code>--add-location</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13379. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-752"><code>--add-location</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13380. <li><a href="#index-g_t_002d_002dadd_002dlocation_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-211"><code>--add-location</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13381. <li><a href="#index-g_t_002d_002dalignment_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1000"><code>--alignment</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13382. <li><a href="#index-g_t_002d_002dbackup_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-287"><code>--backup</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13383. <li><a href="#index-g_t_002d_002dboost_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-200"><code>--boost</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13384. <li><a href="#index-g_t_002d_002dc_002b_002b_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-176"><code>--c++</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13385. <li><a href="#index-g_t_002d_002dcheck_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-984"><code>--check</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13386. <li><a href="#index-g_t_002d_002dcheck_002daccelerators_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-992"><code>--check-accelerators</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13387. <li><a href="#index-g_t_002d_002dcheck_002dcompatibility_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-990"><code>--check-compatibility</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13388. <li><a href="#index-g_t_002d_002dcheck_002ddomain_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-988"><code>--check-domain</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13389. <li><a href="#index-g_t_002d_002dcheck_002dformat_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-985"><code>--check-format</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13390. <li><a href="#index-g_t_002d_002dcheck_002dheader_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-987"><code>--check-header</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13391. <li><a href="#index-g_t_002d_002dclear_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-844"><code>--clear-fuzzy</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13392. <li><a href="#index-g_t_002d_002dclear_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-846"><code>--clear-obsolete</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13393. <li><a href="#index-g_t_002d_002dclear_002dprevious_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-847"><code>--clear-previous</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13394. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-855"><code>--color</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13395. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-930"><code>--color</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#The-_002d_002dcolor-option">The --color option</a></li>
  13396. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-566"><code>--color</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13397. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-786"><code>--color</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13398. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-602"><code>--color</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13399. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-889"><code>--color</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13400. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-705"><code>--color</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13401. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-660"><code>--color</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13402. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-253"><code>--color</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13403. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-300"><code>--color</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13404. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1035"><code>--color</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13405. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-745"><code>--color</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13406. <li><a href="#index-g_t_002d_002dcolor_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-204"><code>--color</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13407. <li><a href="#index-g_t_002d_002dcomment_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-642"><code>--comment</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13408. <li><a href="#index-g_t_002d_002dcompendium_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-281"><code>--compendium</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13409. <li><a href="#index-g_t_002d_002dcopyright_002dholder_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-225"><code>--copyright-holder</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13410. <li><a href="#index-g_t_002d_002dcsharp_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-956"><code>--csharp</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13411. <li><a href="#index-g_t_002d_002dcsharp_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1015"><code>--csharp</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13412. <li><a href="#index-g_t_002d_002dcsharp_002dresources_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-958"><code>--csharp-resources</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13413. <li><a href="#index-g_t_002d_002dcsharp_002dresources_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1017"><code>--csharp-resources</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13414. <li><a href="#index-g_t_002d_002ddebug_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-202"><code>--debug</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13415. <li><a href="#index-g_t_002d_002ddefault_002ddomain_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-166"><code>--default-domain</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13416. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-833"><code>--directory</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13417. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-549"><code>--directory</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13418. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-814"><code>--directory</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13419. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-774"><code>--directory</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13420. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-594"><code>--directory</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13421. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-882"><code>--directory</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13422. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-922"><code>--directory</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13423. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-688"><code>--directory</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13424. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-951"><code>--directory</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13425. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-628"><code>--directory</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13426. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-279"><code>--directory</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13427. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-732"><code>--directory</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13428. <li><a href="#index-g_t_002d_002ddirectory_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-164"><code>--directory</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13429. <li><a href="#index-g_t_002d_002ddomain_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1185"><code>--domain</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13430. <li><a href="#index-g_t_002d_002ddomain_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-634"><code>--domain</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13431. <li><a href="#index-g_t_002d_002ddomain_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1197"><code>--domain</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13432. <li><a href="#index-g_t_002d_002ddry_002drun_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1160"><code>--dry-run</code><span class="roman">, </span><code>autopoint</code><span class="roman"> option</span></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13433. <li><a href="#index-g_t_002d_002ddry_002drun_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1126"><code>--dry-run</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13434. <li><a href="#index-g_t_002d_002dexclude_002dfile_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-181"><code>--exclude-file</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13435. <li><a href="#index-g_t_002d_002dexpression_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-694"><code>--expression</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13436. <li><a href="#index-g_t_002d_002dextended_002dregexp_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-646"><code>--extended-regexp</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13437. <li><a href="#index-g_t_002d_002dextract_002dall_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-185"><code>--extract-all</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13438. <li><a href="#index-g_t_002d_002dextracted_002dcomment_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-644"><code>--extracted-comment</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13439. <li><a href="#index-g_t_002d_002dfile_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-696"><code>--file</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13440. <li><a href="#index-g_t_002d_002dfile_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-652"><code>--file</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13441. <li><a href="#index-g_t_002d_002dfiles_002dfrom_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-547"><code>--files-from</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13442. <li><a href="#index-g_t_002d_002dfiles_002dfrom_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-772"><code>--files-from</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13443. <li><a href="#index-g_t_002d_002dfiles_002dfrom_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-162"><code>--files-from</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13444. <li><a href="#index-g_t_002d_002dfixed_002dstrings_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-648"><code>--fixed-strings</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13445. <li><a href="#index-g_t_002d_002dflag_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-190"><code>--flag</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13446. <li><a href="#index-g_t_002d_002dforce_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1158"><code>--force</code><span class="roman">, </span><code>autopoint</code><span class="roman"> option</span></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13447. <li><a href="#index-g_t_002d_002dforce_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1120"><code>--force</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13448. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-857"><code>--force-po</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13449. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-568"><code>--force-po</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13450. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-788"><code>--force-po</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13451. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-604"><code>--force-po</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13452. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-891"><code>--force-po</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13453. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-707"><code>--force-po</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13454. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-662"><code>--force-po</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13455. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-302"><code>--force-po</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13456. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1037"><code>--force-po</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13457. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-747"><code>--force-po</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13458. <li><a href="#index-g_t_002d_002dforce_002dpo_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-206"><code>--force-po</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13459. <li><a href="#index-g_t_002d_002dforeign_002duser_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-226"><code>--foreign-user</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13460. <li><a href="#index-g_t_002d_002dfrom_002dcode_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-177"><code>--from-code</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13461. <li><a href="#index-g_t_002d_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-850"><code>--fuzzy</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13462. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1161"><code>--help</code><span class="roman">, </span><code>autopoint</code><span class="roman"> option</span></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13463. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1212"><code>--help</code><span class="roman">, </span><code>envsubst</code><span class="roman"> option</span></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13464. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1189"><code>--help</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13465. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1127"><code>--help</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13466. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-875"><code>--help</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13467. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-587"><code>--help</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13468. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-825"><code>--help</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13469. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-807"><code>--help</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13470. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-621"><code>--help</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13471. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-908"><code>--help</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13472. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-927"><code>--help</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13473. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-724"><code>--help</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13474. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1003"><code>--help</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13475. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-676"><code>--help</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13476. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-262"><code>--help</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13477. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-320"><code>--help</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13478. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1051"><code>--help</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13479. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-765"><code>--help</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13480. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1201"><code>--help</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13481. <li><a href="#index-g_t_002d_002dhelp_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-235"><code>--help</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13482. <li><a href="#index-g_t_002d_002dignore_002dcase_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-654"><code>--ignore-case</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13483. <li><a href="#index-g_t_002d_002dignore_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-849"><code>--ignore-file</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13484. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-859"><code>--indent</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13485. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-570"><code>--indent</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13486. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-790"><code>--indent</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13487. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-606"><code>--indent</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13488. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-893"><code>--indent</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13489. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-708"><code>--indent</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13490. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-663"><code>--indent</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13491. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-304"><code>--indent</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13492. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1039"><code>--indent</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13493. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-749"><code>--indent</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13494. <li><a href="#index-g_t_002d_002dindent_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-208"><code>--indent</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13495. <li><a href="#index-g_t_002d_002dinput_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-920"><code>--input</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13496. <li><a href="#index-g_t_002d_002dinput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-686"><code>--input</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13497. <li><a href="#index-g_t_002d_002dinput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-244"><code>--input</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13498. <li><a href="#index-g_t_002d_002dintl_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1121"><code>--intl</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13499. <li><a href="#index-g_t_002d_002dinvert_002dmatch_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-656"><code>--invert-match</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13500. <li><a href="#index-g_t_002d_002djava_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-953"><code>--java</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13501. <li><a href="#index-g_t_002d_002djava_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1013"><code>--java</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13502. <li><a href="#index-g_t_002d_002djava2_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-955"><code>--java2</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13503. <li><a href="#index-g_t_002d_002djoin_002dexisting_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-179"><code>--join-existing</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13504. <li><a href="#index-g_t_002d_002dkde_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-198"><code>--kde</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13505. <li><a href="#index-g_t_002d_002dkeep_002dheader_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-709"><code>--keep-header</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13506. <li><a href="#index-g_t_002d_002dkeyword_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-187"><code>--keyword</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13507. <li><a href="#index-g_t_002d_002dlang_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-888"><code>--lang</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13508. <li><a href="#index-g_t_002d_002dlang_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-565"><code>--lang</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13509. <li><a href="#index-g_t_002d_002dlang_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-299"><code>--lang</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13510. <li><a href="#index-g_t_002d_002dlanguage_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-173"><code>--language</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13511. <li><a href="#index-g_t_002d_002dless_002dthan_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-554"><code>--less-than</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13512. <li><a href="#index-g_t_002d_002dless_002dthan_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-778"><code>--less-than</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13513. <li><a href="#index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-970"><code>--locale</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13514. <li><a href="#index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-251"><code>--locale</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13515. <li><a href="#index-g_t_002d_002dlocale_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1024"><code>--locale</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13516. <li><a href="#index-g_t_002d_002dlocation_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-632"><code>--location</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13517. <li><a href="#index-g_t_002d_002dmore_002dthan_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-556"><code>--more-than</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13518. <li><a href="#index-g_t_002d_002dmore_002dthan_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-780"><code>--more-than</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13519. <li><a href="#index-g_t_002d_002dmsgctxt_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-636"><code>--msgctxt</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13520. <li><a href="#index-g_t_002d_002dmsgid_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-638"><code>--msgid</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13521. <li><a href="#index-g_t_002d_002dmsgid_002dbugs_002daddress_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-229"><code>--msgid-bugs-address</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13522. <li><a href="#index-g_t_002d_002dmsgstr_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-640"><code>--msgstr</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13523. <li><a href="#index-g_t_002d_002dmsgstr_002dprefix_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-231"><code>--msgstr-prefix</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13524. <li><a href="#index-g_t_002d_002dmsgstr_002dsuffix_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-233"><code>--msgstr-suffix</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13525. <li><a href="#index-g_t_002d_002dmulti_002ddomain_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-816"><code>--multi-domain</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13526. <li><a href="#index-g_t_002d_002dmulti_002ddomain_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-292"><code>--multi-domain</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13527. <li><a href="#index-g_t_002d_002dno_002dchangelog_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1123"><code>--no-changelog</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13528. <li><a href="#index-g_t_002d_002dno_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-838"><code>--no-fuzzy</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13529. <li><a href="#index-g_t_002d_002dno_002dfuzzy_002dmatching_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-818"><code>--no-fuzzy-matching</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13530. <li><a href="#index-g_t_002d_002dno_002dfuzzy_002dmatching_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-294"><code>--no-fuzzy-matching</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13531. <li><a href="#index-g_t_002d_002dno_002dhash_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1001"><code>--no-hash</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13532. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-860"><code>--no-location</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13533. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-571"><code>--no-location</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13534. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-791"><code>--no-location</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13535. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-607"><code>--no-location</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13536. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-894"><code>--no-location</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13537. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-710"><code>--no-location</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13538. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-664"><code>--no-location</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13539. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-305"><code>--no-location</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13540. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-750"><code>--no-location</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13541. <li><a href="#index-g_t_002d_002dno_002dlocation_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-209"><code>--no-location</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13542. <li><a href="#index-g_t_002d_002dno_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-840"><code>--no-obsolete</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13543. <li><a href="#index-g_t_002d_002dno_002dtranslator_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-252"><code>--no-translator</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13544. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-869"><code>--no-wrap</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13545. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-580"><code>--no-wrap</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13546. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-800"><code>--no-wrap</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13547. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-615"><code>--no-wrap</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13548. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-902"><code>--no-wrap</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13549. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-718"><code>--no-wrap</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13550. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-672"><code>--no-wrap</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13551. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-260"><code>--no-wrap</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13552. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-313"><code>--no-wrap</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13553. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1046"><code>--no-wrap</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13554. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-759"><code>--no-wrap</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13555. <li><a href="#index-g_t_002d_002dno_002dwrap_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-217"><code>--no-wrap</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13556. <li><a href="#index-g_t_002d_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-851"><code>--obsolete</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13557. <li><a href="#index-g_t_002d_002domit_002dheader_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-805"><code>--omit-header</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13558. <li><a href="#index-g_t_002d_002domit_002dheader_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-223"><code>--omit-header</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13559. <li><a href="#index-g_t_002d_002donly_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-848"><code>--only-file</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13560. <li><a href="#index-g_t_002d_002donly_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-839"><code>--only-fuzzy</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13561. <li><a href="#index-g_t_002d_002donly_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-841"><code>--only-obsolete</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13562. <li><a href="#index-g_t_002d_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-168"><code>--output</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13563. <li><a href="#index-g_t_002d_002doutput_002ddir_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-170"><code>--output-dir</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13564. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-835"><code>--output-file</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13565. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-551"><code>--output-file</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13566. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-776"><code>--output-file</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13567. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-596"><code>--output-file</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13568. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-884"><code>--output-file</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13569. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-690"><code>--output-file</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13570. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-965"><code>--output-file</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13571. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-630"><code>--output-file</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13572. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-246"><code>--output-file</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13573. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-285"><code>--output-file</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13574. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1034"><code>--output-file</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13575. <li><a href="#index-g_t_002d_002doutput_002dfile_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-734"><code>--output-file</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13576. <li><a href="#index-g_t_002d_002dpackage_002dname_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-227"><code>--package-name</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13577. <li><a href="#index-g_t_002d_002dpackage_002dversion_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-228"><code>--package-version</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13578. <li><a href="#index-g_t_002d_002dpo_002ddir_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1122"><code>--po-dir</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13579. <li><a href="#index-g_t_002d_002dprevious_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-295"><code>--previous</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13580. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-853"><code>--properties-input</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13581. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-560"><code>--properties-input</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13582. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-822"><code>--properties-input</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13583. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-784"><code>--properties-input</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13584. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-600"><code>--properties-input</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13585. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-886"><code>--properties-input</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13586. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-924"><code>--properties-input</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13587. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-703"><code>--properties-input</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13588. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-981"><code>--properties-input</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13589. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-658"><code>--properties-input</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13590. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-248"><code>--properties-input</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13591. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-297"><code>--properties-input</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13592. <li><a href="#index-g_t_002d_002dproperties_002dinput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-740"><code>--properties-input</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13593. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-865"><code>--properties-output</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13594. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-576"><code>--properties-output</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13595. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-796"><code>--properties-output</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13596. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-611"><code>--properties-output</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13597. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-898"><code>--properties-output</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13598. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-714"><code>--properties-output</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13599. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-668"><code>--properties-output</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13600. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-256"><code>--properties-output</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13601. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-309"><code>--properties-output</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13602. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1042"><code>--properties-output</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13603. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-755"><code>--properties-output</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13604. <li><a href="#index-g_t_002d_002dproperties_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-213"><code>--properties-output</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13605. <li><a href="#index-g_t_002d_002dqt_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-962"><code>--qt</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13606. <li><a href="#index-g_t_002d_002dqt_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-196"><code>--qt</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13607. <li><a href="#index-g_t_002d_002dquiet_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-698"><code>--quiet</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13608. <li><a href="#index-g_t_002d_002dquiet_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-326"><code>--quiet</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13609. <li><a href="#index-g_t_002d_002dregexp_003d_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-650"><code>--regexp=</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13610. <li><a href="#index-g_t_002d_002drepeated_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-736"><code>--repeated</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13611. <li><a href="#index-g_t_002d_002dresource_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-968"><code>--resource</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13612. <li><a href="#index-g_t_002d_002dresource_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1022"><code>--resource</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13613. <li><a href="#index-g_t_002d_002dset_002dfuzzy_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-843"><code>--set-fuzzy</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13614. <li><a href="#index-g_t_002d_002dset_002dobsolete_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-845"><code>--set-obsolete</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13615. <li><a href="#index-g_t_002d_002dsilent_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-699"><code>--silent</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13616. <li><a href="#index-g_t_002d_002dsilent_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-327"><code>--silent</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13617. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-873"><code>--sort-by-file</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13618. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-585"><code>--sort-by-file</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13619. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-804"><code>--sort-by-file</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13620. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-619"><code>--sort-by-file</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13621. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-906"><code>--sort-by-file</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13622. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-722"><code>--sort-by-file</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13623. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-674"><code>--sort-by-file</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13624. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-318"><code>--sort-by-file</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13625. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-763"><code>--sort-by-file</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13626. <li><a href="#index-g_t_002d_002dsort_002dby_002dfile_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-222"><code>--sort-by-file</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13627. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-871"><code>--sort-output</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13628. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-582"><code>--sort-output</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13629. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-802"><code>--sort-output</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13630. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-617"><code>--sort-output</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13631. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-904"><code>--sort-output</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13632. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-720"><code>--sort-output</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13633. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-673"><code>--sort-output</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13634. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-315"><code>--sort-output</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13635. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1048"><code>--sort-output</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13636. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-761"><code>--sort-output</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13637. <li><a href="#index-g_t_002d_002dsort_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-219"><code>--sort-output</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13638. <li><a href="#index-g_t_002d_002dstatistics_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1006"><code>--statistics</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13639. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-863"><code>--strict</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13640. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-574"><code>--strict</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13641. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-794"><code>--strict</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13642. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-609"><code>--strict</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13643. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-896"><code>--strict</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13644. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-712"><code>--strict</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13645. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-966"><code>--strict</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13646. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-666"><code>--strict</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13647. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-307"><code>--strict</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13648. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1040"><code>--strict</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13649. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-753"><code>--strict</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13650. <li><a href="#index-g_t_002d_002dstrict_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-212"><code>--strict</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13651. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-854"><code>--stringtable-input</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13652. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-561"><code>--stringtable-input</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13653. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-823"><code>--stringtable-input</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13654. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-785"><code>--stringtable-input</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13655. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-887"><code>--stringtable-input</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13656. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-925"><code>--stringtable-input</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13657. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-704"><code>--stringtable-input</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13658. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-982"><code>--stringtable-input</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13659. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-659"><code>--stringtable-input</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13660. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-249"><code>--stringtable-input</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13661. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-298"><code>--stringtable-input</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13662. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsgonv_007d-option_007d-601"><code>--stringtable-input</code><span class="roman">, </span><code>msgonv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13663. <li><a href="#index-g_t_002d_002dstringtable_002dinput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-741"><code>--stringtable-input</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13664. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-866"><code>--stringtable-output</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13665. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-577"><code>--stringtable-output</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13666. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-797"><code>--stringtable-output</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13667. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-612"><code>--stringtable-output</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13668. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-899"><code>--stringtable-output</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13669. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-715"><code>--stringtable-output</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13670. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-669"><code>--stringtable-output</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13671. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-257"><code>--stringtable-output</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13672. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-310"><code>--stringtable-output</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13673. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1043"><code>--stringtable-output</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13674. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-756"><code>--stringtable-output</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13675. <li><a href="#index-g_t_002d_002dstringtable_002doutput_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-214"><code>--stringtable-output</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13676. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-856"><code>--style</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13677. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-932"><code>--style</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#The-_002d_002dstyle-option">The --style option</a></li>
  13678. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-567"><code>--style</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13679. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-787"><code>--style</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13680. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-603"><code>--style</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13681. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-890"><code>--style</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13682. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-706"><code>--style</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13683. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-661"><code>--style</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13684. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-254"><code>--style</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13685. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-301"><code>--style</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13686. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1036"><code>--style</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13687. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-746"><code>--style</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13688. <li><a href="#index-g_t_002d_002dstyle_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-205"><code>--style</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13689. <li><a href="#index-g_t_002d_002dsuffix_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-289"><code>--suffix</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13690. <li><a href="#index-g_t_002d_002dsymlink_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1124"><code>--symlink</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13691. <li><a href="#index-g_t_002d_002dtcl_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-960"><code>--tcl</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13692. <li><a href="#index-g_t_002d_002dtcl_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1019"><code>--tcl</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13693. <li><a href="#index-g_t_002d_002dto_002dcode_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-563"><code>--to-code</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13694. <li><a href="#index-g_t_002d_002dto_002dcode_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-598"><code>--to-code</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13695. <li><a href="#index-g_t_002d_002dto_002dcode_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-743"><code>--to-code</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13696. <li><a href="#index-g_t_002d_002dtranslated_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-836"><code>--translated</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13697. <li><a href="#index-g_t_002d_002dtrigraphs_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-194"><code>--trigraphs</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13698. <li><a href="#index-g_t_002d_002dunique_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-558"><code>--unique</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13699. <li><a href="#index-g_t_002d_002dunique_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-782"><code>--unique</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13700. <li><a href="#index-g_t_002d_002dunique_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-738"><code>--unique</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13701. <li><a href="#index-g_t_002d_002duntranslated_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-837"><code>--untranslated</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13702. <li><a href="#index-g_t_002d_002dupdate_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-283"><code>--update</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13703. <li><a href="#index-g_t_002d_002duse_002dfirst_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-564"><code>--use-first</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13704. <li><a href="#index-g_t_002d_002duse_002dfirst_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-744"><code>--use-first</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13705. <li><a href="#index-g_t_002d_002duse_002dfuzzy_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-819"><code>--use-fuzzy</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13706. <li><a href="#index-g_t_002d_002duse_002dfuzzy_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-997"><code>--use-fuzzy</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13707. <li><a href="#index-g_t_002d_002duse_002duntranslated_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-820"><code>--use-untranslated</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13708. <li><a href="#index-g_t_002d_002dvariables_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1210"><code>--variables</code><span class="roman">, </span><code>envsubst</code><span class="roman"> option</span></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13709. <li><a href="#index-g_t_002d_002dverbose_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1008"><code>--verbose</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13710. <li><a href="#index-g_t_002d_002dverbose_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-324"><code>--verbose</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13711. <li><a href="#index-g_t_002d_002dverbose_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1055"><code>--verbose</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13712. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1162"><code>--version</code><span class="roman">, </span><code>autopoint</code><span class="roman"> option</span></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13713. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1214"><code>--version</code><span class="roman">, </span><code>envsubst</code><span class="roman"> option</span></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13714. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1192"><code>--version</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13715. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1128"><code>--version</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13716. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-877"><code>--version</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13717. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-589"><code>--version</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13718. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-827"><code>--version</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13719. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-809"><code>--version</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13720. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-623"><code>--version</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13721. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-910"><code>--version</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13722. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-929"><code>--version</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13723. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-726"><code>--version</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13724. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1005"><code>--version</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13725. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-678"><code>--version</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13726. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-264"><code>--version</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13727. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-322"><code>--version</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13728. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1053"><code>--version</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13729. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-767"><code>--version</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13730. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1203"><code>--version</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13731. <li><a href="#index-g_t_002d_002dversion_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-237"><code>--version</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13732. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-868"><code>--width</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13733. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-579"><code>--width</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13734. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-799"><code>--width</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13735. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-614"><code>--width</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13736. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-901"><code>--width</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13737. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-717"><code>--width</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13738. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-671"><code>--width</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13739. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-259"><code>--width</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13740. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-312"><code>--width</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13741. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1045"><code>--width</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13742. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-758"><code>--width</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13743. <li><a href="#index-g_t_002d_002dwidth_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-216"><code>--width</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13744. <li><a href="#index-g_t_002d_003c_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-553"><code>-&lt;</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13745. <li><a href="#index-g_t_002d_003c_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-777"><code>-&lt;</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13746. <li><a href="#index-g_t_002d_003e_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-555"><code>-&gt;</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13747. <li><a href="#index-g_t_002d_003e_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-779"><code>-&gt;</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13748. <li><a href="#index-g_t_002da_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-999"><code>-a</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13749. <li><a href="#index-g_t_002da_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-184"><code>-a</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13750. <li><a href="#index-g_t_002dC_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-989"><code>-C</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13751. <li><a href="#index-g_t_002dc_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-983"><code>-c</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13752. <li><a href="#index-g_t_002dC_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-641"><code>-C</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13753. <li><a href="#index-g_t_002dC_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-280"><code>-C</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13754. <li><a href="#index-g_t_002dc_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-182"><code>-c</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13755. <li><a href="#index-g_t_002dC_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-175"><code>-C</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13756. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1159"><code>-d</code><span class="roman">, </span><code>autopoint</code><span class="roman"> option</span></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13757. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1184"><code>-d</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13758. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1125"><code>-d</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13759. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-832"><code>-D</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13760. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-548"><code>-D</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13761. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-813"><code>-D</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13762. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-773"><code>-D</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13763. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-593"><code>-D</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13764. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-881"><code>-D</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13765. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-921"><code>-D</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13766. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-687"><code>-D</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13767. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-971"><code>-d</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13768. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-950"><code>-D</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13769. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-627"><code>-D</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13770. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-278"><code>-D</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13771. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1029"><code>-d</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13772. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-735"><code>-d</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13773. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-731"><code>-D</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13774. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1196"><code>-d</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13775. <li><a href="#index-g_t_002dd_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-165"><code>-d</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13776. <li><a href="#index-g_t_002dD_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-163"><code>-D</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13777. <li><a href="#index-g_t_002dE_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1187"><code>-E</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13778. <li><a href="#index-g_t_002de_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1186"><code>-e</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13779. <li><a href="#index-g_t_002de_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-693"><code>-e</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13780. <li><a href="#index-g_t_002de_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-649"><code>-e</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13781. <li><a href="#index-g_t_002dE_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-645"><code>-E</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13782. <li><a href="#index-g_t_002dE_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1199"><code>-E</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13783. <li><a href="#index-g_t_002de_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1198"><code>-e</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13784. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bautopoint_007d-option_007d-1157"><code>-f</code><span class="roman">, </span><code>autopoint</code><span class="roman"> option</span></a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  13785. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bgettextize_007d-option_007d-1119"><code>-f</code><span class="roman">, </span><code>gettextize</code><span class="roman"> option</span></a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  13786. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-872"><code>-F</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13787. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-584"><code>-F</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13788. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-546"><code>-f</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13789. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-803"><code>-F</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13790. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-771"><code>-f</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13791. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-618"><code>-F</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13792. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-905"><code>-F</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13793. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-721"><code>-F</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13794. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-695"><code>-f</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13795. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-996"><code>-f</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13796. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-651"><code>-f</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13797. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-647"><code>-F</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13798. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-317"><code>-F</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13799. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-762"><code>-F</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13800. <li><a href="#index-g_t_002dF_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-221"><code>-F</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13801. <li><a href="#index-g_t_002df_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-161"><code>-f</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13802. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1211"><code>-h</code><span class="roman">, </span><code>envsubst</code><span class="roman"> option</span></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13803. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1188"><code>-h</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13804. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-874"><code>-h</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13805. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-586"><code>-h</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13806. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-824"><code>-h</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13807. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-806"><code>-h</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13808. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-620"><code>-h</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13809. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-907"><code>-h</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13810. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-926"><code>-h</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13811. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-723"><code>-h</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13812. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1002"><code>-h</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13813. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-675"><code>-h</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13814. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-261"><code>-h</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13815. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-319"><code>-h</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13816. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1050"><code>-h</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13817. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-764"><code>-h</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13818. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1200"><code>-h</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13819. <li><a href="#index-g_t_002dh_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-234"><code>-h</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13820. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-858"><code>-i</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13821. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-569"><code>-i</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13822. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-789"><code>-i</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13823. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-605"><code>-i</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13824. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-892"><code>-i</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13825. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-919"><code>-i</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13826. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-685"><code>-i</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13827. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-653"><code>-i</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13828. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-243"><code>-i</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13829. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-303"><code>-i</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13830. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1038"><code>-i</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13831. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-748"><code>-i</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13832. <li><a href="#index-g_t_002di_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-207"><code>-i</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13833. <li><a href="#index-g_t_002dj_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-952"><code>-j</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13834. <li><a href="#index-g_t_002dJ_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-635"><code>-J</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13835. <li><a href="#index-g_t_002dj_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1012"><code>-j</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13836. <li><a href="#index-g_t_002dj_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-178"><code>-j</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13837. <li><a href="#index-g_t_002dK_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-637"><code>-K</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13838. <li><a href="#index-g_t_002dk_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-186"><code>-k</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13839. <li><a href="#index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-969"><code>-l</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13840. <li><a href="#index-g_t_002dl_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-250"><code>-l</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13841. <li><a href="#index-g_t_002dl_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1023"><code>-l</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13842. <li><a href="#index-g_t_002dL_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-172"><code>-L</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13843. <li><a href="#index-g_t_002dm_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-815"><code>-m</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13844. <li><a href="#index-g_t_002dM_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-633"><code>-M</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13845. <li><a href="#index-g_t_002dm_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-291"><code>-m</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13846. <li><a href="#index-g_t_002dM_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-232"><code>-M</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13847. <li><a href="#index-g_t_002dm_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-230"><code>-m</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13848. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1190"><code>-n</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13849. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-861"><code>-n</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13850. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-572"><code>-n</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13851. <li><a href="#index-g_t_002dN_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-817"><code>-N</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13852. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-792"><code>-n</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13853. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-697"><code>-n</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13854. <li><a href="#index-g_t_002dN_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-631"><code>-N</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13855. <li><a href="#index-g_t_002dN_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-293"><code>-N</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13856. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-751"><code>-n</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13857. <li><a href="#index-g_t_002dn_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-210"><code>-n</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13858. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-834"><code>-o</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13859. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-550"><code>-o</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13860. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-775"><code>-o</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13861. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-595"><code>-o</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13862. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-883"><code>-o</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13863. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-689"><code>-o</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13864. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-964"><code>-o</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13865. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-629"><code>-o</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13866. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-245"><code>-o</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13867. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-284"><code>-o</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13868. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1033"><code>-o</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13869. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-733"><code>-o</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13870. <li><a href="#index-g_t_002do_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-167"><code>-o</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13871. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-864"><code>-p</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13872. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-852"><code>-P</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13873. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-575"><code>-p</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13874. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-559"><code>-P</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13875. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-821"><code>-P</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13876. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-795"><code>-p</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13877. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-783"><code>-P</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13878. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-610"><code>-p</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13879. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-599"><code>-P</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13880. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-897"><code>-p</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13881. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-885"><code>-P</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13882. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-923"><code>-P</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13883. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-713"><code>-p</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13884. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-702"><code>-P</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13885. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-980"><code>-P</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13886. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-667"><code>-p</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13887. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-657"><code>-P</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13888. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-255"><code>-p</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13889. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-247"><code>-P</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13890. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-308"><code>-p</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13891. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-296"><code>-P</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13892. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1041"><code>-p</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13893. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-754"><code>-p</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13894. <li><a href="#index-g_t_002dP_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-739"><code>-P</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13895. <li><a href="#index-g_t_002dp_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-169"><code>-p</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13896. <li><a href="#index-g_t_002dq_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-325"><code>-q</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13897. <li><a href="#index-g_t_002dr_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-967"><code>-r</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13898. <li><a href="#index-g_t_002dr_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1021"><code>-r</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13899. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-870"><code>-s</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13900. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-581"><code>-s</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13901. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-801"><code>-s</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13902. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-616"><code>-s</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13903. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-903"><code>-s</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13904. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-719"><code>-s</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13905. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-314"><code>-s</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13906. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1047"><code>-s</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13907. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-760"><code>-s</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13908. <li><a href="#index-g_t_002ds_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-218"><code>-s</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13909. <li><a href="#index-g_t_002dt_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-562"><code>-t</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13910. <li><a href="#index-g_t_002dt_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-597"><code>-t</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13911. <li><a href="#index-g_t_002dT_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-639"><code>-T</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13912. <li><a href="#index-g_t_002dt_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-742"><code>-t</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13913. <li><a href="#index-g_t_002dT_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-193"><code>-T</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13914. <li><a href="#index-g_t_002du_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-557"><code>-u</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13915. <li><a href="#index-g_t_002du_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-781"><code>-u</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13916. <li><a href="#index-g_t_002dU_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-282"><code>-U</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13917. <li><a href="#index-g_t_002du_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-737"><code>-u</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13918. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1213"><code>-V</code><span class="roman">, </span><code>envsubst</code><span class="roman"> option</span></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13919. <li><a href="#index-g_t_002dv_0040r_007b_002c-_0040code_007benvsubst_007d-option_007d-1209"><code>-v</code><span class="roman">, </span><code>envsubst</code><span class="roman"> option</span></a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  13920. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bgettext_007d-option_007d-1191"><code>-V</code><span class="roman">, </span><code>gettext</code><span class="roman"> option</span></a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  13921. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-876"><code>-V</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13922. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-588"><code>-V</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13923. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgcmp_007d-option_007d-826"><code>-V</code><span class="roman">, </span><code>msgcmp</code><span class="roman"> option</span></a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  13924. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-808"><code>-V</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13925. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-622"><code>-V</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13926. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-909"><code>-V</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13927. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgexec_007d-option_007d-928"><code>-V</code><span class="roman">, </span><code>msgexec</code><span class="roman"> option</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13928. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-725"><code>-V</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13929. <li><a href="#index-g_t_002dv_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1007"><code>-v</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13930. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgfmt_007d-option_007d-1004"><code>-V</code><span class="roman">, </span><code>msgfmt</code><span class="roman"> option</span></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  13931. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-677"><code>-V</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13932. <li><a href="#index-g_t_002dv_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-655"><code>-v</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13933. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-263"><code>-V</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13934. <li><a href="#index-g_t_002dv_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-323"><code>-v</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13935. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-321"><code>-V</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13936. <li><a href="#index-g_t_002dv_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1054"><code>-v</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13937. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1052"><code>-V</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13938. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-766"><code>-V</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13939. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bngettext_007d-option_007d-1202"><code>-V</code><span class="roman">, </span><code>ngettext</code><span class="roman"> option</span></a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  13940. <li><a href="#index-g_t_002dV_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-236"><code>-V</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13941. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgattrib_007d-option_007d-867"><code>-w</code><span class="roman">, </span><code>msgattrib</code><span class="roman"> option</span></a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  13942. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgcat_007d-option_007d-578"><code>-w</code><span class="roman">, </span><code>msgcat</code><span class="roman"> option</span></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  13943. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgcomm_007d-option_007d-798"><code>-w</code><span class="roman">, </span><code>msgcomm</code><span class="roman"> option</span></a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  13944. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgconv_007d-option_007d-613"><code>-w</code><span class="roman">, </span><code>msgconv</code><span class="roman"> option</span></a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  13945. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgen_007d-option_007d-900"><code>-w</code><span class="roman">, </span><code>msgen</code><span class="roman"> option</span></a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  13946. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgfilter_007d-option_007d-716"><code>-w</code><span class="roman">, </span><code>msgfilter</code><span class="roman"> option</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13947. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-670"><code>-w</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13948. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsginit_007d-option_007d-258"><code>-w</code><span class="roman">, </span><code>msginit</code><span class="roman"> option</span></a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  13949. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgmerge_007d-option_007d-311"><code>-w</code><span class="roman">, </span><code>msgmerge</code><span class="roman"> option</span></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  13950. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsgunfmt_007d-option_007d-1044"><code>-w</code><span class="roman">, </span><code>msgunfmt</code><span class="roman"> option</span></a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  13951. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bmsguniq_007d-option_007d-757"><code>-w</code><span class="roman">, </span><code>msguniq</code><span class="roman"> option</span></a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  13952. <li><a href="#index-g_t_002dw_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-215"><code>-w</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13953. <li><a href="#index-g_t_002dX_0040r_007b_002c-_0040code_007bmsggrep_007d-option_007d-643"><code>-X</code><span class="roman">, </span><code>msggrep</code><span class="roman"> option</span></a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  13954. <li><a href="#index-g_t_002dx_0040r_007b_002c-_0040code_007bxgettext_007d-option_007d-180"><code>-x</code><span class="roman">, </span><code>xgettext</code><span class="roman"> option</span></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  13955. </ul><div class="node">
  13956. <a name="Variable-Index"></a>
  13957. <p><hr>
  13958. Next:&nbsp;<a rel="next" accesskey="n" href="#PO-Mode-Index">PO Mode Index</a>,
  13959. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Option-Index">Option Index</a>,
  13960. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  13961. </div>
  13962. <h2 class="unnumbered">Variable Index</h2>
  13963. <ul class="index-vr" compact>
  13964. <li><a href="#index-GETTEXT_005fLOG_005fUNTRANSLATED_0040r_007b_002c-environment-variable_007d-1112"><code>GETTEXT_LOG_UNTRANSLATED</code><span class="roman">, environment variable</span></a>: <a href="#Prioritizing-messages">Prioritizing messages</a></li>
  13965. <li><a href="#index-LANG_0040r_007b_002c-environment-variable_007d-1109"><code>LANG</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13966. <li><a href="#index-LANG_0040r_007b_002c-environment-variable_007d-51"><code>LANG</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13967. <li><a href="#index-LANGUAGE_0040r_007b_002c-environment-variable_007d-1135"><code>LANGUAGE</code><span class="roman">, environment variable</span></a>: <a href="#po_002fRules_002d_002a">po/Rules-*</a></li>
  13968. <li><a href="#index-LANGUAGE_0040r_007b_002c-environment-variable_007d-1101"><code>LANGUAGE</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13969. <li><a href="#index-LANGUAGE_0040r_007b_002c-environment-variable_007d-43"><code>LANGUAGE</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13970. <li><a href="#index-LC_005fALL_0040r_007b_002c-environment-variable_007d-1102"><code>LC_ALL</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13971. <li><a href="#index-LC_005fALL_0040r_007b_002c-environment-variable_007d-44"><code>LC_ALL</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13972. <li><a href="#index-LC_005fCOLLATE_0040r_007b_002c-environment-variable_007d-1106"><code>LC_COLLATE</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13973. <li><a href="#index-LC_005fCOLLATE_0040r_007b_002c-environment-variable_007d-48"><code>LC_COLLATE</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13974. <li><a href="#index-LC_005fCTYPE_0040r_007b_002c-environment-variable_007d-1103"><code>LC_CTYPE</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13975. <li><a href="#index-LC_005fCTYPE_0040r_007b_002c-environment-variable_007d-45"><code>LC_CTYPE</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13976. <li><a href="#index-LC_005fMESSAGES_0040r_007b_002c-environment-variable_007d-1108"><code>LC_MESSAGES</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13977. <li><a href="#index-LC_005fMESSAGES_0040r_007b_002c-environment-variable_007d-50"><code>LC_MESSAGES</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13978. <li><a href="#index-LC_005fMONETARY_0040r_007b_002c-environment-variable_007d-1107"><code>LC_MONETARY</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13979. <li><a href="#index-LC_005fMONETARY_0040r_007b_002c-environment-variable_007d-49"><code>LC_MONETARY</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13980. <li><a href="#index-LC_005fNUMERIC_0040r_007b_002c-environment-variable_007d-1104"><code>LC_NUMERIC</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13981. <li><a href="#index-LC_005fNUMERIC_0040r_007b_002c-environment-variable_007d-46"><code>LC_NUMERIC</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13982. <li><a href="#index-LC_005fTIME_0040r_007b_002c-environment-variable_007d-1105"><code>LC_TIME</code><span class="roman">, environment variable</span></a>: <a href="#gettext-grok">gettext grok</a></li>
  13983. <li><a href="#index-LC_005fTIME_0040r_007b_002c-environment-variable_007d-47"><code>LC_TIME</code><span class="roman">, environment variable</span></a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  13984. <li><a href="#index-LINGUAS_0040r_007b_002c-environment-variable_007d-1169"><code>LINGUAS</code><span class="roman">, environment variable</span></a>: <a href="#Installers">Installers</a></li>
  13985. <li><a href="#index-MSGEXEC_005fLOCATION_0040r_007b_002c-environment-variable_007d-917"><code>MSGEXEC_LOCATION</code><span class="roman">, environment variable</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13986. <li><a href="#index-MSGEXEC_005fMSGCTXT_0040r_007b_002c-environment-variable_007d-915"><code>MSGEXEC_MSGCTXT</code><span class="roman">, environment variable</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13987. <li><a href="#index-MSGEXEC_005fMSGID_0040r_007b_002c-environment-variable_007d-916"><code>MSGEXEC_MSGID</code><span class="roman">, environment variable</span></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  13988. <li><a href="#index-MSGFILTER_005fLOCATION_0040r_007b_002c-environment-variable_007d-684"><code>MSGFILTER_LOCATION</code><span class="roman">, environment variable</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13989. <li><a href="#index-MSGFILTER_005fMSGCTXT_0040r_007b_002c-environment-variable_007d-682"><code>MSGFILTER_MSGCTXT</code><span class="roman">, environment variable</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13990. <li><a href="#index-MSGFILTER_005fMSGID_0040r_007b_002c-environment-variable_007d-683"><code>MSGFILTER_MSGID</code><span class="roman">, environment variable</span></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  13991. <li><a href="#index-PO_005fSTYLE_0040r_007b_002c-environment-variable_007d-933"><code>PO_STYLE</code><span class="roman">, environment variable</span></a>: <a href="#The-_002d_002dstyle-option">The --style option</a></li>
  13992. <li><a href="#index-TERM_0040r_007b_002c-environment-variable_007d-931"><code>TERM</code><span class="roman">, environment variable</span></a>: <a href="#The-TERM-variable">The TERM variable</a></li>
  13993. <li><a href="#index-TEXTDOMAIN_0040r_007b_002c-environment-variable_007d-1178"><code>TEXTDOMAIN</code><span class="roman">, environment variable</span></a>: <a href="#sh">sh</a></li>
  13994. <li><a href="#index-TEXTDOMAINDIR_0040r_007b_002c-environment-variable_007d-1179"><code>TEXTDOMAINDIR</code><span class="roman">, environment variable</span></a>: <a href="#sh">sh</a></li>
  13995. </ul><div class="node">
  13996. <a name="PO-Mode-Index"></a>
  13997. <p><hr>
  13998. Next:&nbsp;<a rel="next" accesskey="n" href="#Autoconf-Macro-Index">Autoconf Macro Index</a>,
  13999. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Variable-Index">Variable Index</a>,
  14000. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  14001. </div>
  14002. <h2 class="unnumbered">PO Mode Index</h2>
  14003. <ul class="index-em" compact>
  14004. <li><a href="#index-g_t_0023_0040r_007b_002c-PO-Mode-command_007d-467"><code>#</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14005. <li><a href="#index-g_t_002c_0040r_007b_002c-PO-Mode-command_007d-148"><code>,</code><span class="roman">, PO Mode command</span></a>: <a href="#Marking">Marking</a></li>
  14006. <li><a href="#index-g_t_002e_0040r_007b_002c-PO-Mode-command_007d-364"><code>.</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14007. <li><a href="#index-g_t_0040file_007b_002eemacs_007d-customizations-334"><samp><span class="file">.emacs</span></samp> customizations</a>: <a href="#Installation">Installation</a></li>
  14008. <li><a href="#index-g_t0_0040r_007b_002c-PO-Mode-command_007d-341"><code>0</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14009. <li><a href="#index-g_t_003c_0040r_007b_002c-PO-Mode-command_007d-367"><code>&lt;</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14010. <li><a href="#index-g_t_003d_0040r_007b_002c-PO-Mode-command_007d-344"><code>=</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14011. <li><a href="#index-g_t_003e_0040r_007b_002c-PO-Mode-command_007d-368"><code>&gt;</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14012. <li><a href="#index-g_t_003f_0040r_007b_002c-PO-Mode-command_007d-342"><code>?</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14013. <li><a href="#index-g_t_005f_0040r_007b_002c-PO-Mode-command_007d-338"><code>_</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14014. <li><a href="#index-a_0040r_007b_002c-PO-Mode-command_007d-520"><code>a</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14015. <li><a href="#index-A_0040r_007b_002c-PO-Mode-command_007d-514"><code>A</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14016. <li><a href="#index-a_0040r_007b_002c-PO-Mode-command_007d-512"><code>a</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14017. <li><a href="#index-auxiliary-PO-file-511">auxiliary PO file</a>: <a href="#Auxiliary">Auxiliary</a></li>
  14018. <li><a href="#index-C_002dc-C_002da_0040r_007b_002c-PO-Mode-command_007d-513"><code>C-c C-a</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14019. <li><a href="#index-C_002dc-C_002da_0040r_007b_002c-PO-Mode-command_007d-483"><code>C-c C-a</code><span class="roman">, PO Mode command</span></a>: <a href="#Subedit">Subedit</a></li>
  14020. <li><a href="#index-C_002dc-C_002dc_0040r_007b_002c-PO-Mode-command_007d-481"><code>C-c C-c</code><span class="roman">, PO Mode command</span></a>: <a href="#Subedit">Subedit</a></li>
  14021. <li><a href="#index-C_002dc-C_002dk_0040r_007b_002c-PO-Mode-command_007d-482"><code>C-c C-k</code><span class="roman">, PO Mode command</span></a>: <a href="#Subedit">Subedit</a></li>
  14022. <li><a href="#index-C_002dj_0040r_007b_002c-PO-Mode-command_007d-446"><code>C-j</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14023. <li><a href="#index-commands-337">commands</a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14024. <li><a href="#index-comment-out-PO-file-entry-441">comment out PO file entry</a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14025. <li><a href="#index-consulting-program-sources-493">consulting program sources</a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14026. <li><a href="#index-consulting-translations-to-other-languages-509">consulting translations to other languages</a>: <a href="#Auxiliary">Auxiliary</a></li>
  14027. <li><a href="#index-current-entry-of-a-PO-file-362">current entry of a PO file</a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14028. <li><a href="#index-cut-and-paste-for-translated-strings-457">cut and paste for translated strings</a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14029. <li><a href="#index-DEL_0040r_007b_002c-PO-Mode-command_007d-433"><code>DEL</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14030. <li><a href="#index-DEL_0040r_007b_002c-PO-Mode-command_007d-416"><code>DEL</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14031. <li><a href="#index-editing-comments-466">editing comments</a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14032. <li><a href="#index-editing-multiple-entries-491">editing multiple entries</a>: <a href="#Subedit">Subedit</a></li>
  14033. <li><a href="#index-editing-translations-443">editing translations</a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14034. <li><a href="#index-g_t_0040code_007betags_007d_002c-using-for-marking-strings-146"><code>etags</code>, using for marking strings</a>: <a href="#Marking">Marking</a></li>
  14035. <li><a href="#index-exiting-PO-subedit-484">exiting PO subedit</a>: <a href="#Subedit">Subedit</a></li>
  14036. <li><a href="#index-F_0040r_007b_002c-PO-Mode-command_007d-411"><code>F</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14037. <li><a href="#index-f_0040r_007b_002c-PO-Mode-command_007d-409"><code>f</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14038. <li><a href="#index-F_0040r_007b_002c-PO-Mode-command_007d-407"><code>F</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14039. <li><a href="#index-f_0040r_007b_002c-PO-Mode-command_007d-406"><code>f</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14040. <li><a href="#index-find-source-fragment-for-a-PO-file-entry-496">find source fragment for a PO file entry</a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14041. <li><a href="#index-h_0040r_007b_002c-PO-Mode-command_007d-343"><code>h</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14042. <li><a href="#index-installing-PO-mode-335">installing PO mode</a>: <a href="#Installation">Installation</a></li>
  14043. <li><a href="#index-K_0040r_007b_002c-PO-Mode-command_007d-468"><code>K</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14044. <li><a href="#index-k_0040r_007b_002c-PO-Mode-command_007d-447"><code>k</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14045. <li><a href="#index-k_0040r_007b_002c-PO-Mode-command_007d-422"><code>k</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14046. <li><a href="#index-LFD_0040r_007b_002c-PO-Mode-command_007d-445"><code>LFD</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14047. <li><a href="#index-looking-at-the-source-to-aid-translation-494">looking at the source to aid translation</a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14048. <li><a href="#index-m_0040r_007b_002c-PO-Mode-command_007d-369"><code>m</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14049. <li><a href="#index-M_002d_002c_0040r_007b_002c-PO-Mode-command_007d-149"><code>M-,</code><span class="roman">, PO Mode command</span></a>: <a href="#Marking">Marking</a></li>
  14050. <li><a href="#index-M_002d_002e_0040r_007b_002c-PO-Mode-command_007d-150"><code>M-.</code><span class="roman">, PO Mode command</span></a>: <a href="#Marking">Marking</a></li>
  14051. <li><a href="#index-M_002dA_0040r_007b_002c-PO-Mode-command_007d-515"><code>M-A</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14052. <li><a href="#index-M_002dS_0040r_007b_002c-PO-Mode-command_007d-507"><code>M-S</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14053. <li><a href="#index-M_002ds_0040r_007b_002c-PO-Mode-command_007d-503"><code>M-s</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14054. <li><a href="#index-M_002dS_0040r_007b_002c-PO-Mode-command_007d-500"><code>M-S</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14055. <li><a href="#index-M_002ds_0040r_007b_002c-PO-Mode-command_007d-498"><code>M-s</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14056. <li><a href="#index-marking-strings-for-translation-145">marking strings for translation</a>: <a href="#Marking">Marking</a></li>
  14057. <li><a href="#index-moving-by-fuzzy-entries-405">moving by fuzzy entries</a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14058. <li><a href="#index-moving-by-obsolete-entries-430">moving by obsolete entries</a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14059. <li><a href="#index-moving-by-translated-entries-394">moving by translated entries</a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14060. <li><a href="#index-moving-by-untranslated-entries-419">moving by untranslated entries</a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14061. <li><a href="#index-moving-through-a-PO-file-363">moving through a PO file</a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14062. <li><a href="#index-n_0040r_007b_002c-PO-Mode-command_007d-365"><code>n</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14063. <li><a href="#index-next_002derror_0040r_007b_002c-stepping-through-PO-file-validation-results_007d-361"><code>next-error</code><span class="roman">, stepping through PO file validation results</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14064. <li><a href="#index-normalize_0040r_007b_002c-PO-Mode-command_007d-524"><code>normalize</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14065. <li><a href="#index-O_0040r_007b_002c-PO-Mode-command_007d-436"><code>O</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14066. <li><a href="#index-o_0040r_007b_002c-PO-Mode-command_007d-434"><code>o</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14067. <li><a href="#index-O_0040r_007b_002c-PO-Mode-command_007d-432"><code>O</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14068. <li><a href="#index-o_0040r_007b_002c-PO-Mode-command_007d-431"><code>o</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14069. <li><a href="#index-obsolete-active-entry-440">obsolete active entry</a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14070. <li><a href="#index-p_0040r_007b_002c-PO-Mode-command_007d-366"><code>p</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14071. <li><a href="#index-pending-subedits-492">pending subedits</a>: <a href="#Subedit">Subedit</a></li>
  14072. <li><a href="#index-po_002dauto_002dedit_002dwith_002dmsgid_0040r_007b_002c-PO-Mode-variable_007d-455"><code>po-auto-edit-with-msgid</code><span class="roman">, PO Mode variable</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14073. <li><a href="#index-po_002dauto_002dfuzzy_002don_002dedit_0040r_007b_002c-PO-Mode-variable_007d-401"><code>po-auto-fuzzy-on-edit</code><span class="roman">, PO Mode variable</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14074. <li><a href="#index-po_002dauto_002dselect_002don_002dunfuzzy_0040r_007b_002c-PO-Mode-variable_007d-415"><code>po-auto-select-on-unfuzzy</code><span class="roman">, PO Mode variable</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14075. <li><a href="#index-po_002dconfirm_002dand_002dquit_0040r_007b_002c-PO-Mode-command_007d-351"><code>po-confirm-and-quit</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14076. <li><a href="#index-po_002dconsider_002das_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-517"><code>po-consider-as-auxiliary</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14077. <li><a href="#index-po_002dconsider_002dsource_002dpath_0040r_007b_002c-PO-Mode-command_007d-506"><code>po-consider-source-path</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14078. <li><a href="#index-po_002dcurrent_002dentry_0040r_007b_002c-PO-Mode-command_007d-373"><code>po-current-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14079. <li><a href="#index-po_002dcycle_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-521"><code>po-cycle-auxiliary</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14080. <li><a href="#index-po_002dcycle_002dsource_002dreference_0040r_007b_002c-PO-Mode-command_007d-502"><code>po-cycle-source-reference</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14081. <li><a href="#index-po_002dedit_002dcomment_0040r_007b_002c-PO-Mode-command_007d-472"><code>po-edit-comment</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14082. <li><a href="#index-po_002dedit_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-451"><code>po-edit-msgstr</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14083. <li><a href="#index-po_002dexchange_002dlocation_0040r_007b_002c-PO-Mode-command_007d-387"><code>po-exchange-location</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14084. <li><a href="#index-po_002dfade_002dout_002dentry_0040r_007b_002c-PO-Mode-command_007d-439"><code>po-fade-out-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14085. <li><a href="#index-po_002dfade_002dout_002dentry_0040r_007b_002c-PO-Mode-command_007d-417"><code>po-fade-out-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14086. <li><a href="#index-po_002dfirst_002dentry_0040r_007b_002c-PO-Mode-command_007d-379"><code>po-first-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14087. <li><a href="#index-po_002dhelp_0040r_007b_002c-PO-Mode-command_007d-356"><code>po-help</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14088. <li><a href="#index-po_002dignore_002das_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-519"><code>po-ignore-as-auxiliary</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14089. <li><a href="#index-po_002dignore_002dsource_002dpath_0040r_007b_002c-PO-Mode-command_007d-508"><code>po-ignore-source-path</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14090. <li><a href="#index-po_002dkill_002dcomment_0040r_007b_002c-PO-Mode-command_007d-475"><code>po-kill-comment</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14091. <li><a href="#index-po_002dkill_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-459"><code>po-kill-msgstr</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14092. <li><a href="#index-po_002dkill_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-428"><code>po-kill-msgstr</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14093. <li><a href="#index-po_002dkill_002dring_002dsave_002dcomment_0040r_007b_002c-PO-Mode-command_007d-477"><code>po-kill-ring-save-comment</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14094. <li><a href="#index-po_002dkill_002dring_002dsave_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-461"><code>po-kill-ring-save-msgstr</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14095. <li><a href="#index-po_002dlast_002dentry_0040r_007b_002c-PO-Mode-command_007d-381"><code>po-last-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14096. <li><a href="#index-po_002dmark_002dtranslatable_0040r_007b_002c-PO-Mode-command_007d-152"><code>po-mark-translatable</code><span class="roman">, PO Mode command</span></a>: <a href="#Marking">Marking</a></li>
  14097. <li><a href="#index-po_002dmsgid_002dto_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-454"><code>po-msgid-to-msgstr</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14098. <li><a href="#index-po_002dnext_002dentry_0040r_007b_002c-PO-Mode-command_007d-375"><code>po-next-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14099. <li><a href="#index-po_002dnext_002dfuzzy_002dentry_0040r_007b_002c-PO-Mode-command_007d-410"><code>po-next-fuzzy-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14100. <li><a href="#index-po_002dnext_002dobsolete_002dentry_0040r_007b_002c-PO-Mode-command_007d-435"><code>po-next-obsolete-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14101. <li><a href="#index-po_002dnext_002dtranslated_002dentry_0040r_007b_002c-PO-Mode-command_007d-398"><code>po-next-translated-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14102. <li><a href="#index-po_002dnext_002duntranslated_002dentry_0040r_007b_002c-PO-Mode-command_007d-424"><code>po-next-untranslated-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14103. <li><a href="#index-po_002dnormalize_0040r_007b_002c-PO-Mode-command_007d-390"><code>po-normalize</code><span class="roman">, PO Mode command</span></a>: <a href="#Normalizing">Normalizing</a></li>
  14104. <li><a href="#index-po_002dother_002dwindow_0040r_007b_002c-PO-Mode-command_007d-353"><code>po-other-window</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14105. <li><a href="#index-po_002dpop_002dlocation_0040r_007b_002c-PO-Mode-command_007d-385"><code>po-pop-location</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14106. <li><a href="#index-po_002dprevious_002dentry_0040r_007b_002c-PO-Mode-command_007d-377"><code>po-previous-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14107. <li><a href="#index-po_002dprevious_002dfuzzy_002dentry_0040r_007b_002c-PO-Mode-command_007d-412"><code>po-previous-fuzzy-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14108. <li><a href="#index-po_002dprevious_002dobsolete_002dentry_0040r_007b_002c-PO-Mode-command_007d-437"><code>po-previous-obsolete-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14109. <li><a href="#index-po_002dprevious_002dtranslated_002dentry_0040r_007b_002c-PO-Mode-command_007d-400"><code>po-previous-translated-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14110. <li><a href="#index-po_002dprevious_002duntransted_002dentry_0040r_007b_002c-PO-Mode-command_007d-426"><code>po-previous-untransted-entry</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14111. <li><a href="#index-po_002dpush_002dlocation_0040r_007b_002c-PO-Mode-command_007d-383"><code>po-push-location</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14112. <li><a href="#index-po_002dquit_0040r_007b_002c-PO-Mode-command_007d-350"><code>po-quit</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14113. <li><a href="#index-po_002dselect_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-523"><code>po-select-auxiliary</code><span class="roman">, PO Mode command</span></a>: <a href="#Auxiliary">Auxiliary</a></li>
  14114. <li><a href="#index-po_002dselect_002dmark_002dand_002dmark_0040r_007b_002c-PO-Mode-command_007d-153"><code>po-select-mark-and-mark</code><span class="roman">, PO Mode command</span></a>: <a href="#Marking">Marking</a></li>
  14115. <li><a href="#index-po_002dselect_002dsource_002dreference_0040r_007b_002c-PO-Mode-command_007d-504"><code>po-select-source-reference</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14116. <li><a href="#index-po_002dstatistics_0040r_007b_002c-PO-Mode-command_007d-358"><code>po-statistics</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14117. <li><a href="#index-po_002dsubedit_002dabort_0040r_007b_002c-PO-Mode-command_007d-488"><code>po-subedit-abort</code><span class="roman">, PO Mode command</span></a>: <a href="#Subedit">Subedit</a></li>
  14118. <li><a href="#index-po_002dsubedit_002dcycle_002dauxiliary_0040r_007b_002c-PO-Mode-command_007d-490"><code>po-subedit-cycle-auxiliary</code><span class="roman">, PO Mode command</span></a>: <a href="#Subedit">Subedit</a></li>
  14119. <li><a href="#index-po_002dsubedit_002dexit_0040r_007b_002c-PO-Mode-command_007d-486"><code>po-subedit-exit</code><span class="roman">, PO Mode command</span></a>: <a href="#Subedit">Subedit</a></li>
  14120. <li><a href="#index-po_002dsubedit_002dmode_002dhook_0040r_007b_002c-PO-Mode-variable_007d-473"><code>po-subedit-mode-hook</code><span class="roman">, PO Mode variable</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14121. <li><a href="#index-po_002dtags_002dsearch_0040r_007b_002c-PO-Mode-command_007d-151"><code>po-tags-search</code><span class="roman">, PO Mode command</span></a>: <a href="#Marking">Marking</a></li>
  14122. <li><a href="#index-po_002dundo_0040r_007b_002c-PO-Mode-command_007d-347"><code>po-undo</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14123. <li><a href="#index-po_002dunfuzzy_0040r_007b_002c-PO-Mode-command_007d-414"><code>po-unfuzzy</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14124. <li><a href="#index-po_002dvalidate_0040r_007b_002c-PO-Mode-command_007d-360"><code>po-validate</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14125. <li><a href="#index-po_002dyank_002dcomment_0040r_007b_002c-PO-Mode-command_007d-479"><code>po-yank-comment</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14126. <li><a href="#index-po_002dyank_002dmsgstr_0040r_007b_002c-PO-Mode-command_007d-463"><code>po-yank-msgstr</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14127. <li><a href="#index-q_0040r_007b_002c-PO-Mode-command_007d-349"><code>q</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14128. <li><a href="#index-Q_0040r_007b_002c-PO-Mode-command_007d-348"><code>Q</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14129. <li><a href="#index-q_0040r_007b_002c-PO-Mode-command_007d-340"><code>q</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14130. <li><a href="#index-Q_0040r_007b_002c-PO-Mode-command_007d-339"><code>Q</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14131. <li><a href="#index-r_0040r_007b_002c-PO-Mode-command_007d-370"><code>r</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14132. <li><a href="#index-RET_0040r_007b_002c-PO-Mode-command_007d-444"><code>RET</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14133. <li><a href="#index-S_0040r_007b_002c-PO-Mode-command_007d-505"><code>S</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14134. <li><a href="#index-s_0040r_007b_002c-PO-Mode-command_007d-501"><code>s</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14135. <li><a href="#index-S_0040r_007b_002c-PO-Mode-command_007d-499"><code>S</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14136. <li><a href="#index-s_0040r_007b_002c-PO-Mode-command_007d-497"><code>s</code><span class="roman">, PO Mode command</span></a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14137. <li><a href="#index-starting-a-string-translation-456">starting a string translation</a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14138. <li><a href="#index-string-normalization-in-entries-389">string normalization in entries</a>: <a href="#Normalizing">Normalizing</a></li>
  14139. <li><a href="#index-subedit-minor-mode-480">subedit minor mode</a>: <a href="#Subedit">Subedit</a></li>
  14140. <li><a href="#index-T_0040r_007b_002c-PO-Mode-command_007d-399"><code>T</code><span class="roman">, PO Mode command</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14141. <li><a href="#index-t_0040r_007b_002c-PO-Mode-command_007d-397"><code>t</code><span class="roman">, PO Mode command</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14142. <li><a href="#index-T_0040r_007b_002c-PO-Mode-command_007d-396"><code>T</code><span class="roman">, PO Mode command</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14143. <li><a href="#index-t_0040r_007b_002c-PO-Mode-command_007d-395"><code>t</code><span class="roman">, PO Mode command</span></a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14144. <li><a href="#index-TAB_0040r_007b_002c-PO-Mode-command_007d-408"><code>TAB</code><span class="roman">, PO Mode command</span></a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14145. <li><a href="#index-g_t_0040file_007bTAGS_007d_002c-and-marking-translatable-strings-147"><samp><span class="file">TAGS</span></samp>, and marking translatable strings</a>: <a href="#Marking">Marking</a></li>
  14146. <li><a href="#index-U_0040r_007b_002c-PO-Mode-command_007d-425"><code>U</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14147. <li><a href="#index-u_0040r_007b_002c-PO-Mode-command_007d-423"><code>u</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14148. <li><a href="#index-U_0040r_007b_002c-PO-Mode-command_007d-421"><code>U</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14149. <li><a href="#index-u_0040r_007b_002c-PO-Mode-command_007d-420"><code>u</code><span class="roman">, PO Mode command</span></a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14150. <li><a href="#index-use-the-source_002c-Luke-495">use the source, Luke</a>: <a href="#C-Sources-Context">C Sources Context</a></li>
  14151. <li><a href="#index-using-obsolete-translations-to-make-new-entries-464">using obsolete translations to make new entries</a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14152. <li><a href="#index-using-translation-compendia-525">using translation compendia</a>: <a href="#Compendium">Compendium</a></li>
  14153. <li><a href="#index-V_0040r_007b_002c-PO-Mode-command_007d-345"><code>V</code><span class="roman">, PO Mode command</span></a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14154. <li><a href="#index-W_0040r_007b_002c-PO-Mode-command_007d-469"><code>W</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14155. <li><a href="#index-w_0040r_007b_002c-PO-Mode-command_007d-448"><code>w</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14156. <li><a href="#index-x_0040r_007b_002c-PO-Mode-command_007d-371"><code>x</code><span class="roman">, PO Mode command</span></a>: <a href="#Entry-Positioning">Entry Positioning</a></li>
  14157. <li><a href="#index-Y_0040r_007b_002c-PO-Mode-command_007d-470"><code>Y</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14158. <li><a href="#index-y_0040r_007b_002c-PO-Mode-command_007d-449"><code>y</code><span class="roman">, PO Mode command</span></a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14159. </ul><div class="node">
  14160. <a name="Autoconf-Macro-Index"></a>
  14161. <p><hr>
  14162. Next:&nbsp;<a rel="next" accesskey="n" href="#Index">Index</a>,
  14163. Previous:&nbsp;<a rel="previous" accesskey="p" href="#PO-Mode-Index">PO Mode Index</a>,
  14164. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  14165. </div>
  14166. <h2 class="unnumbered">Autoconf Macro Index</h2>
  14167. <ul class="index-am" compact>
  14168. <li><a href="#index-AM_005fGNU_005fGETTEXT-1146"><code>AM_GNU_GETTEXT</code></a>: <a href="#AM_005fGNU_005fGETTEXT">AM_GNU_GETTEXT</a></li>
  14169. <li><a href="#index-AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR-1150"><code>AM_GNU_GETTEXT_INTL_SUBDIR</code></a>: <a href="#AM_005fGNU_005fGETTEXT_005fINTL_005fSUBDIR">AM_GNU_GETTEXT_INTL_SUBDIR</a></li>
  14170. <li><a href="#index-AM_005fGNU_005fGETTEXT_005fNEED-1149"><code>AM_GNU_GETTEXT_NEED</code></a>: <a href="#AM_005fGNU_005fGETTEXT_005fNEED">AM_GNU_GETTEXT_NEED</a></li>
  14171. <li><a href="#index-AM_005fGNU_005fGETTEXT_005fVERSION-1148"><code>AM_GNU_GETTEXT_VERSION</code></a>: <a href="#AM_005fGNU_005fGETTEXT_005fVERSION">AM_GNU_GETTEXT_VERSION</a></li>
  14172. <li><a href="#index-AM_005fICONV-1153"><code>AM_ICONV</code></a>: <a href="#AM_005fICONV">AM_ICONV</a></li>
  14173. <li><a href="#index-AM_005fPO_005fSUBDIRS-1151"><code>AM_PO_SUBDIRS</code></a>: <a href="#AM_005fPO_005fSUBDIRS">AM_PO_SUBDIRS</a></li>
  14174. <li><a href="#index-AM_005fXGETTEXT_005fOPTION-1152"><code>AM_XGETTEXT_OPTION</code></a>: <a href="#AM_005fXGETTEXT_005fOPTION">AM_XGETTEXT_OPTION</a></li>
  14175. </ul><div class="node">
  14176. <a name="Index"></a>
  14177. <p><hr>
  14178. Previous:&nbsp;<a rel="previous" accesskey="p" href="#Autoconf-Macro-Index">Autoconf Macro Index</a>,
  14179. Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
  14180. </div>
  14181. <h2 class="unnumbered">General Index</h2>
  14182. <ul class="index-cp" compact>
  14183. <li><a href="#index-g_t_0040code_007b_005f_007d_002c-a-macro-to-mark-strings-for-translation-144"><code>_</code>, a macro to mark strings for translation</a>: <a href="#Mark-Keywords">Mark Keywords</a></li>
  14184. <li><a href="#index-g_t_0040code_007b_005fnl_005fmsg_005fcat_005fcntr_007d-1110"><code>_nl_msg_cat_cntr</code></a>: <a href="#gettext-grok">gettext grok</a></li>
  14185. <li><a href="#index-g_t_0040file_007bABOUT_002dNLS_007d-file-54"><samp><span class="file">ABOUT-NLS</span></samp> file</a>: <a href="#Installing-Localizations">Installing Localizations</a></li>
  14186. <li><a href="#index-g_t_0040file_007bacconfig_002eh_007d-file-1139"><samp><span class="file">acconfig.h</span></samp> file</a>: <a href="#acconfig">acconfig</a></li>
  14187. <li><a href="#index-accumulating-translations-530">accumulating translations</a>: <a href="#Creating-Compendia">Creating Compendia</a></li>
  14188. <li><a href="#index-g_t_0040file_007baclocal_002em4_007d-file-1138"><samp><span class="file">aclocal.m4</span></samp> file</a>: <a href="#aclocal">aclocal</a></li>
  14189. <li><a href="#index-adding-keywords_002c-_0040code_007bxgettext_007d-188">adding keywords, <code>xgettext</code></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14190. <li><a href="#index-ambiguities-132">ambiguities</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14191. <li><a href="#index-apply-a-filter-to-translations-681">apply a filter to translations</a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  14192. <li><a href="#index-apply-command-to-all-translations-in-a-catalog-913">apply command to all translations in a catalog</a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  14193. <li><a href="#index-Arabic-digits-1173">Arabic digits</a>: <a href="#c_002dformat">c-format</a></li>
  14194. <li><a href="#index-attribute-manipulation-831">attribute manipulation</a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  14195. <li><a href="#index-attribute_002c-fuzzy-404">attribute, fuzzy</a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14196. <li><a href="#index-attributes-of-a-PO-file-entry-403">attributes of a PO file entry</a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14197. <li><a href="#index-attributes_002c-manipulating-541">attributes, manipulating</a>: <a href="#Manipulating">Manipulating</a></li>
  14198. <li><a href="#index-autoconf-macros-for-_0040code_007bgettext_007d-1145">autoconf macros for <code>gettext</code></a>: <a href="#autoconf-macros">autoconf macros</a></li>
  14199. <li><a href="#index-g_t_0040code_007bautopoint_007d-program_002c-usage-1156"><code>autopoint</code> program, usage</a>: <a href="#autopoint-Invocation">autopoint Invocation</a></li>
  14200. <li><a href="#index-auxiliary-PO-file-510">auxiliary PO file</a>: <a href="#Auxiliary">Auxiliary</a></li>
  14201. <li><a href="#index-available-translations-53">available translations</a>: <a href="#Installing-Localizations">Installing Localizations</a></li>
  14202. <li><a href="#index-awk-1234">awk</a>: <a href="#gawk">gawk</a></li>
  14203. <li><a href="#index-awk_002dformat_0040r_007b-flag_007d-85"><code>awk-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14204. <li><a href="#index-backup-old-file_002c-and-_0040code_007bmsgmerge_007d-program-288">backup old file, and <code>msgmerge</code> program</a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  14205. <li><a href="#index-bash-1219">bash</a>: <a href="#bash">bash</a></li>
  14206. <li><a href="#index-bibliography-1260">bibliography</a>: <a href="#References">References</a></li>
  14207. <li><a href="#index-big-picture-31">big picture</a>: <a href="#Overview">Overview</a></li>
  14208. <li><a href="#index-bind_005ftextdomain_005fcodeset-1076"><code>bind_textdomain_codeset</code></a>: <a href="#Charset-conversion">Charset conversion</a></li>
  14209. <li><a href="#index-Boost-format-strings-201">Boost format strings</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14210. <li><a href="#index-boost_002dformat_0040r_007b-flag_007d-109"><code>boost-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14211. <li><a href="#index-bug-report-address-4">bug report address</a>: <a href="#Introduction">Introduction</a></li>
  14212. <li><a href="#index-C-and-C_002dlike-languages-1174">C and C-like languages</a>: <a href="#C">C</a></li>
  14213. <li><a href="#index-C-trigraphs-195">C trigraphs</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14214. <li><a href="#index-C_0023-1232">C#</a>: <a href="#C_0023">C#</a></li>
  14215. <li><a href="#index-C_0023-mode_002c-and-_0040code_007bmsgfmt_007d-program-957">C# mode, and <code>msgfmt</code> program</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14216. <li><a href="#index-C_0023-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1016">C# mode, and <code>msgunfmt</code> program</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14217. <li><a href="#index-C_0023-resources-mode_002c-and-_0040code_007bmsgfmt_007d-program-959">C# resources mode, and <code>msgfmt</code> program</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14218. <li><a href="#index-C_0023-resources-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1018">C# resources mode, and <code>msgunfmt</code> program</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14219. <li><a href="#index-C_0023_002c-string-concatenation-140">C#, string concatenation</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14220. <li><a href="#index-c_002dformat_0040r_007b-flag_007d-63"><code>c-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14221. <li><a href="#index-c_002dformat_0040r_007b_002c-and-_0040code_007bxgettext_007d_007d-155"><code>c-format</code><span class="roman">, and </span><code>xgettext</code></a>: <a href="#c_002dformat-Flag">c-format Flag</a></li>
  14222. <li><a href="#index-catalog-encoding-and-_0040code_007bmsgexec_007d-output-918">catalog encoding and <code>msgexec</code> output</a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  14223. <li><a href="#index-g_t_0040code_007bcatclose_007d_002c-a-_0040code_007bcatgets_007d-function-1066"><code>catclose</code>, a <code>catgets</code> function</a>: <a href="#Interface-to-catgets">Interface to catgets</a></li>
  14224. <li><a href="#index-g_t_0040code_007bcatgets_007d_002c-a-_0040code_007bcatgets_007d-function-1065"><code>catgets</code>, a <code>catgets</code> function</a>: <a href="#Interface-to-catgets">Interface to catgets</a></li>
  14225. <li><a href="#index-g_t_0040code_007bcatgets_007d_002c-X_002fOpen-specification-1062"><code>catgets</code>, X/Open specification</a>: <a href="#catgets">catgets</a></li>
  14226. <li><a href="#index-g_t_0040code_007bcatopen_007d_002c-a-_0040code_007bcatgets_007d-function-1064"><code>catopen</code>, a <code>catgets</code> function</a>: <a href="#Interface-to-catgets">Interface to catgets</a></li>
  14227. <li><a href="#index-character-encoding-17">character encoding</a>: <a href="#Aspects">Aspects</a></li>
  14228. <li><a href="#index-charset-conversion-at-runtime-1074">charset conversion at runtime</a>: <a href="#Charset-conversion">Charset conversion</a></li>
  14229. <li><a href="#index-charset-of-PO-files-268">charset of PO files</a>: <a href="#Header-Entry">Header Entry</a></li>
  14230. <li><a href="#index-check-format-strings-986">check format strings</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14231. <li><a href="#index-checking-of-translations-539">checking of translations</a>: <a href="#Manipulating">Manipulating</a></li>
  14232. <li><a href="#index-clisp-1223">clisp</a>: <a href="#Common-Lisp">Common Lisp</a></li>
  14233. <li><a href="#index-clisp-C-sources-1224">clisp C sources</a>: <a href="#clisp-C">clisp C</a></li>
  14234. <li><a href="#index-codeset-15">codeset</a>: <a href="#Aspects">Aspects</a></li>
  14235. <li><a href="#index-comments-in-PO-files-117">comments in PO files</a>: <a href="#PO-Files">PO Files</a></li>
  14236. <li><a href="#index-comments_002c-automatic-58">comments, automatic</a>: <a href="#PO-Files">PO Files</a></li>
  14237. <li><a href="#index-comments_002c-extracted-59">comments, extracted</a>: <a href="#PO-Files">PO Files</a></li>
  14238. <li><a href="#index-comments_002c-translator-57">comments, translator</a>: <a href="#PO-Files">PO Files</a></li>
  14239. <li><a href="#index-Common-Lisp-1221">Common Lisp</a>: <a href="#Common-Lisp">Common Lisp</a></li>
  14240. <li><a href="#index-compare-PO-files-812">compare PO files</a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  14241. <li><a href="#index-comparison-of-interfaces-1097">comparison of interfaces</a>: <a href="#Comparison">Comparison</a></li>
  14242. <li><a href="#index-compatibility-with-X_002fOpen-_0040code_007bmsgfmt_007d-991">compatibility with X/Open <code>msgfmt</code></a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14243. <li><a href="#index-compendium-526">compendium</a>: <a href="#Compendium">Compendium</a></li>
  14244. <li><a href="#index-compendium_002c-creating-528">compendium, creating</a>: <a href="#Creating-Compendia">Creating Compendia</a></li>
  14245. <li><a href="#index-concatenate-PO-files-544">concatenate PO files</a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  14246. <li><a href="#index-concatenating-PO-files-into-a-compendium-529">concatenating PO files into a compendium</a>: <a href="#Creating-Compendia">Creating Compendia</a></li>
  14247. <li><a href="#index-concatenation-of-strings-137">concatenation of strings</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14248. <li><a href="#index-g_t_0040file_007bconfig_002eh_002ein_007d-file-1140"><samp><span class="file">config.h.in</span></samp> file</a>: <a href="#config_002eh_002ein">config.h.in</a></li>
  14249. <li><a href="#index-context-1077">context</a>: <a href="#Contexts">Contexts</a></li>
  14250. <li><a href="#index-context_002c-argument-specification-in-_0040code_007bxgettext_007d-189">context, argument specification in <code>xgettext</code></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14251. <li><a href="#index-context_002c-in-MO-files-1060">context, in MO files</a>: <a href="#MO-Files">MO Files</a></li>
  14252. <li><a href="#index-context_002c-in-PO-files-112">context, in PO files</a>: <a href="#PO-Files">PO Files</a></li>
  14253. <li><a href="#index-control-characters-142">control characters</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14254. <li><a href="#index-convert-binary-message-catalog-into-PO-file-1011">convert binary message catalog into PO file</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14255. <li><a href="#index-convert-translations-to-a-different-encoding-592">convert translations to a different encoding</a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  14256. <li><a href="#index-converting-a-package-to-use-_0040code_007bgettext_007d-1114">converting a package to use <code>gettext</code></a>: <a href="#Prerequisites">Prerequisites</a></li>
  14257. <li><a href="#index-country-codes-1263">country codes</a>: <a href="#Country-Codes">Country Codes</a></li>
  14258. <li><a href="#index-create-new-PO-file-241">create new PO file</a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  14259. <li><a href="#index-creating-a-new-PO-file-238">creating a new PO file</a>: <a href="#Creating">Creating</a></li>
  14260. <li><a href="#index-creating-compendia-527">creating compendia</a>: <a href="#Creating-Compendia">Creating Compendia</a></li>
  14261. <li><a href="#index-csharp_002dformat_0040r_007b-flag_007d-83"><code>csharp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14262. <li><a href="#index-currency-symbols-19">currency symbols</a>: <a href="#Aspects">Aspects</a></li>
  14263. <li><a href="#index-date-format-21">date format</a>: <a href="#Aspects">Aspects</a></li>
  14264. <li><a href="#index-dcngettext-1090"><code>dcngettext</code></a>: <a href="#Plural-forms">Plural forms</a></li>
  14265. <li><a href="#index-dcpgettext-1083"><code>dcpgettext</code></a>: <a href="#Contexts">Contexts</a></li>
  14266. <li><a href="#index-dcpgettext_005fexpr-1086"><code>dcpgettext_expr</code></a>: <a href="#Contexts">Contexts</a></li>
  14267. <li><a href="#index-debugging-messages-marked-as-format-strings-203">debugging messages marked as format strings</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14268. <li><a href="#index-dialect-537">dialect</a>: <a href="#Manipulating">Manipulating</a></li>
  14269. <li><a href="#index-disabling-NLS-1143">disabling NLS</a>: <a href="#lib_002fgettext_002eh">lib/gettext.h</a></li>
  14270. <li><a href="#index-distribution-tarball-1164">distribution tarball</a>: <a href="#Release-Management">Release Management</a></li>
  14271. <li><a href="#index-dngettext-1089"><code>dngettext</code></a>: <a href="#Plural-forms">Plural forms</a></li>
  14272. <li><a href="#index-dollar-substitution-1207">dollar substitution</a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  14273. <li><a href="#index-domain-ambiguities-1071">domain ambiguities</a>: <a href="#Ambiguities">Ambiguities</a></li>
  14274. <li><a href="#index-dpgettext-1082"><code>dpgettext</code></a>: <a href="#Contexts">Contexts</a></li>
  14275. <li><a href="#index-dpgettext_005fexpr-1085"><code>dpgettext_expr</code></a>: <a href="#Contexts">Contexts</a></li>
  14276. <li><a href="#index-duplicate-elimination-540">duplicate elimination</a>: <a href="#Manipulating">Manipulating</a></li>
  14277. <li><a href="#index-duplicate-removal-730">duplicate removal</a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  14278. <li><a href="#index-editing-comments-in-PO-files-465">editing comments in PO files</a>: <a href="#Modifying-Comments">Modifying Comments</a></li>
  14279. <li><a href="#index-Editing-PO-Files-328">Editing PO Files</a>: <a href="#Editing">Editing</a></li>
  14280. <li><a href="#index-editing-translations-442">editing translations</a>: <a href="#Modifying-Translations">Modifying Translations</a></li>
  14281. <li><a href="#index-elisp_002dformat_0040r_007b-flag_007d-73"><code>elisp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14282. <li><a href="#index-Emacs-Lisp-1225">Emacs Lisp</a>: <a href="#Emacs-Lisp">Emacs Lisp</a></li>
  14283. <li><a href="#index-Emacs-PO-Mode-331">Emacs PO Mode</a>: <a href="#PO-Mode">PO Mode</a></li>
  14284. <li><a href="#index-encoding-16">encoding</a>: <a href="#Aspects">Aspects</a></li>
  14285. <li><a href="#index-encoding-conversion-536">encoding conversion</a>: <a href="#Manipulating">Manipulating</a></li>
  14286. <li><a href="#index-encoding-conversion-at-runtime-1075">encoding conversion at runtime</a>: <a href="#Charset-conversion">Charset conversion</a></li>
  14287. <li><a href="#index-encoding-for-your-language-272">encoding for your language</a>: <a href="#Header-Entry">Header Entry</a></li>
  14288. <li><a href="#index-encoding-list-270">encoding list</a>: <a href="#Header-Entry">Header Entry</a></li>
  14289. <li><a href="#index-encoding-of-PO-files-267">encoding of PO files</a>: <a href="#Header-Entry">Header Entry</a></li>
  14290. <li><a href="#index-environment-variables-1208">environment variables</a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  14291. <li><a href="#index-g_t_0040code_007benvsubst_007d-program_002c-usage-1205"><code>envsubst</code> program, usage</a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  14292. <li><a href="#index-g_t_0040code_007beval_005fgettext_007d-function_002c-usage-1215"><code>eval_gettext</code> function, usage</a>: <a href="#eval_005fgettext-Invocation">eval_gettext Invocation</a></li>
  14293. <li><a href="#index-g_t_0040code_007beval_005fngettext_007d-function_002c-usage-1217"><code>eval_ngettext</code> function, usage</a>: <a href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a></li>
  14294. <li><a href="#index-evolution-of-packages-39">evolution of packages</a>: <a href="#Overview">Overview</a></li>
  14295. <li><a href="#index-extracting-parts-of-a-PO-file-into-a-compendium-531">extracting parts of a PO file into a compendium</a>: <a href="#Creating-Compendia">Creating Compendia</a></li>
  14296. <li><a href="#index-FDL_002c-GNU-Free-Documentation-License-1270">FDL, GNU Free Documentation License</a>: <a href="#GNU-FDL">GNU FDL</a></li>
  14297. <li><a href="#index-file-format_002c-_0040file_007b_002emo_007d-1057">file format, <samp><span class="file">.mo</span></samp></a>: <a href="#MO-Files">MO Files</a></li>
  14298. <li><a href="#index-file-format_002c-_0040file_007b_002epo_007d-56">file format, <samp><span class="file">.po</span></samp></a>: <a href="#PO-Files">PO Files</a></li>
  14299. <li><a href="#index-files_002c-_0040file_007b_002epo_007d-and-_0040file_007b_002emo_007d-29">files, <samp><span class="file">.po</span></samp> and <samp><span class="file">.mo</span></samp></a>: <a href="#Files">Files</a></li>
  14300. <li><a href="#index-files_002c-_0040file_007b_002epot_007d-38">files, <samp><span class="file">.pot</span></samp></a>: <a href="#Overview">Overview</a></li>
  14301. <li><a href="#index-filter-messages-according-to-attributes-830">filter messages according to attributes</a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  14302. <li><a href="#index-find-common-messages-770">find common messages</a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  14303. <li><a href="#index-force-use-of-fuzzy-entries-998">force use of fuzzy entries</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14304. <li><a href="#index-format-strings-154">format strings</a>: <a href="#c_002dformat-Flag">c-format Flag</a></li>
  14305. <li><a href="#index-Free-Pascal-1237">Free Pascal</a>: <a href="#Pascal">Pascal</a></li>
  14306. <li><a href="#index-function-attribute_002c-_005f_005fformat_005f_005f-191">function attribute, __format__</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14307. <li><a href="#index-function-attribute_002c-_005f_005fformat_005farg_005f_005f-192">function attribute, __format_arg__</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14308. <li><a href="#index-fuzzy-entries-402">fuzzy entries</a>: <a href="#Fuzzy-Entries">Fuzzy Entries</a></li>
  14309. <li><a href="#index-fuzzy_0040r_007b-flag_007d-62"><code>fuzzy</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14310. <li><a href="#index-gawk-1235">gawk</a>: <a href="#gawk">gawk</a></li>
  14311. <li><a href="#index-gcc_002dinternal_002dformat_0040r_007b-flag_007d-99"><code>gcc-internal-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14312. <li><a href="#index-GCC_002dsource-1256">GCC-source</a>: <a href="#GCC_002dsource">GCC-source</a></li>
  14313. <li><a href="#index-generate-binary-message-catalog-from-PO-file-949">generate binary message catalog from PO file</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14314. <li><a href="#index-generate-translation-catalog-in-English-880">generate translation catalog in English</a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  14315. <li><a href="#index-g_t_0040code_007bgettext_007d-files-1129"><code>gettext</code> files</a>: <a href="#Adjusting-Files">Adjusting Files</a></li>
  14316. <li><a href="#index-g_t_0040code_007bgettext_007d-installation-333"><code>gettext</code> installation</a>: <a href="#Installation">Installation</a></li>
  14317. <li><a href="#index-g_t_0040code_007bgettext_007d-interface-1069"><code>gettext</code> interface</a>: <a href="#Interface-to-gettext">Interface to gettext</a></li>
  14318. <li><a href="#index-g_t_0040code_007bgettext_007d-program_002c-usage-1182"><code>gettext</code> program, usage</a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  14319. <li><a href="#index-g_t_0040code_007bgettext_007d-vs-_0040code_007bcatgets_007d-1096"><code>gettext</code> vs <code>catgets</code></a>: <a href="#Comparison">Comparison</a></li>
  14320. <li><a href="#index-g_t_0040code_007bgettext_007d_002c-a-programmer_0027s-view-1068"><code>gettext</code>, a programmer's view</a>: <a href="#gettext">gettext</a></li>
  14321. <li><a href="#index-g_t_0040file_007bgettext_002eh_007d-file-1141"><samp><span class="file">gettext.h</span></samp> file</a>: <a href="#lib_002fgettext_002eh">lib/gettext.h</a></li>
  14322. <li><a href="#index-g_t_0040code_007bgettextize_007d-program_002c-usage-1118"><code>gettextize</code> program, usage</a>: <a href="#gettextize-Invocation">gettextize Invocation</a></li>
  14323. <li><a href="#index-gfc_002dinternal_002dformat_0040r_007b-flag_007d-101"><code>gfc-internal-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14324. <li><a href="#index-GNOME-PO-file-editor-330">GNOME PO file editor</a>: <a href="#Gtranslator">Gtranslator</a></li>
  14325. <li><a href="#index-GPL_002c-GNU-General-Public-License-1266">GPL, GNU General Public License</a>: <a href="#GNU-GPL">GNU GPL</a></li>
  14326. <li><a href="#index-GUI-programs-1078">GUI programs</a>: <a href="#Contexts">Contexts</a></li>
  14327. <li><a href="#index-guile-1228">guile</a>: <a href="#Scheme">Scheme</a></li>
  14328. <li><a href="#index-hash-table_002c-inside-MO-files-1059">hash table, inside MO files</a>: <a href="#MO-Files">MO Files</a></li>
  14329. <li><a href="#index-he_002c-she_002c-and-they-2">he, she, and they</a>: <a href="#Introduction">Introduction</a></li>
  14330. <li><a href="#index-header-entry-of-a-PO-file-265">header entry of a PO file</a>: <a href="#Header-Entry">Header Entry</a></li>
  14331. <li><a href="#index-help-option-135">help option</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14332. <li><a href="#index-history-of-GNU-_0040code_007bgettext_007d-1258">history of GNU <code>gettext</code></a>: <a href="#History">History</a></li>
  14333. <li><a href="#index-i18n-6">i18n</a>: <a href="#Concepts">Concepts</a></li>
  14334. <li><a href="#index-importing-PO-files-391">importing PO files</a>: <a href="#Normalizing">Normalizing</a></li>
  14335. <li><a href="#index-include-file-_0040file_007blibintl_002eh_007d-1144">include file <samp><span class="file">libintl.h</span></samp></a>: <a href="#lib_002fgettext_002eh">lib/gettext.h</a></li>
  14336. <li><a href="#index-include-file-_0040file_007blibintl_002eh_007d-1098">include file <samp><span class="file">libintl.h</span></samp></a>: <a href="#Comparison">Comparison</a></li>
  14337. <li><a href="#index-include-file-_0040file_007blibintl_002eh_007d-119">include file <samp><span class="file">libintl.h</span></samp></a>: <a href="#Importing">Importing</a></li>
  14338. <li><a href="#index-include-file-_0040file_007blibintl_002eh_007d-34">include file <samp><span class="file">libintl.h</span></samp></a>: <a href="#Overview">Overview</a></li>
  14339. <li><a href="#index-initialization-120">initialization</a>: <a href="#Triggering">Triggering</a></li>
  14340. <li><a href="#index-initialize-new-PO-file-242">initialize new PO file</a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  14341. <li><a href="#index-initialize-translations-from-a-compendium-532">initialize translations from a compendium</a>: <a href="#Using-Compendia">Using Compendia</a></li>
  14342. <li><a href="#index-installing-_0040code_007bgettext_007d-332">installing <code>gettext</code></a>: <a href="#Installation">Installation</a></li>
  14343. <li><a href="#index-interface-to-_0040code_007bcatgets_007d-1063">interface to <code>catgets</code></a>: <a href="#Interface-to-catgets">Interface to catgets</a></li>
  14344. <li><a href="#index-internationalization-8">internationalization</a>: <a href="#Concepts">Concepts</a></li>
  14345. <li><a href="#index-g_t_0040code_007binttypes_002eh_007d-138"><code>inttypes.h</code></a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14346. <li><a href="#index-ISO-3166-1264">ISO 3166</a>: <a href="#Country-Codes">Country Codes</a></li>
  14347. <li><a href="#index-ISO-639-1262">ISO 639</a>: <a href="#Language-Codes">Language Codes</a></li>
  14348. <li><a href="#index-Java-1230">Java</a>: <a href="#Java">Java</a></li>
  14349. <li><a href="#index-Java-mode_002c-and-_0040code_007bmsgfmt_007d-program-954">Java mode, and <code>msgfmt</code> program</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14350. <li><a href="#index-Java-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1014">Java mode, and <code>msgunfmt</code> program</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14351. <li><a href="#index-Java_002c-string-concatenation-139">Java, string concatenation</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14352. <li><a href="#index-java_002dformat_0040r_007b-flag_007d-81"><code>java-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14353. <li><a href="#index-KDE-format-strings-199">KDE format strings</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14354. <li><a href="#index-KDE-PO-file-editor-329">KDE PO file editor</a>: <a href="#KBabel">KBabel</a></li>
  14355. <li><a href="#index-kde_002dformat_0040r_007b-flag_007d-107"><code>kde-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14356. <li><a href="#index-keyboard-accelerator-checking-993">keyboard accelerator checking</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14357. <li><a href="#index-l10n-7">l10n</a>: <a href="#Concepts">Concepts</a></li>
  14358. <li><a href="#index-language-codes-1261">language codes</a>: <a href="#Language-Codes">Language Codes</a></li>
  14359. <li><a href="#index-language-selection-42">language selection</a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  14360. <li><a href="#index-language-selection-at-runtime-1100">language selection at runtime</a>: <a href="#gettext-grok">gettext grok</a></li>
  14361. <li><a href="#index-large-package-1072">large package</a>: <a href="#Ambiguities">Ambiguities</a></li>
  14362. <li><a href="#index-LGPL_002c-GNU-Lesser-General-Public-License-1268">LGPL, GNU Lesser General Public License</a>: <a href="#GNU-LGPL">GNU LGPL</a></li>
  14363. <li><a href="#index-g_t_0040code_007blibiconv_007d-library-1154"><code>libiconv</code> library</a>: <a href="#AM_005fICONV">AM_ICONV</a></li>
  14364. <li><a href="#index-g_t_0040code_007blibintl_007d-for-C_0023-1233"><code>libintl</code> for C#</a>: <a href="#C_0023">C#</a></li>
  14365. <li><a href="#index-g_t_0040code_007blibintl_007d-for-Java-1231"><code>libintl</code> for Java</a>: <a href="#Java">Java</a></li>
  14366. <li><a href="#index-g_t_0040code_007blibintl_007d-library-1147"><code>libintl</code> library</a>: <a href="#AM_005fGNU_005fGETTEXT">AM_GNU_GETTEXT</a></li>
  14367. <li><a href="#index-g_t_0040code_007blibrep_007d-Lisp-1226"><code>librep</code> Lisp</a>: <a href="#librep">librep</a></li>
  14368. <li><a href="#index-librep_002dformat_0040r_007b-flag_007d-75"><code>librep-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14369. <li><a href="#index-License_002c-GNU-FDL-1271">License, GNU FDL</a>: <a href="#GNU-FDL">GNU FDL</a></li>
  14370. <li><a href="#index-License_002c-GNU-GPL-1267">License, GNU GPL</a>: <a href="#GNU-GPL">GNU GPL</a></li>
  14371. <li><a href="#index-License_002c-GNU-LGPL-1269">License, GNU LGPL</a>: <a href="#GNU-LGPL">GNU LGPL</a></li>
  14372. <li><a href="#index-Licenses-1265">Licenses</a>: <a href="#Licenses">Licenses</a></li>
  14373. <li><a href="#index-g_t_0040file_007bLINGUAS_007d-file-1131"><samp><span class="file">LINGUAS</span></samp> file</a>: <a href="#po_002fLINGUAS">po/LINGUAS</a></li>
  14374. <li><a href="#index-link-with-_0040file_007blibintl_007d-35">link with <samp><span class="file">libintl</span></samp></a>: <a href="#Overview">Overview</a></li>
  14375. <li><a href="#index-Linux-271">Linux</a>: <a href="#Header-Entry">Header Entry</a></li>
  14376. <li><a href="#index-Linux-36">Linux</a>: <a href="#Overview">Overview</a></li>
  14377. <li><a href="#index-Linux-28">Linux</a>: <a href="#Aspects">Aspects</a></li>
  14378. <li><a href="#index-Lisp-1222">Lisp</a>: <a href="#Common-Lisp">Common Lisp</a></li>
  14379. <li><a href="#index-lisp_002dformat_0040r_007b-flag_007d-71"><code>lisp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14380. <li><a href="#index-list-of-translation-teams_002c-where-to-find-266">list of translation teams, where to find</a>: <a href="#Header-Entry">Header Entry</a></li>
  14381. <li><a href="#index-locale-categories-14">locale categories</a>: <a href="#Aspects">Aspects</a></li>
  14382. <li><a href="#index-locale-category_002c-LC_005fALL-121">locale category, LC_ALL</a>: <a href="#Triggering">Triggering</a></li>
  14383. <li><a href="#index-locale-category_002c-LC_005fCOLLATE-124">locale category, LC_COLLATE</a>: <a href="#Triggering">Triggering</a></li>
  14384. <li><a href="#index-locale-category_002c-LC_005fCTYPE-122">locale category, LC_CTYPE</a>: <a href="#Triggering">Triggering</a></li>
  14385. <li><a href="#index-locale-category_002c-LC_005fCTYPE-18">locale category, LC_CTYPE</a>: <a href="#Aspects">Aspects</a></li>
  14386. <li><a href="#index-locale-category_002c-LC_005fMESSAGES-128">locale category, LC_MESSAGES</a>: <a href="#Triggering">Triggering</a></li>
  14387. <li><a href="#index-locale-category_002c-LC_005fMESSAGES-26">locale category, LC_MESSAGES</a>: <a href="#Aspects">Aspects</a></li>
  14388. <li><a href="#index-locale-category_002c-LC_005fMONETARY-125">locale category, LC_MONETARY</a>: <a href="#Triggering">Triggering</a></li>
  14389. <li><a href="#index-locale-category_002c-LC_005fMONETARY-20">locale category, LC_MONETARY</a>: <a href="#Aspects">Aspects</a></li>
  14390. <li><a href="#index-locale-category_002c-LC_005fNUMERIC-126">locale category, LC_NUMERIC</a>: <a href="#Triggering">Triggering</a></li>
  14391. <li><a href="#index-locale-category_002c-LC_005fNUMERIC-24">locale category, LC_NUMERIC</a>: <a href="#Aspects">Aspects</a></li>
  14392. <li><a href="#index-locale-category_002c-LC_005fRESPONSES-129">locale category, LC_RESPONSES</a>: <a href="#Triggering">Triggering</a></li>
  14393. <li><a href="#index-locale-category_002c-LC_005fTIME-127">locale category, LC_TIME</a>: <a href="#Triggering">Triggering</a></li>
  14394. <li><a href="#index-locale-category_002c-LC_005fTIME-22">locale category, LC_TIME</a>: <a href="#Aspects">Aspects</a></li>
  14395. <li><a href="#index-g_t_0040code_007blocale_007d-program-269"><code>locale</code> program</a>: <a href="#Header-Entry">Header Entry</a></li>
  14396. <li><a href="#index-localization-9">localization</a>: <a href="#Concepts">Concepts</a></li>
  14397. <li><a href="#index-lookup-message-translation-1216">lookup message translation</a>: <a href="#eval_005fgettext-Invocation">eval_gettext Invocation</a></li>
  14398. <li><a href="#index-lookup-message-translation-1183">lookup message translation</a>: <a href="#gettext-Invocation">gettext Invocation</a></li>
  14399. <li><a href="#index-lookup-plural-message-translation-1218">lookup plural message translation</a>: <a href="#eval_005fngettext-Invocation">eval_ngettext Invocation</a></li>
  14400. <li><a href="#index-lookup-plural-message-translation-1195">lookup plural message translation</a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  14401. <li><a href="#index-magic-signature-of-MO-files-1058">magic signature of MO files</a>: <a href="#MO-Files">MO Files</a></li>
  14402. <li><a href="#index-g_t_0040file_007bMakefile_002ein_002ein_007d-extensions-1133"><samp><span class="file">Makefile.in.in</span></samp> extensions</a>: <a href="#po_002fRules_002d_002a">po/Rules-*</a></li>
  14403. <li><a href="#index-g_t_0040file_007bMakevars_007d-file-1132"><samp><span class="file">Makevars</span></samp> file</a>: <a href="#po_002fMakevars">po/Makevars</a></li>
  14404. <li><a href="#index-manipulating-PO-files-534">manipulating PO files</a>: <a href="#Manipulating">Manipulating</a></li>
  14405. <li><a href="#index-marking-Perl-sources-1245">marking Perl sources</a>: <a href="#Perl">Perl</a></li>
  14406. <li><a href="#index-marking-string-initializers-157">marking string initializers</a>: <a href="#Special-cases">Special cases</a></li>
  14407. <li><a href="#index-marking-strings-that-require-translation-143">marking strings that require translation</a>: <a href="#Mark-Keywords">Mark Keywords</a></li>
  14408. <li><a href="#index-marking-strings_002c-preparations-130">marking strings, preparations</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14409. <li><a href="#index-marking-translatable-strings-33">marking translatable strings</a>: <a href="#Overview">Overview</a></li>
  14410. <li><a href="#index-markup-141">markup</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14411. <li><a href="#index-menu-entries-1080">menu entries</a>: <a href="#Contexts">Contexts</a></li>
  14412. <li><a href="#index-menu_002c-keyboard-accelerator-support-994">menu, keyboard accelerator support</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14413. <li><a href="#index-merge-PO-files-545">merge PO files</a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  14414. <li><a href="#index-merging-two-PO-files-535">merging two PO files</a>: <a href="#Manipulating">Manipulating</a></li>
  14415. <li><a href="#index-message-catalog-files-location-1073">message catalog files location</a>: <a href="#Locating-Catalogs">Locating Catalogs</a></li>
  14416. <li><a href="#index-messages-25">messages</a>: <a href="#Aspects">Aspects</a></li>
  14417. <li><a href="#index-migration-from-earlier-versions-of-_0040code_007bgettext_007d-1115">migration from earlier versions of <code>gettext</code></a>: <a href="#Prerequisites">Prerequisites</a></li>
  14418. <li><a href="#index-g_t_0040file_007bmkinstalldirs_007d-file-1137"><samp><span class="file">mkinstalldirs</span></samp> file</a>: <a href="#mkinstalldirs">mkinstalldirs</a></li>
  14419. <li><a href="#index-mnemonics-of-menu-entries-995">mnemonics of menu entries</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14420. <li><a href="#index-MO-file_0027s-format-1056">MO file's format</a>: <a href="#MO-Files">MO Files</a></li>
  14421. <li><a href="#index-modify-message-attributes-842">modify message attributes</a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  14422. <li><a href="#index-g_t_0040code_007bmsgattrib_007d-program_002c-usage-829"><code>msgattrib</code> program, usage</a>: <a href="#msgattrib-Invocation">msgattrib Invocation</a></li>
  14423. <li><a href="#index-g_t_0040code_007bmsgcat_007d-program_002c-usage-543"><code>msgcat</code> program, usage</a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  14424. <li><a href="#index-g_t_0040code_007bmsgcmp_007d-program_002c-usage-811"><code>msgcmp</code> program, usage</a>: <a href="#msgcmp-Invocation">msgcmp Invocation</a></li>
  14425. <li><a href="#index-g_t_0040code_007bmsgcomm_007d-program_002c-usage-769"><code>msgcomm</code> program, usage</a>: <a href="#msgcomm-Invocation">msgcomm Invocation</a></li>
  14426. <li><a href="#index-g_t_0040code_007bmsgconv_007d-program_002c-usage-591"><code>msgconv</code> program, usage</a>: <a href="#msgconv-Invocation">msgconv Invocation</a></li>
  14427. <li><a href="#index-msgctxt-111"><code>msgctxt</code></a>: <a href="#PO-Files">PO Files</a></li>
  14428. <li><a href="#index-g_t_0040code_007bmsgen_007d-program_002c-usage-879"><code>msgen</code> program, usage</a>: <a href="#msgen-Invocation">msgen Invocation</a></li>
  14429. <li><a href="#index-g_t_0040code_007bmsgexec_007d-program_002c-usage-912"><code>msgexec</code> program, usage</a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  14430. <li><a href="#index-g_t_0040code_007bmsgfilter_007d-filter-and-catalog-encoding-691"><code>msgfilter</code> filter and catalog encoding</a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  14431. <li><a href="#index-g_t_0040code_007bmsgfilter_007d-program_002c-usage-680"><code>msgfilter</code> program, usage</a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  14432. <li><a href="#index-g_t_0040code_007bmsgfmt_007d-program_002c-usage-948"><code>msgfmt</code> program, usage</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14433. <li><a href="#index-g_t_0040code_007bmsggrep_007d-program_002c-usage-625"><code>msggrep</code> program, usage</a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  14434. <li><a href="#index-msgid-60"><code>msgid</code></a>: <a href="#PO-Files">PO Files</a></li>
  14435. <li><a href="#index-msgid_005fplural-113"><code>msgid_plural</code></a>: <a href="#PO-Files">PO Files</a></li>
  14436. <li><a href="#index-g_t_0040code_007bmsginit_007d-program_002c-usage-240"><code>msginit</code> program, usage</a>: <a href="#msginit-Invocation">msginit Invocation</a></li>
  14437. <li><a href="#index-g_t_0040code_007bmsgmerge_007d-program_002c-usage-277"><code>msgmerge</code> program, usage</a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  14438. <li><a href="#index-msgstr-61"><code>msgstr</code></a>: <a href="#PO-Files">PO Files</a></li>
  14439. <li><a href="#index-g_t_0040code_007bmsgunfmt_007d-program_002c-usage-1010"><code>msgunfmt</code> program, usage</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14440. <li><a href="#index-g_t_0040code_007bmsguniq_007d-program_002c-usage-728"><code>msguniq</code> program, usage</a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  14441. <li><a href="#index-multi_002dline-strings-392">multi-line strings</a>: <a href="#Normalizing">Normalizing</a></li>
  14442. <li><a href="#index-g_t_0040code_007bN_005f_007d_002c-a-convenience-macro-1099"><code>N_</code>, a convenience macro</a>: <a href="#Comparison">Comparison</a></li>
  14443. <li><a href="#index-Native-Language-Support-11">Native Language Support</a>: <a href="#Concepts">Concepts</a></li>
  14444. <li><a href="#index-Natural-Language-Support-12">Natural Language Support</a>: <a href="#Concepts">Concepts</a></li>
  14445. <li><a href="#index-newlines-in-PO-files-116">newlines in PO files</a>: <a href="#PO-Files">PO Files</a></li>
  14446. <li><a href="#index-ngettext-1088"><code>ngettext</code></a>: <a href="#Plural-forms">Plural forms</a></li>
  14447. <li><a href="#index-g_t_0040code_007bngettext_007d-program_002c-usage-1194"><code>ngettext</code> program, usage</a>: <a href="#ngettext-Invocation">ngettext Invocation</a></li>
  14448. <li><a href="#index-NLS-10">NLS</a>: <a href="#Concepts">Concepts</a></li>
  14449. <li><a href="#index-no_002dawk_002dformat_0040r_007b-flag_007d-86"><code>no-awk-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14450. <li><a href="#index-no_002dboost_002dformat_0040r_007b-flag_007d-110"><code>no-boost-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14451. <li><a href="#index-no_002dc_002dformat_0040r_007b-flag_007d-64"><code>no-c-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14452. <li><a href="#index-no_002dc_002dformat_0040r_007b_002c-and-_0040code_007bxgettext_007d_007d-156"><code>no-c-format</code><span class="roman">, and </span><code>xgettext</code></a>: <a href="#c_002dformat-Flag">c-format Flag</a></li>
  14453. <li><a href="#index-no_002dcsharp_002dformat_0040r_007b-flag_007d-84"><code>no-csharp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14454. <li><a href="#index-no_002delisp_002dformat_0040r_007b-flag_007d-74"><code>no-elisp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14455. <li><a href="#index-no_002dgcc_002dinternal_002dformat_0040r_007b-flag_007d-100"><code>no-gcc-internal-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14456. <li><a href="#index-no_002dgfc_002dinternal_002dformat_0040r_007b-flag_007d-102"><code>no-gfc-internal-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14457. <li><a href="#index-no_002djava_002dformat_0040r_007b-flag_007d-82"><code>no-java-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14458. <li><a href="#index-no_002dkde_002dformat_0040r_007b-flag_007d-108"><code>no-kde-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14459. <li><a href="#index-no_002dlibrep_002dformat_0040r_007b-flag_007d-76"><code>no-librep-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14460. <li><a href="#index-no_002dlisp_002dformat_0040r_007b-flag_007d-72"><code>no-lisp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14461. <li><a href="#index-no_002dobjc_002dformat_0040r_007b-flag_007d-66"><code>no-objc-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14462. <li><a href="#index-no_002dobject_002dpascal_002dformat_0040r_007b-flag_007d-88"><code>no-object-pascal-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14463. <li><a href="#index-no_002dperl_002dbrace_002dformat_0040r_007b-flag_007d-96"><code>no-perl-brace-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14464. <li><a href="#index-no_002dperl_002dformat_0040r_007b-flag_007d-94"><code>no-perl-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14465. <li><a href="#index-no_002dphp_002dformat_0040r_007b-flag_007d-98"><code>no-php-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14466. <li><a href="#index-no_002dpython_002dformat_0040r_007b-flag_007d-70"><code>no-python-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14467. <li><a href="#index-no_002dqt_002dformat_0040r_007b-flag_007d-104"><code>no-qt-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14468. <li><a href="#index-no_002dqt_002dplural_002dformat_0040r_007b-flag_007d-106"><code>no-qt-plural-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14469. <li><a href="#index-no_002dscheme_002dformat_0040r_007b-flag_007d-78"><code>no-scheme-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14470. <li><a href="#index-no_002dsh_002dformat_0040r_007b-flag_007d-68"><code>no-sh-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14471. <li><a href="#index-no_002dsmalltalk_002dformat_0040r_007b-flag_007d-80"><code>no-smalltalk-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14472. <li><a href="#index-no_002dtcl_002dformat_0040r_007b-flag_007d-92"><code>no-tcl-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14473. <li><a href="#index-no_002dycp_002dformat_0040r_007b-flag_007d-90"><code>no-ycp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14474. <li><a href="#index-nplurals_0040r_007b_002c-in-a-PO-file-header_007d-1092"><code>nplurals</code><span class="roman">, in a PO file header</span></a>: <a href="#Plural-forms">Plural forms</a></li>
  14475. <li><a href="#index-number-format-23">number format</a>: <a href="#Aspects">Aspects</a></li>
  14476. <li><a href="#index-objc_002dformat_0040r_007b-flag_007d-65"><code>objc-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14477. <li><a href="#index-Object-Pascal-1238">Object Pascal</a>: <a href="#Pascal">Pascal</a></li>
  14478. <li><a href="#index-object_002dpascal_002dformat_0040r_007b-flag_007d-87"><code>object-pascal-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14479. <li><a href="#index-obsolete-entries-429">obsolete entries</a>: <a href="#Obsolete-Entries">Obsolete Entries</a></li>
  14480. <li><a href="#index-optimization-of-_0040code_007bgettext_007d-functions-1095">optimization of <code>gettext</code> functions</a>: <a href="#Optimized-gettext">Optimized gettext</a></li>
  14481. <li><a href="#index-orthography-538">orthography</a>: <a href="#Manipulating">Manipulating</a></li>
  14482. <li><a href="#index-outdigits-1172">outdigits</a>: <a href="#c_002dformat">c-format</a></li>
  14483. <li><a href="#index-output-to-stdout_002c-_0040code_007bxgettext_007d-171">output to stdout, <code>xgettext</code></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14484. <li><a href="#index-overview-of-_0040code_007bgettext_007d-30">overview of <code>gettext</code></a>: <a href="#Overview">Overview</a></li>
  14485. <li><a href="#index-package-and-version-declaration-in-_0040file_007bconfigure_002eac_007d-1136">package and version declaration in <samp><span class="file">configure.ac</span></samp></a>: <a href="#configure_002eac">configure.ac</a></li>
  14486. <li><a href="#index-package-build-and-installation-options-1167">package build and installation options</a>: <a href="#Installers">Installers</a></li>
  14487. <li><a href="#index-package-distributor_0027s-view-of-_0040code_007bgettext_007d-1166">package distributor's view of <code>gettext</code></a>: <a href="#Installers">Installers</a></li>
  14488. <li><a href="#index-package-installer_0027s-view-of-_0040code_007bgettext_007d-1165">package installer's view of <code>gettext</code></a>: <a href="#Installers">Installers</a></li>
  14489. <li><a href="#index-package-maintainer_0027s-view-of-_0040code_007bgettext_007d-1113">package maintainer's view of <code>gettext</code></a>: <a href="#Maintainers">Maintainers</a></li>
  14490. <li><a href="#index-paragraphs-134">paragraphs</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14491. <li><a href="#index-Pascal-1236">Pascal</a>: <a href="#Pascal">Pascal</a></li>
  14492. <li><a href="#index-Perl-1244">Perl</a>: <a href="#Perl">Perl</a></li>
  14493. <li><a href="#index-Perl-default-keywords-1246">Perl default keywords</a>: <a href="#Default-Keywords">Default Keywords</a></li>
  14494. <li><a href="#index-Perl-invalid-string-interpolation-1249">Perl invalid string interpolation</a>: <a href="#Interpolation-I">Interpolation I</a></li>
  14495. <li><a href="#index-Perl-long-lines-1252">Perl long lines</a>: <a href="#Long-Lines">Long Lines</a></li>
  14496. <li><a href="#index-Perl-parentheses-1251">Perl parentheses</a>: <a href="#Parentheses">Parentheses</a></li>
  14497. <li><a href="#index-Perl-pitfalls-1253">Perl pitfalls</a>: <a href="#Perl-Pitfalls">Perl Pitfalls</a></li>
  14498. <li><a href="#index-Perl-quote_002dlike-expressions-1248">Perl quote-like expressions</a>: <a href="#Quote_002dlike-Expressions">Quote-like Expressions</a></li>
  14499. <li><a href="#index-Perl-special-keywords-for-hash_002dlookups-1247">Perl special keywords for hash-lookups</a>: <a href="#Special-Keywords">Special Keywords</a></li>
  14500. <li><a href="#index-Perl-valid-string-interpolation-1250">Perl valid string interpolation</a>: <a href="#Interpolation-II">Interpolation II</a></li>
  14501. <li><a href="#index-perl_002dbrace_002dformat_0040r_007b-flag_007d-95"><code>perl-brace-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14502. <li><a href="#index-perl_002dformat_0040r_007b-flag_007d-93"><code>perl-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14503. <li><a href="#index-pgettext-1081"><code>pgettext</code></a>: <a href="#Contexts">Contexts</a></li>
  14504. <li><a href="#index-pgettext_005fexpr-1084"><code>pgettext_expr</code></a>: <a href="#Contexts">Contexts</a></li>
  14505. <li><a href="#index-PHP-1254">PHP</a>: <a href="#PHP">PHP</a></li>
  14506. <li><a href="#index-php_002dformat_0040r_007b-flag_007d-97"><code>php-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14507. <li><a href="#index-Pike-1255">Pike</a>: <a href="#Pike">Pike</a></li>
  14508. <li><a href="#index-plural-form-formulas-1094">plural form formulas</a>: <a href="#Plural-forms">Plural forms</a></li>
  14509. <li><a href="#index-plural-forms-1087">plural forms</a>: <a href="#Plural-forms">Plural forms</a></li>
  14510. <li><a href="#index-plural-forms_002c-in-MO-files-1061">plural forms, in MO files</a>: <a href="#MO-Files">MO Files</a></li>
  14511. <li><a href="#index-plural-forms_002c-in-PO-files-114">plural forms, in PO files</a>: <a href="#PO-Files">PO Files</a></li>
  14512. <li><a href="#index-plural-forms_002c-translating-1111">plural forms, translating</a>: <a href="#Translating-plural-forms">Translating plural forms</a></li>
  14513. <li><a href="#index-plural_0040r_007b_002c-in-a-PO-file-header_007d-1093"><code>plural</code><span class="roman">, in a PO file header</span></a>: <a href="#Plural-forms">Plural forms</a></li>
  14514. <li><a href="#index-PO-files_0027-format-55">PO files' format</a>: <a href="#PO-Files">PO Files</a></li>
  14515. <li><a href="#index-PO-mode-_0028Emacs_0029-commands-336">PO mode (Emacs) commands</a>: <a href="#Main-PO-Commands">Main PO Commands</a></li>
  14516. <li><a href="#index-PO-template-file-158">PO template file</a>: <a href="#Template">Template</a></li>
  14517. <li><a href="#index-po_005ffile_005fdomains-939"><code>po_file_domains</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14518. <li><a href="#index-po_005ffile_005ffree-938"><code>po_file_free</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14519. <li><a href="#index-po_005ffile_005fread-937"><code>po_file_read</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14520. <li><a href="#index-po_005fmessage_005fiterator-940"><code>po_message_iterator</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14521. <li><a href="#index-po_005fmessage_005fiterator_005ffree-941"><code>po_message_iterator_free</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14522. <li><a href="#index-po_005fmessage_005fmsgid-943"><code>po_message_msgid</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14523. <li><a href="#index-po_005fmessage_005fmsgid_005fplural-944"><code>po_message_msgid_plural</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14524. <li><a href="#index-po_005fmessage_005fmsgstr-945"><code>po_message_msgstr</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14525. <li><a href="#index-po_005fmessage_005fmsgstr_005fplural-946"><code>po_message_msgstr_plural</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14526. <li><a href="#index-po_005fnext_005fmessage-942"><code>po_next_message</code></a>: <a href="#libgettextpo">libgettextpo</a></li>
  14527. <li><a href="#index-portability-problems-with-_0040code_007bsed_007d-692">portability problems with <code>sed</code></a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  14528. <li><a href="#index-g_t_0040file_007bPOTFILES_002ein_007d-file-1130"><samp><span class="file">POTFILES.in</span></samp> file</a>: <a href="#po_002fPOTFILES_002ein">po/POTFILES.in</a></li>
  14529. <li><a href="#index-preparing-programs-for-translation-118">preparing programs for translation</a>: <a href="#Sources">Sources</a></li>
  14530. <li><a href="#index-preparing-shell-scripts-for-translation-1180">preparing shell scripts for translation</a>: <a href="#Preparing-Shell-Scripts">Preparing Shell Scripts</a></li>
  14531. <li><a href="#index-problems-with-_0040code_007bcatgets_007d-interface-1067">problems with <code>catgets</code> interface</a>: <a href="#Problems-with-catgets">Problems with catgets</a></li>
  14532. <li><a href="#index-programming-languages-1170">programming languages</a>: <a href="#Language-Implementors">Language Implementors</a></li>
  14533. <li><a href="#index-Python-1220">Python</a>: <a href="#Python">Python</a></li>
  14534. <li><a href="#index-python_002dformat_0040r_007b-flag_007d-69"><code>python-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14535. <li><a href="#index-Qt-format-strings-197">Qt format strings</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14536. <li><a href="#index-Qt-mode_002c-and-_0040code_007bmsgfmt_007d-program-963">Qt mode, and <code>msgfmt</code> program</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14537. <li><a href="#index-qt_002dformat_0040r_007b-flag_007d-103"><code>qt-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14538. <li><a href="#index-qt_002dplural_002dformat_0040r_007b-flag_007d-105"><code>qt-plural-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14539. <li><a href="#index-quotation-marks-1134">quotation marks</a>: <a href="#po_002fRules_002d_002a">po/Rules-*</a></li>
  14540. <li><a href="#index-quotation-marks-274">quotation marks</a>: <a href="#Header-Entry">Header Entry</a></li>
  14541. <li><a href="#index-quote-characters_002c-use-in-PO-files-273">quote characters, use in PO files</a>: <a href="#Header-Entry">Header Entry</a></li>
  14542. <li><a href="#index-range_003a_0040r_007b-flag_007d-115"><code>range:</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14543. <li><a href="#index-g_t_0040code_007brecode_002dsr_002dlatin_007d-program-701"><code>recode-sr-latin</code> program</a>: <a href="#msgfilter-Invocation">msgfilter Invocation</a></li>
  14544. <li><a href="#index-related-reading-1259">related reading</a>: <a href="#References">References</a></li>
  14545. <li><a href="#index-release-1163">release</a>: <a href="#Release-Management">Release Management</a></li>
  14546. <li><a href="#index-RST-1257">RST</a>: <a href="#RST">RST</a></li>
  14547. <li><a href="#index-Scheme-1227">Scheme</a>: <a href="#Scheme">Scheme</a></li>
  14548. <li><a href="#index-scheme_002dformat_0040r_007b-flag_007d-77"><code>scheme-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14549. <li><a href="#index-scripting-languages-1171">scripting languages</a>: <a href="#Language-Implementors">Language Implementors</a></li>
  14550. <li><a href="#index-search-messages-in-a-catalog-626">search messages in a catalog</a>: <a href="#msggrep-Invocation">msggrep Invocation</a></li>
  14551. <li><a href="#index-selecting-message-language-41">selecting message language</a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  14552. <li><a href="#index-sentences-133">sentences</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14553. <li><a href="#index-setting-up-_0040code_007bgettext_007d-at-build-time-1168">setting up <code>gettext</code> at build time</a>: <a href="#Installers">Installers</a></li>
  14554. <li><a href="#index-setting-up-_0040code_007bgettext_007d-at-run-time-40">setting up <code>gettext</code> at run time</a>: <a href="#Locale-Environment-Variables">Locale Environment Variables</a></li>
  14555. <li><a href="#index-several-domains-1070">several domains</a>: <a href="#Ambiguities">Ambiguities</a></li>
  14556. <li><a href="#index-sex-1">sex</a>: <a href="#Introduction">Introduction</a></li>
  14557. <li><a href="#index-sh_002dformat_0040r_007b-flag_007d-67"><code>sh-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14558. <li><a href="#index-she_002c-he_002c-and-they-3">she, he, and they</a>: <a href="#Introduction">Introduction</a></li>
  14559. <li><a href="#index-shell-format-string-1206">shell format string</a>: <a href="#envsubst-Invocation">envsubst Invocation</a></li>
  14560. <li><a href="#index-shell-scripts-1175">shell scripts</a>: <a href="#sh">sh</a></li>
  14561. <li><a href="#index-Smalltalk-1229">Smalltalk</a>: <a href="#Smalltalk">Smalltalk</a></li>
  14562. <li><a href="#index-smalltalk_002dformat_0040r_007b-flag_007d-79"><code>smalltalk-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14563. <li><a href="#index-sorting-_0040code_007bmsgcat_007d-output-583">sorting <code>msgcat</code> output</a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  14564. <li><a href="#index-sorting-_0040code_007bmsgmerge_007d-output-316">sorting <code>msgmerge</code> output</a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  14565. <li><a href="#index-sorting-_0040code_007bmsgunfmt_007d-output-1049">sorting <code>msgunfmt</code> output</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14566. <li><a href="#index-sorting-output-of-_0040code_007bxgettext_007d-220">sorting output of <code>xgettext</code></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14567. <li><a href="#index-specifying-plural-form-in-a-PO-file-1091">specifying plural form in a PO file</a>: <a href="#Plural-forms">Plural forms</a></li>
  14568. <li><a href="#index-standard-output_002c-and-_0040code_007bmsgcat_007d-552">standard output, and <code>msgcat</code></a>: <a href="#msgcat-Invocation">msgcat Invocation</a></li>
  14569. <li><a href="#index-standard-output_002c-and-_0040code_007bmsgmerge_007d-program-286">standard output, and <code>msgmerge</code> program</a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  14570. <li><a href="#index-string-concatenation-136">string concatenation</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14571. <li><a href="#index-string-normalization-in-entries-388">string normalization in entries</a>: <a href="#Normalizing">Normalizing</a></li>
  14572. <li><a href="#index-style-131">style</a>: <a href="#Preparing-Strings">Preparing Strings</a></li>
  14573. <li><a href="#index-supported-languages_002c-_0040code_007bxgettext_007d-174">supported languages, <code>xgettext</code></a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14574. <li><a href="#index-Tcl-1242">Tcl</a>: <a href="#Tcl">Tcl</a></li>
  14575. <li><a href="#index-Tcl-mode_002c-and-_0040code_007bmsgfmt_007d-program-961">Tcl mode, and <code>msgfmt</code> program</a>: <a href="#msgfmt-Invocation">msgfmt Invocation</a></li>
  14576. <li><a href="#index-Tcl-mode_002c-and-_0040code_007bmsgunfmt_007d-program-1020">Tcl mode, and <code>msgunfmt</code> program</a>: <a href="#msgunfmt-Invocation">msgunfmt Invocation</a></li>
  14577. <li><a href="#index-tcl_002dformat_0040r_007b-flag_007d-91"><code>tcl-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14578. <li><a href="#index-template-PO-file-37">template PO file</a>: <a href="#Overview">Overview</a></li>
  14579. <li><a href="#index-testing-_0040file_007b_002epo_007d-files-for-equivalence-224">testing <samp><span class="file">.po</span></samp> files for equivalence</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14580. <li><a href="#index-Tk_0027s-scripting-language-1243">Tk's scripting language</a>: <a href="#Tcl">Tcl</a></li>
  14581. <li><a href="#index-translated-entries-393">translated entries</a>: <a href="#Translated-Entries">Translated Entries</a></li>
  14582. <li><a href="#index-translating-menu-entries-1079">translating menu entries</a>: <a href="#Contexts">Contexts</a></li>
  14583. <li><a href="#index-translation-aspects-13">translation aspects</a>: <a href="#Aspects">Aspects</a></li>
  14584. <li><a href="#index-Translation-Matrix-52">Translation Matrix</a>: <a href="#Installing-Localizations">Installing Localizations</a></li>
  14585. <li><a href="#index-Translation-Project-5">Translation Project</a>: <a href="#Why">Why</a></li>
  14586. <li><a href="#index-turning-off-NLS-support-1142">turning off NLS support</a>: <a href="#lib_002fgettext_002eh">lib/gettext.h</a></li>
  14587. <li><a href="#index-tutorial-of-_0040code_007bgettext_007d-usage-32">tutorial of <code>gettext</code> usage</a>: <a href="#Overview">Overview</a></li>
  14588. <li><a href="#index-unify-duplicate-translations-729">unify duplicate translations</a>: <a href="#msguniq-Invocation">msguniq Invocation</a></li>
  14589. <li><a href="#index-untranslated-entries-418">untranslated entries</a>: <a href="#Untranslated-Entries">Untranslated Entries</a></li>
  14590. <li><a href="#index-update-translations-from-a-compendium-533">update translations from a compendium</a>: <a href="#Using-Compendia">Using Compendia</a></li>
  14591. <li><a href="#index-upgrading-to-new-versions-of-_0040code_007bgettext_007d-1116">upgrading to new versions of <code>gettext</code></a>: <a href="#Prerequisites">Prerequisites</a></li>
  14592. <li><a href="#index-version-control-for-backup-files_002c-_0040code_007bmsgmerge_007d-290">version control for backup files, <code>msgmerge</code></a>: <a href="#msgmerge-Invocation">msgmerge Invocation</a></li>
  14593. <li><a href="#index-g_t_0040code_007bwxWidgets_007d-library-1239"><code>wxWidgets</code> library</a>: <a href="#wxWidgets">wxWidgets</a></li>
  14594. <li><a href="#index-g_t_0040code_007bxargs_007d_002c-and-output-from-_0040code_007bmsgexec_007d-914"><code>xargs</code>, and output from <code>msgexec</code></a>: <a href="#msgexec-Invocation">msgexec Invocation</a></li>
  14595. <li><a href="#index-g_t_0040code_007bxgettext_007d-program_002c-usage-160"><code>xgettext</code> program, usage</a>: <a href="#xgettext-Invocation">xgettext Invocation</a></li>
  14596. <li><a href="#index-g_t_0040code_007bxmodmap_007d-program_002c-and-typing-quotation-marks-275"><code>xmodmap</code> program, and typing quotation marks</a>: <a href="#Header-Entry">Header Entry</a></li>
  14597. <li><a href="#index-YaST2-scripting-language-1241">YaST2 scripting language</a>: <a href="#YCP">YCP</a></li>
  14598. <li><a href="#index-YCP-1240">YCP</a>: <a href="#YCP">YCP</a></li>
  14599. <li><a href="#index-ycp_002dformat_0040r_007b-flag_007d-89"><code>ycp-format</code><span class="roman"> flag</span></a>: <a href="#PO-Files">PO Files</a></li>
  14600. </ul> <div class="footnote">
  14601. <hr>
  14602. <a name="texinfo-footnotes-in-document"></a><h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> In this manual, all mentions of Emacs
  14603. refers to either GNU Emacs or to XEmacs, which people sometimes call FSF
  14604. Emacs and Lucid Emacs, respectively.</p>
  14605. <p class="footnote"><small>[<a name="fn-2" href="#fnd-2">2</a>]</small> This
  14606. limitation is not imposed by GNU <code>gettext</code>, but is for compatibility
  14607. with the <code>msgfmt</code> implementation on Solaris.</p>
  14608. <p class="footnote"><small>[<a name="fn-3" href="#fnd-3">3</a>]</small> Some
  14609. system, e.g. mingw, don't have <code>LC_MESSAGES</code>. Here we use a more or
  14610. less arbitrary value for it, namely 1729, the smallest positive integer
  14611. which can be represented in two different ways as the sum of two cubes.</p>
  14612. <p class="footnote"><small>[<a name="fn-4" href="#fnd-4">4</a>]</small> When the system does not support <code>setlocale</code> its behavior
  14613. in setting the locale values is simulated by looking at the environment
  14614. variables.</p>
  14615. <p class="footnote"><small>[<a name="fn-5" href="#fnd-5">5</a>]</small> Additions are welcome. Send appropriate information to
  14616. <a href="mailto:bug-gnu-gettext@gnu.org">bug-gnu-gettext@gnu.org</a> and <a href="mailto:bug-glibc-manual@gnu.org">bug-glibc-manual@gnu.org</a>.</p>
  14617. <hr></div>
  14618. </body></html>
  14619. <!--
  14620. 
  14621. Local Variables:
  14622. coding: utf-8
  14623. End:
  14624. -->