Thanks for contributing this project.
- Open Crowdin to start translating. If your language not show up, create an issue to add it.
- Read Corwdin documentation on how to translate.
- After you finished, wait for project owner to sync the translations.
- If you're translating markdown files in
src/locales/en/*.mdx
, create a Pull-request instead. - Ask for help in the Issues.
# locales/en.yaml
client.common.hello: >-
Hello {{name}}
server.common.hello: >-
Hello %s
client.plural_one: >-
item
client.plural_other: >-
items
# php
t('server.common.hello', ['Values' => ['Name']]);
t('client.plural', ['Count' => 1]); #-> item
t('client.plural', ['Count' => 2]); #-> items
// js
t('client.common.hello', { name: 'Name' })
t('client.plural', { count: 1 }) //-> item
t('client.plural', { count: 2 }) //-> items
client.*
keys are used in client side (JS), client.*
and server.*
keys are used in server side (PHP). Why:
- Client and server has different interpolation.
- Client can save 200K file size.