-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_localized.sh
More file actions
executable file
·62 lines (58 loc) · 1.51 KB
/
run_localized.sh
File metadata and controls
executable file
·62 lines (58 loc) · 1.51 KB
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
#!/bin/bash
# Script to run Lorem Ipsum Generator with language selection
# Point gettext at the development-compiled locale files
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
export TEXTDOMAINDIR="$SCRIPT_DIR/target/debug/locale"
echo "Lorem Ipsum Generator - Language Selection"
echo "=========================================="
echo "Available languages:"
echo " 1) English (default)"
echo " 2) Spanish (Español)"
echo " 3) German (Deutsch)"
echo " 4) French (Français)"
echo " 5) Portuguese (Português - Brasil)"
echo " 6) Italian (Italiano)"
echo " 7) Russian (Русский)"
echo " 8) Japanese (日本語)"
echo ""
read -p "Select language [1-8, default: 1]: " choice
case $choice in
2)
echo "Starting in Spanish..."
export LANGUAGE=es
;;
3)
echo "Starting in German..."
export LANGUAGE=de
;;
4)
echo "Starting in French..."
export LANGUAGE=fr
;;
5)
echo "Starting in Portuguese (Brazilian)..."
export LANGUAGE=pt_BR
;;
6)
echo "Starting in Italian..."
export LANGUAGE=it
;;
7)
echo "Starting in Russian..."
export LANGUAGE=ru
;;
8)
echo "Starting in Japanese..."
export LANGUAGE=ja
;;
1|"")
echo "Starting in English..."
unset LANGUAGE
;;
*)
echo "Invalid choice. Using English (default)."
unset LANGUAGE
;;
esac
# Run the application
./target/debug/loremgenerator "$@"