muerwre.github.io/docs/golang/i18n-in-golang/_payload.js
2023-12-27 17:27:07 +00:00

1 line
No EOL
28 KiB
JavaScript

export default (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT,aU,aV,aW,aX,aY,aZ,a_,a$,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq){return {data:{navigation:[{title:"Blockchain",_path:"\u002Fblockchain",children:[{title:"Common Typescript Examples",_path:"\u002Fblockchain\u002Fcommon-typescript-examples"},{title:"Smart Contracts",_path:"\u002Fblockchain\u002Fsmart-contracts"}]},{title:"Css",_path:"\u002Fcss",children:[{title:"Automatic Grid Like Masonry With Pure CSS",_path:"\u002Fcss\u002Fautomatic-grid-like-masonry-with-pure-css"},{title:"Sass Nth Child Iterate Mixin",_path:"\u002Fcss\u002Fsass-nth-child-iterate-mixin"},{title:"Test If Browser Supports CSS Rules",_path:"\u002Fcss\u002Ftest-if-browser-supports-css-rules"}]},{title:"Docker",_path:"\u002Fdocker",children:[{title:"Building Static Pages With Docker",_path:"\u002Fdocker\u002Fbuilding-static-pages-with-docker"},{title:"Common Things With Docker Mailserver",_path:"\u002Fdocker\u002Fcommon-things-with-docker-mailserver"},{title:"Drone Ci",_path:"\u002Fdocker\u002Fdrone-ci"},{title:"Github Pages With Drone Ci",_path:"\u002Fdocker\u002Fgithub-pages-with-drone-ci"},{title:"Private Docker Registry",_path:"\u002Fdocker\u002Fprivate-docker-registry"},{title:"Refresh Containers On Pull",_path:"\u002Fdocker\u002Frefresh-containers-on-pull"},{title:"Seed Dump Inside Docker",_path:"\u002Fdocker\u002Fseed-dump-inside-docker"},{title:"Wait For Mysql",_path:"\u002Fdocker\u002Fwait-for-mysql"},{title:"Wait For Redis",_path:"\u002Fdocker\u002Fwait-for-redis"}]},{title:"Frontend",_path:"\u002Ffrontend",children:[{title:"React Native",_path:"\u002Ffrontend\u002Freact-native",children:[{title:"OAuth2 Login",_path:"\u002Ffrontend\u002Freact-native\u002Foauth2-login"},{title:"Preserve FlatList Scroll Position In React Native",_path:"\u002Ffrontend\u002Freact-native\u002Fpreserve-flatlist-scroll-position-in-react-native"},{title:"Useful Comands",_path:"\u002Ffrontend\u002Freact-native\u002Fuseful-comands"}]},{title:"React",_path:"\u002Ffrontend\u002Freact",children:[{title:"Axios Refresh Token On React",_path:"\u002Ffrontend\u002Freact\u002Faxios-refresh-token-on-react"},{title:"Axios With AbortController",_path:"\u002Ffrontend\u002Freact\u002Faxios-with-abortcontroller"},{title:"Detect Hook Deps Changes With UseWhatsChanged",_path:"\u002Ffrontend\u002Freact\u002Fdetect-hook-deps-changes-with-usewhatschanged"}]},{title:"Vue",_path:"\u002Ffrontend\u002Fvue",children:[{title:"Adding Global Properties To Component",_path:"\u002Ffrontend\u002Fvue\u002Fadding-global-properties-to-component"},{title:"Make Nuxt Handle Obsidian Highlights",_path:"\u002Ffrontend\u002Fvue\u002Fmake-nuxt-handle-obsidian-highlights"}]},{title:"Webgl",_path:"\u002Ffrontend\u002Fwebgl",children:[{title:"Basics Of WebGL (Drawing A Cube)",_path:"\u002Ffrontend\u002Fwebgl\u002Fbasics-of-webgl-(drawing-a-cube)"},{title:"Fragment Shaders",_path:"\u002Ffrontend\u002Fwebgl\u002Ffragment-shaders"},{title:"Rendering Without Blocking In A Worker",_path:"\u002Ffrontend\u002Fwebgl\u002Frendering-without-blocking-in-a-worker"},{title:"Vertex Shaders",_path:"\u002Ffrontend\u002Fwebgl\u002Fvertex-shaders"}]}]},{title:"Git",_path:"\u002Fgit",children:[{title:"Force Git To Use HTTPS",_path:"\u002Fgit\u002Fforce-git-to-use-https"},{title:"Git Aliases And Useful Commands",_path:"\u002Fgit\u002Fgit-aliases-and-useful-commands"}]},{title:"Golang",_path:"\u002Fgolang",children:[{title:V,_path:W}]},{title:"Graphql",_path:"\u002Fgraphql",children:[{title:"Apollo Client Pagination",_path:"\u002Fgraphql\u002Fapollo-client-pagination"},{title:"Refresh Token In Apollo Client",_path:"\u002Fgraphql\u002Frefresh-token-in-apollo-client"}]},{title:"Linux",_path:"\u002Flinux",children:[{title:"Find Out Who Uses Swap",_path:"\u002Flinux\u002Ffind-out-who-uses-swap"},{title:"Fixing Lagging USB Headphones",_path:"\u002Flinux\u002Ffixing-lagging-usb-headphones"},{title:"Gitea For Git Hosting",_path:"\u002Flinux\u002Fgitea-for-git-hosting"},{title:"Google Photos Alternative With Photoprism",_path:"\u002Flinux\u002Fgoogle-photos-alternative-with-photoprism"},{title:"Linux On Asus Zenbook UM3402 YA",_path:"\u002Flinux\u002Flinux-on-asus-zenbook-um3402-ya"},{title:"Resume Or Start Screen Session",_path:"\u002Flinux\u002Fresume-or-start-screen-session"},{title:"Rsync File With SSH",_path:"\u002Flinux\u002Frsync-file-with-ssh"},{title:"Setting Up NGINX",_path:"\u002Flinux\u002Fsetting-up-nginx"},{title:"SSH",_path:"\u002Flinux\u002Fssh"}]},{title:"Obsidian",_path:"\u002Fobsidian",children:[{title:"Self Hosted Obsidian Sync With CouchDB",_path:"\u002Fobsidian\u002Fself-hosted-obsidian-sync-with-couchdb"}]},{title:"Sql",_path:"\u002Fsql",children:[{title:"MySQL And MariaDB Setup",_path:"\u002Fsql\u002Fmysql-and-mariadb-setup"},{title:"Postgress Setup",_path:"\u002Fsql\u002Fpostgress-setup"}]},{title:"Typescript",_path:"\u002Ftypescript",children:[{title:"Add Global Variable To Window",_path:"\u002Ftypescript\u002Fadd-global-variable-to-window"},{title:"Flatten Object With Periods",_path:"\u002Ftypescript\u002Fflatten-object-with-periods"},{title:"Type Guards",_path:"\u002Ftypescript\u002Ftype-guards"}]}],"content-query-jPHqVKRuVS":{_path:W,_dir:"golang",_draft:I,_partial:I,_locale:"en",_empty:I,title:V,description:"There are no good examples of golang.org\u002Fx\u002Ftext uses and description of how pluralization made. So, this is it.",excerpt:{type:X,children:[{type:a,tag:i,props:{},children:[{type:b,value:Y},{type:a,tag:m,props:{href:Z,rel:[n]},children:[{type:b,value:_}]},{type:b,value:$}]},{type:a,tag:s,props:{id:aa},children:[{type:b,value:ab}]},{type:a,tag:ac,props:{},children:[{type:a,tag:i,props:{},children:[{type:b,value:ad},{type:a,tag:m,props:{href:ae,rel:[n]},children:[{type:b,value:af}]},{type:b,value:ag}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ah}]},{type:a,tag:h,props:{code:J,language:w},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:b,value:J}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:K}]},{type:b,value:aj}]},{type:a,tag:h,props:{code:L,language:x},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:b,value:L}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ak},{type:a,tag:f,props:{},children:[{type:b,value:al}]},{type:b,value:am},{type:a,tag:f,props:{},children:[{type:b,value:an}]},{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:y}]},{type:a,tag:s,props:{id:aq},children:[{type:b,value:ar}]},{type:a,tag:i,props:{},children:[{type:b,value:as},{type:a,tag:f,props:{},children:[{type:b,value:M}]},{type:b,value:at},{type:a,tag:f,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:f,props:{},children:[{type:b,value:aw}]},{type:b,value:ax},{type:a,tag:f,props:{},children:[{type:b,value:ay}]},{type:b,value:az},{type:a,tag:c,props:{className:[aA]},children:[{type:b,value:aB}]},{type:b,value:aC},{type:a,tag:f,props:{},children:[{type:b,value:aD}]},{type:b,value:y}]},{type:a,tag:i,props:{},children:[{type:b,value:aE},{type:a,tag:m,props:{href:z,rel:[n]},children:[{type:b,value:aF}]},{type:b,value:aG}]},{type:a,tag:A,props:{},children:[{type:a,tag:t,props:{},children:[{type:a,tag:f,props:{},children:[{type:b,value:aH}]},{type:b,value:aI},{type:a,tag:f,props:{},children:[{type:b,value:aJ}]},{type:b,value:aK},{type:a,tag:f,props:{},children:[{type:b,value:aL}]},{type:b,value:aM}]},{type:a,tag:t,props:{},children:[{type:a,tag:f,props:{},children:[{type:b,value:aN}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aO}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aP}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aQ}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aR}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aS}]},{type:b,value:aT}]}]},{type:a,tag:h,props:{code:N,language:aU},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:b,value:N}]}]}]},{type:a,tag:s,props:{id:aV},children:[{type:b,value:aW}]},{type:a,tag:i,props:{},children:[{type:b,value:aX},{type:a,tag:f,props:{},children:[{type:b,value:aY}]},{type:b,value:aZ}]},{type:a,tag:h,props:{code:O,language:w},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:b,value:O}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:a_}]},{type:a,tag:h,props:{code:P,language:x},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:b,value:P}]}]}]},{type:a,tag:s,props:{id:a$},children:[{type:b,value:ba}]},{type:a,tag:A,props:{},children:[{type:a,tag:t,props:{},children:[{type:a,tag:m,props:{href:z,rel:[n]},children:[{type:b,value:bb}]}]},{type:a,tag:t,props:{},children:[{type:a,tag:m,props:{href:bc,rel:[n]},children:[{type:b,value:bd}]}]}]}]},body:{type:X,children:[{type:a,tag:i,props:{},children:[{type:b,value:Y},{type:a,tag:m,props:{href:Z,rel:[n]},children:[{type:b,value:_}]},{type:b,value:$}]},{type:a,tag:s,props:{id:aa},children:[{type:b,value:ab}]},{type:a,tag:ac,props:{},children:[{type:a,tag:i,props:{},children:[{type:b,value:ad},{type:a,tag:m,props:{href:ae,rel:[n]},children:[{type:b,value:af}]},{type:b,value:ag}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ah}]},{type:a,tag:h,props:{code:J,language:w},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:B},children:[{type:b,value:"import"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" ("}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:be},children:[{type:b,value:Q}]},{type:a,tag:c,props:{class:C},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:bf},children:[{type:b,value:"golang.org\u002Fx\u002Ftext\u002Flanguage"}]},{type:a,tag:c,props:{class:C},children:[{type:b,value:v}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:be},children:[{type:b,value:Q}]},{type:a,tag:c,props:{class:C},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:bf},children:[{type:b,value:"golang.org\u002Fx\u002Ftext\u002Fmessage"}]},{type:a,tag:c,props:{class:C},children:[{type:b,value:v}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:bg}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:R},children:[{type:b,value:"lang"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:B},children:[{type:b,value:S}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" language."}]},{type:a,tag:c,props:{class:T},children:[{type:b,value:"MustParse"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:bh}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bi}]},{type:a,tag:c,props:{class:"ct-2891df"},children:[{type:b,value:K}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bi}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:bg}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:R},children:[{type:b,value:"printer"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:B},children:[{type:b,value:S}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:" message."}]},{type:a,tag:c,props:{class:T},children:[{type:b,value:"NewPrinter"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:"(lang)"}]}]},{type:a,tag:c,props:{class:e},children:[]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:R},children:[{type:b,value:"count"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:B},children:[{type:b,value:S}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:D}]},{type:a,tag:c,props:{class:bj},children:[{type:b,value:bk}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"printer."}]},{type:a,tag:c,props:{class:T},children:[{type:b,value:"Sprintf"}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:bh}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:v}]},{type:a,tag:c,props:{class:"ct-ebe6d6"},children:[{type:b,value:"%d"}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:" butterflies\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:", count)"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ai},{type:a,tag:f,props:{},children:[{type:b,value:K}]},{type:b,value:aj}]},{type:a,tag:h,props:{code:L,language:x},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"gotext -srclang=en-GB update -lang=ru-RU \\"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" -out=translations.go github.com\u002Fpath\u002Fto-output-folder"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:ak},{type:a,tag:f,props:{},children:[{type:b,value:al}]},{type:b,value:am},{type:a,tag:f,props:{},children:[{type:b,value:an}]},{type:b,value:ao},{type:a,tag:f,props:{},children:[{type:b,value:ap}]},{type:b,value:y}]},{type:a,tag:s,props:{id:aq},children:[{type:b,value:ar}]},{type:a,tag:i,props:{},children:[{type:b,value:as},{type:a,tag:f,props:{},children:[{type:b,value:M}]},{type:b,value:at},{type:a,tag:f,props:{},children:[{type:b,value:au}]},{type:b,value:av},{type:a,tag:f,props:{},children:[{type:b,value:aw}]},{type:b,value:ax},{type:a,tag:f,props:{},children:[{type:b,value:ay}]},{type:b,value:az},{type:a,tag:c,props:{className:[aA]},children:[{type:b,value:aB}]},{type:b,value:aC},{type:a,tag:f,props:{},children:[{type:b,value:aD}]},{type:b,value:y}]},{type:a,tag:i,props:{},children:[{type:b,value:aE},{type:a,tag:m,props:{href:z,rel:[n]},children:[{type:b,value:aF}]},{type:b,value:aG}]},{type:a,tag:A,props:{},children:[{type:a,tag:t,props:{},children:[{type:a,tag:f,props:{},children:[{type:b,value:aH}]},{type:b,value:aI},{type:a,tag:f,props:{},children:[{type:b,value:aJ}]},{type:b,value:aK},{type:a,tag:f,props:{},children:[{type:b,value:aL}]},{type:b,value:aM}]},{type:a,tag:t,props:{},children:[{type:a,tag:f,props:{},children:[{type:b,value:aN}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aO}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aP}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aQ}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aR}]},{type:b,value:p},{type:a,tag:f,props:{},children:[{type:b,value:aS}]},{type:b,value:aT}]}]},{type:a,tag:h,props:{code:N,language:aU},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"{"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:bl}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bm}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"message\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bm}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:M}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:Q}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"select\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"feature\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"plural\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"arg\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bn}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"cases\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"one\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"{Count} бабочка\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"few\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"{Count} бабочки\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"many\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"{Count} бабочек\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:U}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:F}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"other\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:u}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:G}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:H}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"{Count} бабочуль\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" }"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:bo}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" },"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:E}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"placeholders\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:": ["}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" {"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:bl}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bn}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"string\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"%[1]d\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"type\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bp}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"underlyingType\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:bp}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"argNum\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:bj},children:[{type:b,value:bk}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:q}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:r}]},{type:a,tag:c,props:{class:g},children:[{type:b,value:"\"expr\""}]},{type:a,tag:c,props:{class:d},children:[{type:b,value:k}]},{type:a,tag:c,props:{class:j},children:[{type:b,value:"\"count\""}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:bo}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:" ]"}]}]},{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"},"}]}]}]}]}]},{type:a,tag:s,props:{id:aV},children:[{type:b,value:aW}]},{type:a,tag:i,props:{},children:[{type:b,value:aX},{type:a,tag:f,props:{},children:[{type:b,value:aY}]},{type:b,value:aZ}]},{type:a,tag:h,props:{code:O,language:w},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:"ct-e81ade"},children:[{type:b,value:"\u002F\u002Fgo:generate gotext -srclang=en-GB update -out=translations.go -lang=ru-RU github.com\u002Fmuerwre\u002Fvault-golang\u002Finternal\u002Fapi"}]}]}]}]}]},{type:a,tag:i,props:{},children:[{type:b,value:a_}]},{type:a,tag:h,props:{code:P,language:x},children:[{type:a,tag:o,props:{},children:[{type:a,tag:h,props:{__ignoreMap:l},children:[{type:a,tag:c,props:{class:e},children:[{type:a,tag:c,props:{class:d},children:[{type:b,value:"go generate .\u002F..."}]}]}]}]}]},{type:a,tag:s,props:{id:a$},children:[{type:b,value:ba}]},{type:a,tag:A,props:{},children:[{type:a,tag:t,props:{},children:[{type:a,tag:m,props:{href:z,rel:[n]},children:[{type:b,value:bb}]}]},{type:a,tag:t,props:{},children:[{type:a,tag:m,props:{href:bc,rel:[n]},children:[{type:b,value:bd}]}]}]},{type:a,tag:"style",children:[{type:b,value:".ct-e81ade{color:#8B949E}.ct-0dacf2{color:#79C0FF}.ct-ebe6d6{color:#79C0FF}.ct-82e32d{color:#79C0FF}.ct-2891df{color:#FFA198}.ct-1e836b{color:#A5D6FF}.ct-91dbaa{color:#79C0FF}.ct-3ccebd{color:#C9D1D9}.ct-b637b2{color:#FFA657}.ct-03e448{color:#A5D6FF}.ct-d55d13{color:#C9D1D9}.ct-13cb8b{color:#C9D1D9}.ct-d75569{color:#FF7B72}.light .ct-d75569{color:#859900}.light .ct-13cb8b{color:#657B83}.light .ct-d55d13{color:#657B83}.light .ct-03e448{color:#2AA198}.light .ct-b637b2{color:#2AA198}.light .ct-3ccebd{color:#268BD2}.light .ct-91dbaa{color:#268BD2}.light .ct-1e836b{color:#2AA198}.light .ct-2891df{color:#CD3131}.light .ct-82e32d{color:#D33682}.light .ct-ebe6d6{color:#CB4B16}.light .ct-0dacf2{color:#859900}.light .ct-e81ade{color:#93A1A1}"}]}],toc:{title:l,searchDepth:bq,depth:bq,links:[]}},_type:"markdown",_id:"content:Golang:i18n in golang.md",_source:"content",_file:"Golang\u002Fi18n in golang.md",_extension:"md"}},prerenderedAt:1703697992482}}("element","text","span","ct-13cb8b","line","code-inline","ct-0dacf2","code","p","ct-1e836b",": ","","a","nofollow","pre"," | ",","," ","h4","li",": {","\"","go","shell",".","https:\u002F\u002Fgithub.com\u002Fgolang\u002Ftext\u002Fblob\u002Fmaster\u002Ffeature\u002Fplural\u002Fgen_common.go#L19","ul","ct-d75569","ct-03e448"," "," "," "," ","\"msg\"",false,"import (\n \"golang.org\u002Fx\u002Ftext\u002Flanguage\"\n \"golang.org\u002Fx\u002Ftext\u002Fmessage\"\n)\n\nlang := language.MustParse('ru-RU')\nprinter := message.NewPrinter(lang)\n\ncount := 1\nprinter.Sprintf(\"%d butterflies\", count)\n","ru-RU","gotext -srclang=en-GB update -lang=ru-RU \\\n -out=translations.go github.com\u002Fpath\u002Fto-output-folder\n","\"translation\"","{\n \"id\": \"{Count} butterflies\",\n \"message\": \"{Count} butterflies\",\n \"translation\": {\n \"select\": {\n \"feature\": \"plural\",\n \"arg\": \"Count\",\n \"cases\": {\n \"one\": {\n \"msg\": \"{Count} бабочка\"\n },\n \"few\": {\n \"msg\": \"{Count} бабочки\"\n },\n \"many\": {\n \"msg\": \"{Count} бабочек\"\n },\n \"other\": {\n \"msg\": \"{Count} бабочуль\"\n }\n }\n }\n },\n \"placeholders\": [\n {\n \"id\": \"Count\",\n \"string\": \"%[1]d\",\n \"type\": \"int\",\n \"underlyingType\": \"int\",\n \"argNum\": 1,\n \"expr\": \"count\"\n }\n ]\n},\n","\u002F\u002Fgo:generate gotext -srclang=en-GB update -out=translations.go -lang=ru-RU github.com\u002Fmuerwre\u002Fvault-golang\u002Finternal\u002Fapi\n","go generate .\u002F...\n"," ","ct-3ccebd",":=","ct-91dbaa"," },","I18n In Golang","\u002Fgolang\u002Fi18n-in-golang","root","There are no good examples of ","https:\u002F\u002Fgolang.org\u002Fx\u002Ftext","golang.org\u002Fx\u002Ftext"," uses and description of how pluralization made. So, this is it.","generating-translations","Generating translations","blockquote","You should specify valid ","https:\u002F\u002Fwww.iso.org\u002Fobp\u002Fui\u002F#iso:code:3166","ISO-3166 locale code"," to get plurals working!","Write your code:","Then run generator for your locale (mine is ","):","This will generate ","out.gotext.json"," in ","\u002Fpath\u002Fto-output-folder\u002Fru-RU"," of your project. Copy it to ","messages.out.json","translating-and-adding-plural-forms","Translating and adding plural forms","Change "," value in generated ","messages.gotext.json"," to ","string"," or ","object"," of the form shown below if you want pluralize strings, ","highlight","then run gotext command again",", it will generate ",".go files with translations","According to ","source files of gen_common",", there's a couple of forms:","=N",", ","!=N",", ","%N"," for exact matches","zero","one","two","few","many","other"," - they're different for each language, so,","json","using-go-generate","Using go-generate","Write this at some ",".go"," file:","Then run go generation:","useful-links","Useful links","All available forms in this .go file","https:\u002F\u002Fcommunity.crowdin.com\u002Ft\u002Fplurals-in-gotext-json-files\u002F600","Answer, that solved it for me","ct-d55d13","ct-b637b2",")","(","'","ct-82e32d","1","\"id\"","\"{Count} butterflies\"","\"Count\""," }","\"int\"",2))