Components Language select
Petal Framework

Language select

A drop down to pick your language.

When a user selects a dropdown item, it will redirect to the same page but with the local parameter on the end, eg: /?locale=en.

Petal Pro comes with a plug designed to set the locale based on the users preferences. Once it detects the language being set in the params, it adds it as a cookie and remembers it.

How to access

Membership
$299
-> 
See plans

This comes with the Petal Framework private hex package. Purchase a membership to get access to this package. It can be used with any Phoenix project. Post-expiration, you'll retain access but won't be eligible for updates from newer versions.

Properties

          attr :current_path, :string
attr :current_locale, :string
attr :language_options, :list, doc: "list of maps with keys :locale, :flag (emoji), :label"