Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLanguage -> getPreferredLocales #173

Merged
merged 1 commit into from
Mar 19, 2022
Merged

getLanguage -> getPreferredLocales #173

merged 1 commit into from
Mar 19, 2022

Conversation

TurtleP
Copy link
Collaborator

@TurtleP TurtleP commented Mar 19, 2022

Summary of the Pull Request

Changes love.system.getLanguage() to love.system.getPreferredLocales() to be compatible with LÖVE 12.0's API.

Validation Steps

Created the following main.lua and ran on 3DS and Switch

function love.draw()
    local locales = table.concat(love.system.getPreferredLocales(), ", ")
    love.graphics.print(locales)
end

function love.gamepadpressed(joy, button)
    if button == "start" then
        love.event.quit()
    end
end

Checklist

  • Closes #NA
  • Successfully builds

Screenshots

2011-01-01_23-55-25 428_top
2022031913151400-DB4ACF91897DEE47A4F659070EBDEC8B

Additional Details

I'll probably have another pair of eyes look at the actual ISO-639 codes. Aside from that, it works. This will also break other people's games if they used love.system.getLanguage(). Not sure of the impact, but hopefully it is minimal.

@TurtleP TurtleP merged commit 389de3f into main Mar 19, 2022
@TurtleP TurtleP deleted the dev/getPreferredLocales branch March 20, 2022 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant