Skip to content

Commit 4e0ab15

Browse files
authored
Merge pull request #171 from uidotdev/copy-update
Update usePreferredLanguage.mdx
2 parents 812cdd9 + 3acae06 commit 4e0ab15

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

usehooks.com/src/content/hooks/usePreferredLanguage.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ import HookDescription from "../../components/HookDescription.astro";
1313
import 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

0 commit comments

Comments
 (0)