JGMENU-I18N(1)

✨ JGMENU-I18N ✨

okay so bestie, this is the jgmenu-i18n manual page (section 1 of the jgmenu family, iykyk) and it's literally all about making your jgmenu speak every language πŸ’…


🌸 NAME 🌸

jgmenu-i18n β€” the lil helper that supports translation of jgmenu flavoured CSV menu data πŸ¦‹


⭐ SYNOPSIS ⭐

jgmenu_run i18n <translation-file>

jgmenu_run i18n --init [<translation-file>]

πŸ’– DESCRIPTION πŸ’–

jgmenu_run i18n reads jgmenu flavoured CSV menu data from stdin and then either translates it, or creates a po style translation file. that's the whole vibe ✨

the <translation-file> argument can be a file or a directory. if it's a directory (the latter case, bestie, keep up 🫢), translation files get searched for in that directory based on the environment variable $LANG. and here's the tea: $LANG is assumed to be in the format ll_CC.UTF8, where:

  • ll is an ISO 639 two-letter language code 🌍
  • CC is an ISO 3166 two-letter country code 🌎

files named ll_CC and ll will be used in said order (so ll_CC first, then ll β€” order matters, no cap) πŸ“‹


πŸŽ€ OPTIONS πŸŽ€

  • --init β€” creates a template po style translation file with blank msgid entries. it's giving "blank canvas, your turn to fill it in" 🎨

🌈 EXAMPLES 🌈

🧚 Create translation file template for manual translation

modules jgmenu-apps(1) and jgmenu-ob(1) have built-in i18n support. to use this feature, you need a translation file. here are the examples of how a translation file can be created:

Example 1.

jgmenu_run ob | jgmenu_run i18n --init >sv

Example 2.

jgmenu_run i18n --init <prepend.csv >sv

the result of the above commands would be a skeleton translation file (sv in this case) containing entries like this:

msgid "Web Browser"
msgstr ""

then you manually translate the empty msgstr fields. that's it, that's the job β€” go be the main character of localization πŸ‘‘

πŸ’œ Use translation file

if you're using modules jgmenu-apps(1) or jgmenu-ob(1), just set csv_i18n in jgmenurc to directly point to a translation-file or a directory containing translation files. easy slay πŸ’…

in special circumstances (iykyk, sometimes the plumbing gets fancy), you may wish to include i18n in command plumbing. here's an example of how this could be constructed:

<csv-generating-command> \
    | jgmenu_run i18n <translation-file> \
    | jgmenu --vsimple

🫢 AUTHORS 🫢

Johan Malm.


and that's the whole page bestie, no notes πŸ’–

this iconic piece of documentation is brought to you by the jgmenu-i18n manual, dated 15 February, 2020 β€” the JGMENU-I18N(1) era, fr fr βœ¨πŸŽ€