Files
community_bridge/unit_tests/locale_test.lua
T
MrNewb 6bdee6ad91 Documentation, deprecated old points, removed incomplete clothing bridge.
Documentation added, deprecated old points, removed incomplete clothing bridge. I migrated the points into the new system and added deprecation notices. Cleaned some white spaces because they made me unhappy. Added GetStreetNameAtCoords as it may be useful to return a string for others. Added support for lb-tablet dispatch alerts (thank you loaf)
2025-04-02 07:27:13 -04:00

19 lines
918 B
Lua

-- if outside this resource, use local whatever = Require("modules/locales/shared.lua")
-- whatever.Locales("some-index-in-language-.json-file")
-- Files must be stored in "locales" folder, within the resource.
-- Instead of using Require you can also import it via the manifest.
-- The Lang variable is available globally, which tells you what the server is using.
-- print("Language: ", Lang)
-- print("Locale: ", Language.Locale("locale-unit-test"))
-- Example outside community bridge resource:
-- local Language = Require('modules/locales/shared.lua')
-- print("Language: ", Lang)
-- print("Locale: ", Language.Locale("locale-unit-test"))
RegisterCommand("lang", function(source, args, raw)
print(Language.Locale("UNITTEST.UNITTEST.UNITTESTA"))
print(Language.Locale("UNITTEST.UNITTESTA", "Devil", "GERRRRRRR!"))
print( "Oh also this works", Language.Locale("place_object_scroll_down"))
end, false)