Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix switch language in ubuntu ^22.04 #12

Merged
merged 1 commit into from
Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cd /usr/share/X11/xkb/symbols
```
2. make backup of persian symbol file
```bash
cp ./ir ./ir-backup
cp ./ir_win ./ir-backup
```
3. copy `ir` file below and then modify symbols file
```bash
Expand All @@ -43,15 +43,27 @@ cp ./evdev.xml ./evdev-backup.xml
```bash
sudo gedit ./evdev.xml
```
add this line after `Persian (with Persian keypad)` section
add this layout after `ir` layout
```xml
...
<variant>
<configItem>
<name>pes_win</name>
<description>Persian (Windows layout)</description>
</configItem>
</variant>
<layout>
<configItem>
<name>ir_win</name>
<shortDescription>fa</shortDescription>
<description>Persian</description>
<languageList>
<iso639Id>per-win</iso639Id>
</languageList>
</configItem>
<variantList>
<variant>
<configItem>
<name>pes_win</name>
<description>Persian (Windows layout)</description>
</configItem>
</variant>
</variantList>
</layout>
...
```
6. now logout and when you log back, go to `settings > Region and language` (or where ever your keyboard perference is) and in input sources click on `+` button and search for `Persian (Windows layout)`, and add it.
Expand Down
18 changes: 18 additions & 0 deletions evdev.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2974,6 +2974,24 @@
</variant>
</variantList>
</layout>
<layout>
<configItem>
<name>ir_win</name>
<shortDescription>fa</shortDescription>
<description>Persian</description>
<languageList>
<iso639Id>per-win</iso639Id>
</languageList>
</configItem>
<variantList>
<variant>
<configItem>
<name>pes_win</name>
<description>Persian (Windows layout)</description>
</configItem>
</variant>
</variantList>
</layout>
<layout>
<configItem>
<name>iq</name>
Expand Down
3 changes: 1 addition & 2 deletions install
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mv /usr/share/X11/xkb/symbols/ir /usr/share/X11/xkb/symbols/ir-back
wget https://raw.githubusercontent.com/rez4mt/windows-persian-keyboard-for-ubuntu/master/ir -P /usr/share/X11/xkb/symbols/
wget https://raw.githubusercontent.com/rez4mt/windows-persian-keyboard-for-ubuntu/master/ir_win -P /usr/share/X11/xkb/symbols/
mv /usr/share/X11/xkb/rules/evdev.xml /usr/share/X11/xkb/rules/evdev.xml-back
wget https://raw.githubusercontent.com/rez4mt/windows-persian-keyboard-for-ubuntu/master/evdev.xml -P /usr/share/X11/xkb/rules/
File renamed without changes.