shower / cli

Command line interface for Shower
Other
35 stars 6 forks source link

Add the lang option #50

Open pepelsbey opened 4 years ago

pepelsbey commented 4 years ago

Something like this:

<!DOCTYPE html>
<html lang="<%= lang %>">

It’s important to have a proper language set.

mrdimidium commented 4 years ago

Yes, that sounds great. What do you think this menu item should look like?

pepelsbey commented 4 years ago

Something like

? Select language
❯ English
  Russian
  Custom…

That would give you lang="en" or lang="ru. In “Custom…” case you’ll be prompted to enter either language name or language code, depending on how you’re planning to implement it.

mrdimidium commented 4 years ago

There are a few details that I would like to consult about.

  1. Should the default language be English, or maybe the current system language?
  2. Whether to validate the language that the user enters in the custom? Probably by bcp47
pepelsbey commented 4 years ago

It depends on how much time you want to spend working on this feature :) You can always just go for En, Ru, Custom… and keep developers responsible for their choice.

But as the next enhancement I’d validate the Custom value and only then work on guessing the default option.