Skip to content

Need help with understanding plural format syntax and structuring code on SSR flow #130

Closed Answered by jarda-svoboda
aakash14goplani asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @aakash14goplani!

  1. Yes, this library supports ICU Message syntax as well - you just need to replace the default message parser by the ICU one - if needed, example here
    • If you want to use the default message syntax, i would use something like:
{{count:gt; 0:You have {{count:number;}} new {{count:gte; 1:message; 2:messages}}!; default:You don't have any messages..}}
  1. Splitting between server and client layouts provides higher efficiency loading your translation definitions. The idea is to load them during the SSR only on the first visit. Then translation definitions are passed to the layout data and added using addTranslations on the client side so it's not necessary to trigger anoth…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aakash14goplani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants