useNavigatorLanguage

About

Navigator Language hook for React.

Examples

import "./styles.css";
import { useNavigatorLanguage } from "rooks";

function App() {
  const language = useNavigatorLanguage();

  return (
    <div
      style={{ display: "flex", flexDirection: "column", alignItems: "center" }}
    >
      <h1>Rooks : useNavigatorLanguage example</h1>
      <p style={{ fontSize: "20px" }}>
        Language is <b>{language}</b>
      </p>
    </div>
  );
}

export default App;

Return value

A language (String) is returned.

Join the community!

Join our discord server! You can click the floating discord icon at the bottom right of the screen and chat with us!

Powered by vercel