Localization
Django backend
use builtin django localization
# use gettext to retrieve texts
from django.utils.translation import gettext_lazy as _
# get text using
django-admin makemessages -a
# compile with
django-admin compilemessages
Frontend
This build using next-i18next for localization, please refer to the docs for more information about this. With following convention :
Every translation must put inside the same file_name.json
These are the ground rules;
Translating
component/askChat/askChatIndexthe file must becomp.askChat.askChatIndex.json. Withcompis abbrev for component.Merging translation can be done within the folder. For example
com.askChat.jsonmeans all translation for foldercomponent/askChat/*wil be merged on it.With the exception files in
pages/directory not needed to add parent folder. For examplepages/exclusive/loginthe file should beexclusive.login.jsonIf the file is parameter use the param name for example
qna/[id].jsthen the file isqna.id.param.js. This will prevent a case where there is pages withidand param[id].