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";
13
13
import StaticCodeContainer from " ../../components/StaticCodeContainer.astro" ;
14
14
15
15
<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.
20
19
</HookDescription >
21
20
22
21
<div class = " reference" >
@@ -25,7 +24,7 @@ import StaticCodeContainer from "../../components/StaticCodeContainer.astro";
25
24
<div class = " table-container" >
26
25
| Name | Type | Description |
27
26
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
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. |
29
28
</div >
30
29
</div >
31
30
You can’t perform that action at this time.
0 commit comments