mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Add two sample implementations
This commit is contained in:
17
osu.Game/Localisation/Common.ja.resx
Normal file
17
osu.Game/Localisation/Common.ja.resx
Normal file
@ -0,0 +1,17 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cancel" xml:space="preserve">
|
||||
<value>やめとくわ</value>
|
||||
</data>
|
||||
</root>
|
17
osu.Game/Localisation/Common.resx
Normal file
17
osu.Game/Localisation/Common.resx
Normal file
@ -0,0 +1,17 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="cancel" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
</root>
|
19
osu.Game/Localisation/CommonStrings.cs
Normal file
19
osu.Game/Localisation/CommonStrings.cs
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Localisation;
|
||||
|
||||
namespace osu.Game.Localisation
|
||||
{
|
||||
public static class CommonStrings
|
||||
{
|
||||
private const string prefix = "osu.Game.Localisation.Common";
|
||||
|
||||
/// <summary>
|
||||
/// "Cancel"
|
||||
/// </summary>
|
||||
public static LocalisableString Cancel => new TranslatableString(getKey("cancel"), "Cancel");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
16
osu.Game/Localisation/Language.cs
Normal file
16
osu.Game/Localisation/Language.cs
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Localisation
|
||||
{
|
||||
public enum Language
|
||||
{
|
||||
[Description("English")]
|
||||
en,
|
||||
|
||||
[Description("日本語")]
|
||||
ja
|
||||
}
|
||||
}
|
17
osu.Game/Localisation/MainMenu.ja.resx
Normal file
17
osu.Game/Localisation/MainMenu.ja.resx
Normal file
@ -0,0 +1,17 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="solo" xml:space="preserve">
|
||||
<value>ソロ</value>
|
||||
</data>
|
||||
</root>
|
17
osu.Game/Localisation/MainMenu.resx
Normal file
17
osu.Game/Localisation/MainMenu.resx
Normal file
@ -0,0 +1,17 @@
|
||||
<root>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="solo" xml:space="preserve">
|
||||
<value>solo</value>
|
||||
</data>
|
||||
</root>
|
24
osu.Game/Localisation/MainMenuStrings.cs
Normal file
24
osu.Game/Localisation/MainMenuStrings.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Localisation;
|
||||
|
||||
namespace osu.Game.Localisation
|
||||
{
|
||||
public static class MainMenuStrings
|
||||
{
|
||||
private const string prefix = "osu.Game.Localisation.MainMenu";
|
||||
|
||||
/// <summary>
|
||||
/// "solo"
|
||||
/// </summary>
|
||||
public static LocalisableString Solo => new TranslatableString(getKey("solo"), "solo");
|
||||
|
||||
/// <summary>
|
||||
/// "multi"
|
||||
/// </summary>
|
||||
public static LocalisableString Multi => new TranslatableString(getKey("multi"), "multi");
|
||||
|
||||
private static string getKey(string key) => $"{prefix}:{key}";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user