Difference between revisions of "love.system.getPreferredLocales"
(Documented new function in 12.0) |
m (Link ISO-639 and ISO-3166.) |
||
Line 10: | Line 10: | ||
None. | None. | ||
=== Returns === | === Returns === | ||
− | {{param|table|locales|A [[sequence]] of [[string|strings]] in order of user's preference. Locales are in form <code>xx_YY</code> (or just <code>xx</code> when country is not available) where <code>xx</code> is an ISO-639 language specifier and <code>YY</code> is an ISO-3166 country code}} | + | {{param|table|locales|A [[sequence]] of [[string|strings]] in order of user's preference. Locales are in form <code>xx_YY</code> (or just <code>xx</code> when country is not available) where <code>xx</code> is an [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO-639] language specifier and <code>YY</code> (if available) is an [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes ISO-3166] country code}} |
== Notes == | == Notes == |
Latest revision as of 13:03, 16 June 2023
Available since LÖVE 12.0 |
This function is not supported in earlier versions. |
Gets preferred locales in order of user's preference.
Function
Synopsis
locales = love.system.getPreferredLocales( )
Arguments
None.
Returns
table locales
- A sequence of strings in order of user's preference. Locales are in form
xx_YY
(or justxx
when country is not available) wherexx
is an ISO-639 language specifier andYY
(if available) is an ISO-3166 country code
Notes
It is recommended to load preferred locales only once and if you want to listen to any changes (in case user changes system settings), use love.localechanged.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info