Skip to content

we need a getCookieLocale, getQueryLocale ... without throwing so i can chain logic and make fallbacks #7

@lord007tn

Description

@lord007tn

Clear and concise description of the problem

the getCookieLocal, getQueryLocale, getHeaderLocale always throw if no local found

i want to make a logic that check firstly for the query and then the cookies or the header

how can i achieve that without a long chain of tryandcatch

Suggested solution

provide an other functions like tryQueryLocale, tryHeaderLocale
that returns null or undefined and don't throw anything

make an option to the current functions to make it throw or not an error

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIncludes new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions