Gentoo Archives: gentoo-user

From: wabenbau@×××××.com
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] LINGUAS issue
Date: Thu, 12 Nov 2015 18:28:19
Message-Id: 20151112192731.2797a446@hal9000.localdomain
In Reply to: [gentoo-user] LINGUAS issue by Francisco Ares
1 Francisco Ares <frares@×××××.com> wrote:
2
3 > Hi, all.
4 >
5 > My locale language is "pt_BR" (Brazilian Portuguese), and many
6 > applications now support native translations.
7 >
8 > And there is the "pt" possible LINGUAS entry, and there is no "pt_PT"
9 > (Portugal spoken Portuguese), for instance, neither any derivatives
10 > for other Portuguese speaking countries, which possibly have their
11 > own regional differences.
12
13 You can add locales by editing /etc/locale.gen and running locale-gen.
14 As i saw in /usr/share/i18n/SUPPORTED, pt_PT is supported.
15
16 > There are a few applications that do not distinguish "pt_BR" from
17 > "pt" and treat Portuguese language as simply "pt". An example is the
18 > OCR program "tesseract", that builds language specifics according to
19 > the LINGUAS environment variable.
20 >
21 > Is there a way for specifying particular "LINGUAS" for individual
22 > packages? I would not like to have to build dozens of applications to
23 > include "pt" to my "LINGUAS" definition just to have "tesseract" to
24 > include my native language support. I've found some old messages
25 > about this on the net, but did not get any real solution.
26
27 You can define package specific environment variables for package
28 builds in /etc/portage/env/
29
30 If you need package specific environment variables for runtime you
31 could create simple scripts to set the env and start the program.
32
33 #!/bin/sh
34 #
35 # start_tesseract.sh
36 #
37 LINGUAS="pt"
38 tesseract
39
40 Then modify the according menu entries / starter buttons to use the
41 script.
42
43 > Or should I ask the "tesseract" package maintainer to add "pt_BR" to
44 > the available options?
45
46 That's a good idea.
47
48 --
49 Regards
50 wabe