* Run `make extract` from root to populate that file with the strings to translate in json
form.
```
~/minikube$ make extract
go run cmd/extract/extract.go
Compiling translation strings...
Writing to de.json
Writing to es.json
Writing to fr.json
Writing to ja.json
Writing to ko.json
Writing to pl.json
Writing to zh-CN.json
Done!
```
* Add translated strings as the value of the map where the English phrase is the key.
* The file will be json file with all of the English phrases as the keys of a map
```
~/minikube$ head translations/fr.json
{
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.machineName}}\" does not exist, nothing to stop": "",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"'none' driver does not support 'minikube docker-env' command": "",
"'none' driver does not support 'minikube mount' command": "",
"'none' driver does not support 'minikube podman-env' command": "",
"'none' driver does not support 'minikube ssh' command": "",
"'{{.driver}}' driver reported an issue: {{.error}}": "",
```
* Add the translations as the values of the map, keeping in mind that anything in double braces `{{}}` are variable names describing what gets injected and should not be translated.
```
~/minikube$ vi translations/ar.json
{
"\"The '{{.minikube_addon}}' addon is disabled": "",
"\"{{.machineName}}\" does not exist, nothing to stop": "\""{{.machineName}} n'exist pas, rien a arrêter.",
"\"{{.name}}\" profile does not exist, trying anyways.": "",
"'none' driver does not support 'minikube docker-env' command": "",
"'none' driver does not support 'minikube mount' command": "",
"'none' driver does not support 'minikube podman-env' command": "",
"'none' driver does not support 'minikube ssh' command": "",
"'{{.driver}}' driver reported an issue: {{.error}}": "",
* Once you have all the translations you want, save the file and rebuild the minikube from scratch to pick up your new translations:
```
~/minikube$ make clean
rm -rf ./out
rm -f pkg/minikube/assets/assets.go
rm -f pkg/minikube/translate/translations.go
rm -rf ./vendor
~/minikube$ make
```
Note: the clean is required to regenerate the embedded `translations.go` file
* You now have a fresh minikube binary in the `out` directory. If your system locale is that of the language you added translations for, a simple `out/minikube start` will work as a test, assuming you translated phrases from `minikube start`. You can use whatever command you'd like in that way.
* If you have a different system locale, you can override the printed language using the LANG environment variable:
```
~/minikube$ LANG=fr out/minikube start
😄 minikube v1.9.0-beta.2 sur Darwin 10.14.6
✨ Choix automatique du driver hyperkit
🔥 Création de VM hyperkit (CPUs=2, Mémoire=4000MB, Disque=20000MB)...
🐳 Préparation de Kubernetes v1.18.0 sur Docker 19.03.8...
🌟 Installation des addons: default-storageclass, storage-provisioner
🏄 Terminé ! kubectl est maintenant configuré pour utiliser "minikube".