File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
usehooks.com/src/content/hooks Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,9 @@ import HookDescription from "../../components/HookDescription.astro";
1313import StaticCodeContainer from " ../../components/StaticCodeContainer.astro" ;
1414
1515<HookDescription name = { frontmatter .name } >
16- Basically, what this hook does is that, it takes a parameter with value true
17- or false and toggles that value to opposite. It's useful when we want to take
18- some action into it's opposite action, for example: show and hide modal, show
19- more/show less text, open/close side menu.
16+ The usePreferredLanguage hook automatically adapts to the preferred language
17+ of the user. The hook reactively returns a string that represents the
18+ preferred language of the user, as set in the browser settings.
2019</HookDescription >
2120
2221<div class = " reference" >
@@ -25,7 +24,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
2524 <div class = " table-container" >
2625 | Name | Type | Description |
2726 | ------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
28- | preferredLang | string | The hook returns a string that represents the preferred language of the user, as set in the browser settings. |
27+ | language | string | The hook returns a string that represents the preferred language of the user, as set in the browser settings. |
2928 </div >
3029</div >
3130
You can’t perform that action at this time.
0 commit comments