Change rsync language in Cygwin to German - cygwin

In my Cygwin environment LANG is set to 'de_DE.UTF-8' and many things are German like gcc and bash.
But rsync is still English.
Is it possible to change this?

Related

Changing shell from /bin/bash to /bin/zsh disappears programming tools?

I became very interested in Linux and wanted to customize my terminal with ZSH and powerlevel10k, but after changing and logging out, the programming tools disappears. I tried very hard to understand the reason but it did not work. I am not very familiar with the $PATH command and I do not know if it works or not. Thanks for your help.
image link => https://i.stack.imgur.com/BLeLe.jpg
Changing default shell to ZSH can help
first find the path of your ZSh shell.
type -a zsh
then change it
chsh -s /bin/zsh
now log out and log in again. One can close the Terminal app and reopen it.
After digging, I finally realized that the files that were installed with SNAP are not displayed. When I installed the file in Deb format, it became known.

Changing the locale in Arch

My gnome-terminal is broken, so is zim and many other programs, the xfce-terminal does not show characters like ö ä or ü. All of them show problems with the locale. I think the problems stems from ill-configured locale settings. For typing "locale" the xfce4-terminal prompts
LANG=C
LC_CTYPE="C"
LC_NUMERIC=aa_DJ.UTF-8
LC_TIME=aa_DJ.UTF-8
LC_COLLATE="C"
LC_MONETARY=aa_DJ.UTF-8
LC_MESSAGES="C"
LC_PAPER=aa_DJ.UTF-8
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT=aa_DJ.UTF-8
LC_IDENTIFICATION="C"
LC_ALL=
This is not what I want. My /etc/locale.conf is set to
LANG=de_DE.UTF-8
My /etc/locale.gen is uncommented such executing "locale-gen" prompts
de_DE.UTF-8... done
de_DE.ISO-8859-1... done
en_US.UTF-8... done
en_US.ISO-8859-1... done
When looking at the environment variables my "locale" produces, it doesn't wonder me too much, that nothing is working as supposed. I don't know why there is "aa_DJ" in these variables, I don't know the language (to be precise, I am not sure which language that is, maybe I speak it ...). However, I really don't know where to change the environment variable permanently (Without putting it in .bashrc) . I tried grepping it in my home folder and after that in root (Recursive on --> grep looked everywhere), but I couldn't find anything.
So my question is: Where or how are these variables defined and how can I change them? I can't find anything that explains it to me. I am aware that there are several people asking similar questions, I tried those solutions but they seem to have different problems (or they solve it with hacking something into .bashrc, which doesn't do the trick here and is not a very meaningful way).
So, the locale you have there seems to be:
Afar - DJIBOUTI (DJ) (aa_DJ)
So, after running locale-gen you need to run localectl list-locales and identify the locale you need.
Finally run:
localectl set-locale LANG=de_DE.UTF-8
NOTE: The German page for locale in Arch linux seems to be outdated
As I found out now, I missed to give an information that might have been useful and which helped me to solve the question. I use the gnome3 desktop env. Gnome3 has its own setting for the locales that overwrites the system standard (and is not saved in plain text I assume, otherwise I should have found it with grep). The solution was to correct the gnome setting via
gsettings get org.gnome.system.locale region 'de_DE.UTF-8'

Special Characters on zsh prompt using oh-my-zsh

I've just started using zsh as my shell, coming from bash. I am on a RedHat Linux Workstation build 6.4. I have all the relevent locales installed but when I move to a zsh prompt and pick any of the themes I have a PS1 that looks like this
ââ[name#host] - [~/tars] - [2013-11-05 09:50:26]
ââ[0]
I'm not sure what is causing these special characters. Another example:
name#host ~/tars » echo $PS1 1 âµ
%{$fg[$NCOLOR]%}%n%{$fg[green]%}#%m%{$reset_color%} %~ \
$(git_prompt_info)\
%{$fg[red]%}%(!.#.»)%{$reset_color%}
Is there something I'm missing that I should have installed?
Depending on the prompt theme you use you need a font which supports those characters or need to install additional fonts for your terminal, like the Powerline fonts.

Can't change language in vim 7.3.35

I use (g)vim from default Ubuntu repo. Before updating to 7.3 everything was working. After updating to 7.3 I just can't change vim's language. First I checked if the locale I want to set is available on my system.
~ $ locale -a | grep en_US
en_US.utf8
Now in vim I typed many variations of language command like:
:language en_US.utf8
:lan mes en_US.utf8
but it didn't worked and I still have vim in the default language of my system. And yes, I have language en_US.utf8 in my vimrc. Any suggestions?
Just rename "lang" dir in vim program directory to "lang.backup" and everything will be back in english language.
Try the following command:
:language US

How do I set the UI language in vim?

I saw this on reddit, and it reminded me of one of my vim gripes: It shows the UI in German. I want English. But since my OS is set up in German (the standard at our office), I guess vim is actually trying to be helpful.
What magic incantations must I perform to get vim to switch the UI language? I have tried googling on various occasions, but can't seem to find an answer.
For reference, in Windows (7) I just deleted the directory C:\Program Files (x86)\Vim\vim72\lang. That made it fallback to en_US.
Try this in _vimrc. It works with my win7.
set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
As Ken noted, you want the :language command.
Note that putting this in your .vimrc or .gvimrc won’t help you with the menus in gvim, since their definition is loaded once at startup, very early on, and not re-read again later. So you really do need to set LC_ALL (or more specifically LC_MESSAGES) in your environment – or on non-Unixoid systems (eg. Windows), you can pass the --cmd switch (which executes the given command first thing, as opposed to the -c option):
gvim --cmd "lang en_US"
As I mentioned, you don’t need to use LC_ALL, which will forcibly switch all aspects of your computing environment. You can do more nuanced stuff. F.ex., my own locale settings look like this:
LANG=en_US.utf8
LC_CTYPE=de_DE.utf8
LC_COLLATE=C
This means I get a largely English system, but with German semantics for letters, except that the default sort order is ASCIIbetical (ie. sort by codepoint, not according to language conventions). You could use a different variation; see man 7 locale for more.
Putting this line of code at the top of my _vimrc file saved my day:
set langmenu=en_US.UTF-8
This worked for changing vim's menu language
set langmenu=en_US.UTF-8 [or just set langmenu=en for short]
But
language en
gave me an error sayng it couldn't set en as a language but this line did the job
:let $LANG = 'en'
The latter come from the Vim's docs. I added both lines at the beginning of the _vimrc file. I use a Windows 7 64 computer.
PS: this line changes both language and menus language
language messages en
In the .vimrc file (or _vimrc file if you are in windows)
Ubuntu 10.10 + VIM 7.2 IMproved. Code below changes language for console vim.
Add it at top of your vim.rc
if has('unix')
language messages C
else
language messages en
endif
Adding this to _vimrc works for me in windows 8:
set langmenu=en_US
let $LANG = 'en_US'
(note that _vimrc is in the same directory that contains my vim74 dir, thats the _vimrc file that vim reads at startup)
:help language
:language fr_FR.ISO_8859-1
These two lines at the begining of your .vimrc file will do the job:
let $LANG = 'en'
set langmenu=none
Start vim with a changed locale:
LC_ALL=en_GB.utf-8 vim
Or export that variable per default in your bashrc/profile.
Two Vim installations on Windows
Nothing from here around have helped me until I have realized that I have 2 Vim installed.
Git Bash via MinGW (Cygwin, mintty)
A separate installation in the Program Files on Windows
Next command will filter you all watched vimrc-files and their locations.
vim --version | grep vimrc
_vimrc (Windows & CMD)
.vimrc (Bash for Git)
vimrc (has different locations for both)
1: Vim on Windows & CMD
Only renaming (deletion) of the lang folder helped me.
You can find it here C:\Program Files (x86)\Vim\vim80\lang
I tried all config settings listed here around and it was useless.
2.1: Git Bash through MinGW, Cygwin, mintty
For Git Bash I added language messages en_US at the top of C:\Program Files\Git\etc\vimrc
Of course, if you prefer to delete the lang folder you can find it here
C:\Program Files\Git\usr\share\vim\vim80\lang
C:\Users\User_name_xxx\AppData\Local\Programs\Git\usr\share\vim\vim80\lang for a local user installation.
2.2: Tuning only Git's Bash (MinGW64, Cygwin, mintty)
At the end, for Bash on Windows I have chosen to skip manipulations with vimrc
I opened C:\Program Files\Git\etc\bash.bashrc
and added the following line
LANG='en_US'
or
LANG=C
Try to do not use en_US.UTF-8 because it forces some bash commands to produce weird chars. For example in find 'xxx_yyy_zzz_aaa.bbbddd' for a non-existing file.
I don't know why all of the above answers did not work for me. I kept getting errors about the locales not existing. Maybe it's a Windows thing. At any rate, my solution was to add this to my vimrc:
let $LANG = 'en'
Ah, I spoke too soon. The menus of gVim are still in Japanese, but the intro screen is in English.
Try adding this to your _vimrc:
let $LANG='en_US'
I simply disabled the Native Language Support when installing gvim
(thus making it a custom installation).
Tested successfully with gvim82.exe under Windows 7.
Had similar issue, but neither one of above solution worked:
https://superuser.com/questions/552504/vim-ui-language-issue/552523
I've resolved it by removing all vim packets and build vim from sources.
Hope it'll help someone.
If you're on Windows and don't want to be bothered issuing commands
To prevent the GUI from loading localization files
Just go to Program Files\Vim\vim80\lang and put an underscore as a prefix in front of all the files that look like they have something to do with your locale.
To prevent VIM itself from loading localization files
In the same folder as above, prefix with an underscore the folder named with your country code.
Note: Windows 10 will probably ask for Administrator privileges by raising a UAC warning.
By the way
This same technique can be applied to a lot of Unix/Linux tools ported on Windows, and generally all software packages where the localization files can readily be accessed. If you rename those to prevent the application from finding them, the fallback language will most probably be English.

Resources