{
    "content": [
        {
            "type": "text",
            "text": "# I18N::LangTags::Detect (perldoc)\n\n**Summary:** I18N::LangTags::Detect - detect the user's language preferences\n\n**Synopsis:** use I18N::LangTags::Detect;\nmy @userwants = I18N::LangTags::Detect::detect();\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (2 lines)\n- **FUNCTIONS** (17 lines)\n- **ENVIRONMENT** (6 lines)\n- **SEE ALSO** (5 lines)\n- **COPYRIGHT** (9 lines)\n- **AUTHOR** (2 lines)\n\n## Full Content\n\n### NAME\n\nI18N::LangTags::Detect - detect the user's language preferences\n\n### SYNOPSIS\n\nuse I18N::LangTags::Detect;\nmy @userwants = I18N::LangTags::Detect::detect();\n\n### DESCRIPTION\n\nIt is a common problem to want to detect what language(s) the user would prefer output in.\n\n### FUNCTIONS\n\nThis module defines one public function, \"I18N::LangTags::Detect::detect()\". This function is\nnot exported (nor is even exportable), and it takes no parameters.\n\nIn scalar context, the function returns the most preferred language tag (or undef if no\npreference was seen).\n\nIn list context (which is usually what you want), the function returns a (possibly empty) list\nof language tags representing (best first) what languages the user apparently would accept\noutput in. You will probably want to pass the output of this through\n\"I18N::LangTags::implicatesuperstightly(...)\" or \"I18N::LangTags::implicatesupers(...)\", like\nso:\n\nmy @languages =\nI18N::LangTags::implicatesuperstightly(\nI18N::LangTags::Detect::detect()\n);\n\n### ENVIRONMENT\n\nThis module looks at several environment variables: REQUESTMETHOD, HTTPACCEPTLANGUAGE,\nLANGUAGE, LCALL, LCMESSAGES, and LANG.\n\nIt will also use the Win32::Locale module, if it's installed and IGNOREWIN32LOCALE is not set\nto a true value in the environment.\n\n### SEE ALSO\n\nI18N::LangTags, Win32::Locale, Locale::Maketext.\n\n(This module's core code started out as a routine in Locale::Maketext; but I moved it here once\nI realized it was more generally useful.)\n\n### COPYRIGHT\n\nCopyright (c) 1998-2004 Sean M. Burke. All rights reserved.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nThe programs and documentation in this dist are distributed in the hope that they will be\nuseful, but without any warranty; without even the implied warranty of merchantability or\nfitness for a particular purpose.\n\n### AUTHOR\n\nSean M. Burke \"sburke@cpan.org\"\n\n"
        }
    ],
    "structuredContent": {
        "command": "I18N::LangTags::Detect",
        "section": "",
        "mode": "perldoc",
        "summary": "I18N::LangTags::Detect - detect the user's language preferences",
        "synopsis": "use I18N::LangTags::Detect;\nmy @userwants = I18N::LangTags::Detect::detect();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ]
    }
}