Skip to content

Commit 8700fd4

Browse files
committed
Optimize class summary info
1 parent 05fec6d commit 8700fd4

27 files changed

+226
-2
lines changed

src/Nager.Country.Translation/ILanguageTranslation.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
namespace Nager.Country.Translation
22
{
33
/// <summary>
4-
/// ILanguageTranslation
4+
/// Language Translation Interface
55
/// </summary>
66
public interface ILanguageTranslation
77
{
88
/// <summary>
99
/// CommonName
1010
/// </summary>
1111
string CommonName { get; }
12+
1213
/// <summary>
1314
/// OfficialName
1415
/// </summary>
1516
string OfficialName { get; }
17+
18+
/// <summary>
19+
/// Translations
20+
/// </summary>
1621
TranslationInfo[] Translations { get; }
1722

1823
/// <summary>

src/Nager.Country.Translation/ITranslationProvider.cs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,130 @@ namespace Nager.Country.Translation
88
/// </summary>
99
public interface ITranslationProvider
1010
{
11+
/// <summary>
12+
/// Gets all available language translations.
13+
/// </summary>
14+
/// <returns>A collection of supported language translations.</returns>
1115
IEnumerable<ILanguageTranslation> GetLanguages();
1216

17+
/// <summary>
18+
/// Gets the language translation for the specified ISO language code (string).
19+
/// </summary>
20+
/// <param name="languageCode">The ISO language code (e.g., "en").</param>
21+
/// <returns>The corresponding language translation.</returns>
1322
ILanguageTranslation GetLanguage(string languageCode);
23+
24+
/// <summary>
25+
/// Gets the language translation for the specified <see cref="LanguageCode"/>.
26+
/// </summary>
27+
/// <param name="languageCode">The language code enumeration value.</param>
28+
/// <returns>The corresponding language translation.</returns>
1429
ILanguageTranslation GetLanguage(LanguageCode languageCode);
1530

31+
/// <summary>
32+
/// Gets the country translation for the specified ISO Alpha-2 country code.
33+
/// </summary>
34+
/// <param name="alpha2Code">The ISO Alpha-2 country code.</param>
35+
/// <returns>The corresponding country translation.</returns>
1636
ICountryTranslation GetCountryTranslation(Alpha2Code alpha2Code);
1737

38+
/// <summary>
39+
/// Gets the localized country name for the specified country and language code.
40+
/// </summary>
41+
/// <param name="alpha2or3Code">The ISO Alpha-2 or Alpha-3 country code.</param>
42+
/// <param name="languageCode">The target language code.</param>
43+
/// <returns>The localized country name.</returns>
1844
string GetCountryTranslatedName(string alpha2or3Code, LanguageCode languageCode);
45+
46+
/// <summary>
47+
/// Gets the localized country name for the specified Alpha-2 code and language code.
48+
/// </summary>
49+
/// <param name="alpha2Code">The ISO Alpha-2 country code.</param>
50+
/// <param name="languageCode">The target language code.</param>
51+
/// <returns>The localized country name.</returns>
1952
string GetCountryTranslatedName(Alpha2Code alpha2Code, LanguageCode languageCode);
53+
54+
/// <summary>
55+
/// Gets the localized country name for the specified Alpha-3 code and language code.
56+
/// </summary>
57+
/// <param name="alpha3Code">The ISO Alpha-3 country code.</param>
58+
/// <param name="languageCode">The target language code.</param>
59+
/// <returns>The localized country name.</returns>
2060
string GetCountryTranslatedName(Alpha3Code alpha3Code, LanguageCode languageCode);
2161

62+
/// <summary>
63+
/// Gets the localized country name for the specified country and language code as strings.
64+
/// </summary>
65+
/// <param name="alpha2or3Code">The ISO Alpha-2 or Alpha-3 country code.</param>
66+
/// <param name="languageCode">The target ISO language code as a string.</param>
67+
/// <returns>The localized country name.</returns>
2268
string GetCountryTranslatedName(string alpha2or3Code, string languageCode);
69+
70+
/// <summary>
71+
/// Gets the localized country name for the specified Alpha-2 code and language code as a string.
72+
/// </summary>
73+
/// <param name="alpha2Code">The ISO Alpha-2 country code.</param>
74+
/// <param name="languageCode">The target ISO language code as a string.</param>
75+
/// <returns>The localized country name.</returns>
2376
string GetCountryTranslatedName(Alpha2Code alpha2Code, string languageCode);
77+
78+
/// <summary>
79+
/// Gets the localized country name for the specified Alpha-3 code and language code as a string.
80+
/// </summary>
81+
/// <param name="alpha3Code">The ISO Alpha-3 country code.</param>
82+
/// <param name="languageCode">The target ISO language code as a string.</param>
83+
/// <returns>The localized country name.</returns>
2484
string GetCountryTranslatedName(Alpha3Code alpha3Code, string languageCode);
2585

86+
/// <summary>
87+
/// Gets the localized country name using culture information.
88+
/// </summary>
89+
/// <param name="alpha2or3Code">The ISO Alpha-2 or Alpha-3 country code.</param>
90+
/// <param name="culture">The target culture (e.g., CultureInfo("de-DE")).</param>
91+
/// <returns>The localized country name.</returns>
2692
string GetCountryTranslatedName(string alpha2or3Code, CultureInfo culture);
93+
94+
/// <summary>
95+
/// Gets the localized country name using culture information.
96+
/// </summary>
97+
/// <param name="alpha2Code">The ISO Alpha-2 country code.</param>
98+
/// <param name="culture">The target culture.</param>
99+
/// <returns>The localized country name.</returns>
27100
string GetCountryTranslatedName(Alpha2Code alpha2Code, CultureInfo culture);
101+
102+
/// <summary>
103+
/// Gets the localized country name using culture information.
104+
/// </summary>
105+
/// <param name="alpha3Code">The ISO Alpha-3 country code.</param>
106+
/// <param name="culture">The target culture.</param>
107+
/// <returns>The localized country name.</returns>
28108
string GetCountryTranslatedName(Alpha3Code alpha3Code, CultureInfo culture);
29109

110+
/// <summary>
111+
/// Gets the localized country name using culture information, falling back to a default language if necessary.
112+
/// </summary>
113+
/// <param name="alpha2or3Code">The ISO Alpha-2 or Alpha-3 country code.</param>
114+
/// <param name="culture">The target culture.</param>
115+
/// <param name="defaultLanguageCode">The fallback language code if no translation is available for the culture.</param>
116+
/// <returns>The localized country name.</returns>
30117
string GetCountryTranslatedName(string alpha2or3Code, CultureInfo culture, LanguageCode defaultLanguageCode);
118+
119+
/// <summary>
120+
/// Gets the localized country name using culture information, falling back to a default language if necessary.
121+
/// </summary>
122+
/// <param name="alpha2Code">The ISO Alpha-2 country code.</param>
123+
/// <param name="culture">The target culture.</param>
124+
/// <param name="defaultLanguageCode">The fallback language code if no translation is available for the culture.</param>
125+
/// <returns>The localized country name.</returns>
31126
string GetCountryTranslatedName(Alpha2Code alpha2Code, CultureInfo culture, LanguageCode defaultLanguageCode);
127+
128+
/// <summary>
129+
/// Gets the localized country name using culture information, falling back to a default language if necessary.
130+
/// </summary>
131+
/// <param name="alpha3Code">The ISO Alpha-3 country code.</param>
132+
/// <param name="culture">The target culture.</param>
133+
/// <param name="defaultLanguageCode">The fallback language code if no translation is available for the culture.</param>
134+
/// <returns>The localized country name.</returns>
32135
string GetCountryTranslatedName(Alpha3Code alpha3Code, CultureInfo culture, LanguageCode defaultLanguageCode);
33136
}
34137
}

src/Nager.Country.Translation/LanguageTranslations/PaliLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Pali
5+
/// </summary>
36
public class PaliLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Pali";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "पालि, पाळि";
913

src/Nager.Country.Translation/LanguageTranslations/RomanianLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Romanian
5+
/// </summary>
36
public class RomanianLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Romanian";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "Română";
913

src/Nager.Country.Translation/LanguageTranslations/RomanshLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Romansh
5+
/// </summary>
36
public class RomanshLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Romansh";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "Rumantsch Grischun";
913

src/Nager.Country.Translation/LanguageTranslations/RundiLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Rundi
5+
/// </summary>
36
public class RundiLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Rundi";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "Ikirundi";
913

src/Nager.Country.Translation/LanguageTranslations/RussianLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Russian
5+
/// </summary>
36
public class RussianLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Russian";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "русский";
913

src/Nager.Country.Translation/LanguageTranslations/SamoanLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Samoan
5+
/// </summary>
36
public class SamoanLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Samoan";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "gagana fa'a Samoa";
913

src/Nager.Country.Translation/LanguageTranslations/SangoLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Sango
5+
/// </summary>
36
public class SangoLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Sango";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "yângâ tî sängö";
913

src/Nager.Country.Translation/LanguageTranslations/SanskritLanguageTranslation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
namespace Nager.Country.Translation.LanguageTranslations
22
{
3+
/// <summary>
4+
/// Sanskrit
5+
/// </summary>
36
public class SanskritLanguageTranslation : ILanguageTranslation
47
{
58
/// <inheritdoc/>
69
public string CommonName => "Sanskrit";
10+
711
/// <inheritdoc/>
812
public string OfficialName => "संस्कृतम्";
913

0 commit comments

Comments
 (0)