mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-23 11:46:18 +00:00
Move Locale.language_code documentation to where it belongs
This commit is contained in:
parent
4854c56d58
commit
0c98251087
@ -805,13 +805,6 @@ class Locale(Enum):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def language_code(self) -> str:
|
def language_code(self) -> str:
|
||||||
""":class:`str`: Returns the locale's BCP 47 language code in the format of ``language-COUNTRY``.
|
|
||||||
|
|
||||||
This is derived from a predefined mapping based on Discord's supported locales.
|
|
||||||
If no mapping exists for the current locale, this returns the raw locale value as a fallback.
|
|
||||||
|
|
||||||
.. versionadded:: 2.6
|
|
||||||
"""
|
|
||||||
return _UNICODE_LANG_MAP.get(self.value, self.value)
|
return _UNICODE_LANG_MAP.get(self.value, self.value)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3604,6 +3604,15 @@ of :class:`enum.Enum`.
|
|||||||
|
|
||||||
The ``vi`` locale.
|
The ``vi`` locale.
|
||||||
|
|
||||||
|
.. attribute:: language_code
|
||||||
|
|
||||||
|
:class:`str`: Returns the locale's BCP 47 language code in the format of ``language-COUNTRY``.
|
||||||
|
|
||||||
|
This is derived from a predefined mapping based on Discord's supported locales.
|
||||||
|
If no mapping exists for the current locale, this returns the raw locale value as a fallback.
|
||||||
|
|
||||||
|
.. versionadded:: 2.6
|
||||||
|
|
||||||
|
|
||||||
.. class:: MFALevel
|
.. class:: MFALevel
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user