summaryrefslogtreecommitdiffstats
path: root/build_tools/larch8/larch0/profiles/linhes-remote-testing-i686/post_process/locale.py
blob: 70cfcbd6dc7f2bf7e65fb563b0b976d0d8a653c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def genlocale():
    #logging.info("Generating locales")
    locale_list=[ "en_US ISO-8859-1", "en_US.UTF-8 UTF-8" , "de_DE.UTF-8", "da_DK.utf8", "en_DK.utf8", "it_IT.utf8", "de_DE.UTF-8"]
    #locale_list=['UTF-8', 'en_US ISO-8859-1']

    localefile="/etc/locale.gen" 
    f = open(localefile)
    lines = f.readlines()
    f.close()

    f = open(localefile,'w')
    
    for line in lines:
        outline = line
        for locale in locale_list:
            #print locale, line
            if locale in line:
                outline = line.replace('#','')
        f.write(outline)

    f.close

genlocale()