Skip to content

deepak-chandani/Language_Switching_Context_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Language Switching using Context_API.

Overview

  • utilze ReactJS Context API & hooks to build a Language Switching feature
  • translations are kept inside json file (eg: en.json, es.json)
  • english language is used by default & once translations are loaded then they are cached to prevent unnecessary Http request
  • build custom hook useLocale, LocaleProvider & LocaleContext