Components Language select
Petal Pro

Language select

A drop down to pick your language.
heex

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 Petal Pro. 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

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