Skip to content

Commit

Permalink
add Swedish
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien LEROY committed Oct 5, 2022
1 parent 90b9910 commit c08e536
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions PowerAccent.Core/Languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum Language
RO,
SK,
SP,
SW,
TK,
}

Expand All @@ -39,6 +40,7 @@ public static char[] GetDefaultLetterKey(LetterKey letter, Language lang)
case Language.RO: return GetDefaultLetterKeyRO(letter); // Romanian
case Language.SK: return GetDefaultLetterKeySK(letter); // Slovak
case Language.SP: return GetDefaultLetterKeySP(letter); // Spain
case Language.SW: return GetDefaultLetterKeySW(letter); // Swedish
case Language.TK: return GetDefaultLetterKeyTK(letter); // Turkish
}

Expand Down Expand Up @@ -239,6 +241,20 @@ private static char[] GetDefaultLetterKeySP(LetterKey letter)
return Array.Empty<char>();
}

// Swedish
private static char[] GetDefaultLetterKeySW(LetterKey letter)
{
switch (letter)
{
case LetterKey.A:
return new char[] { 'å', 'ä' };
case LetterKey.O:
return new char[] { 'ö' };
}

return Array.Empty<char>();
}

// Maori
private static char[] GetDefaultLetterKeyMI(LetterKey letter)
{
Expand Down
2 changes: 2 additions & 0 deletions PowerAccent.UI/PowerAccent.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<None Remove="Resources\Flags\IS.jpg" />
<None Remove="Resources\Flags\IT.jpg" />
<None Remove="Resources\Flags\RO.jpg" />
<None Remove="Resources\Flags\SW.jpg" />
<None Remove="Resources\win11desktop.jpg" />
<None Remove="Resources\Flags\ALL.jpg" />
<None Remove="Resources\Flags\CUR.jpg" />
Expand All @@ -37,6 +38,7 @@
<Resource Include="Resources\Flags\IS.jpg" />
<Resource Include="Resources\Flags\IT.jpg" />
<Resource Include="Resources\Flags\RO.jpg" />
<Resource Include="Resources\Flags\SW.jpg" />
<Resource Include="Resources\win11desktop.jpg" />
<Resource Include="Resources\Flags\ALL.jpg" />
<Resource Include="Resources\Flags\CUR.jpg" />
Expand Down
Binary file added PowerAccent.UI/Resources/Flags/SW.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c08e536

Please sign in to comment.