diff --git a/README.md b/README.md index c5a99ef..d343337 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,20 @@ bestool write-image out/open_source/open_source.bin --port /dev/ttyACM1 - Quad tap : Volume Down ## Changing audio alerts -The audio alerts are stored in: +The default audio alerts are stored in: `config/_default_cfg_src_/res/en/` If you want to change the alert to a custom sound, just replace the sound file you'd like to change (ie `config/_default_cfg_src_/res/en/SOUND_POWER_ON.mp3`) with your own MP3 with the same name and recompile with `./build.sh`! + +### Language support + +The `LANG` environment variable can be set when running the `build.sh` script to load sound files +for languages other than the default English. For example, running `LANG=cn ./build.sh` will load sounds files from +`config/_default_cfg_src_/res/cn/` instead of the default `en/` folder. + +The current languages supported with sound files are English (`en`) and Chinese (`cn`). Other languages +(or other sets of custom sounds) may be added by adding all the correct sound files into a +`config/_default_cfg_src_/res//` directory and building with `LANG= ./build.sh`. \ No newline at end of file diff --git a/build.sh b/build.sh index 278a1d6..34cf9c0 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,9 @@ #!/bin/bash -make -j T=open_source DEBUG=1 >log.txt 2>&1 + +# use LANG environment variable, default to "en" +LANG="${LANG:-en}" + +make -j T=open_source LANG=${LANG} DEBUG=1 >log.txt 2>&1 if [ $? -eq 0 ]; then echo "build success"