-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnewLocale.ps1
80 lines (80 loc) · 1.94 KB
/
newLocale.ps1
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Clear-Host
Write-Host "
+-------------------------------------------------------------------------+
| ___ _____ _____ ____ _ _____ _ ____ _ ____ _____ |
| |_ _|_ _|_ _| | _ \ / \|_ _|/ \ | __ ) / \ / ___|| ____| |
| | | | | | | | | | |/ _ \ | | / _ \ | _ \ / _ \ \___ \| _| |
| | | | | | | | |_| / ___ \| |/ ___ \| |_) / ___ \ ___) | |___ |
| |___| |_| |_| |____/_/ \_\_/_/ \_\____/_/ \_\____/|_____| |
| Made with ♥ By Emad Adel |
+-------------------------------------------------------------------------+
"
Write-Host "[!] Check the locales directory before adding a new Language." -ForegroundColor Yellow
try {
$name = Read-Host "Enter language display name (e.g. English)"
$locales = Read-Host "Enter language code (e.g. en)"
$Author = Read-Host "Enter author name (e.g. Emad Adel)"
$csvFilePath = "$locales"
# Define the cOntent in the desired format
$table = @"
Key,Text
author,"$Author",
name,"$name",
Welcome,
System_Info,
Power_Options,
Device_Manager,
Services,
Networks,
Apps_features,
Task_Manager,
Disk_Managment,
Install,
Apply,
Downloading,
About,
Third_party,
Preferences,
Management,
Apps,
Tweaks,
Settings,
Save,
Restore,
Music,
On,
Off,
Use_system_setting,
Create_desktop_shortcut,
Reset_preferences,
Reopen_itt_again.,
Theme,
Language,
MAS,
Win_Office,
IDM,
Browsers_extensions,
All,
Search,
Create_restore_point,
Portable_Downloads_Folder,
Install_msg,
Apply_msg,
Applying,
App_empty_select,
Tweak_empty_select,
Please_wait,
Last_update,
Exit_msg,
Happy_birthday,
My_playlist,
Empty_save_msg,
"@
# Write the cOntent to the CSV file
$csvFilePath = "locales/$csvFilePath.csv"
Set-COntent -Path $csvFilePath -Value $table -Encoding UTF8
Write-Host "Template saved at "$csvFilePath". You can edit the file using any CSV editor such as Excel, or Notepad++."
}
catch {
Write-Host "An error occurred: $_"
}