forked from acecilia/OpenWRTInvasion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
set_english.py
26 lines (19 loc) · 838 Bytes
/
set_english.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/python
##############################
# Language files located in: /usr/lib/lua/luci/i18n
# Config to change the language located in: /etc/config/luci
# See: https://forum.openwrt.org/t/how-to-translate-openwrt-luci-to-arabic/28752/10
##############################
import os
import ftplib
router_ip_address = input("Router IP address: ")
# router_ip_address = '192.168.0.21'
session = ftplib.FTP(router_ip_address,'root','')
# Uploading a lenguage file will not succeed as the filesystem is ro
# languageFile = open('extras/language/i18n/base.en.lmo','rb')
# session.storbinary('STOR /usr/lib/lua/luci/i18n/base.en.lmo', languageFile)
# languageFile.close()
configFile = open('extras/language/luci','rb')
session.storbinary('STOR /etc/config/luci', configFile)
configFile.close()
session.quit()