.\" Automatically generated by Pandoc 2.2.1 .\" .TH "JGMENU\-I18N" "1" "15 February, 2020" "" "" .hy .SH NAME .PP jgmenu\-i18n \- support translation of jgmenu flavoured CSV menu data .SH SYNOPSIS .PP jgmenu_run i18n <\f[I]translation\-file\f[]> .PP jgmenu_run i18n \-\-init [<\f[I]translation\-file\f[]>] .SH DESCRIPTION .PP \f[C]jgmenu_run\ i18n\f[] reads jgmenu flavoured CSV menu data from stdin and either translates it, or creates a po style translation file .PP The <\f[I]translation\-file\f[]> argument can be a file or directory. If it is the latter, translation files will be searched for in this directory based on the environment variable $LANG, which will be assumed to be in the format \f[C]ll_CC.UTF8\f[] where \f[C]ll\f[] is an ISO 639 two\-letter language code and \f[C]CC\f[] is an ISO 3166 two\-letter country code. Files named \f[C]ll_CC\f[] and \f[C]ll\f[] will be used in said order. .SH OPTIONS .TP .B \f[C]\-\-init\f[] Create a template po style translation file with blank msgid entries .RS .RE .SH EXAMPLES .SS Create translation file template for manual translation .PP Modules jgmenu\-apps(1) and jgmenu\-ob(1) have built\-in i18n support. In order to use this features, a translation file is required. Here follow examples of how a translation file can be created: .PP Example 1. .IP .nf \f[C] jgmenu_run\ ob\ |\ jgmenu_run\ i18n\ \-\-init\ >sv \f[] .fi .PP Example 2. .IP .nf \f[C] jgmenu_run\ i18n\ \-\-init\ sv \f[] .fi .PP The result of the above commands would be a skeleton translation file (\f[C]sv\f[] in this case) containing entries like this: .IP .nf \f[C] msgid\ "Web\ Browser" msgstr\ "" \f[] .fi .PP Manually translate the empty msgstr fields. .SS Use translation file .PP If using modules jgmenu\-apps(1) or jgmenu\-ob(1), just set \f[C]csv_i18n\f[] in jgmenurc to directly point to a translation\-file or a directory containing translation files. .PP In special circumstances, you may wish to include i18n in command plumbing. Here follow an example of how this could be constructed: .IP .nf \f[C] \ \\ \ \ \ \ |\ jgmenu_run\ i18n\ \ \\ \ \ \ \ |\ jgmenu\ \-\-vsimple \f[] .fi .SH AUTHORS Johan Malm.