formatting and typos

This commit is contained in:
DokaDoka committed 2022-12-11 15:00:43 +11:00
1 parent 75698216e0
commit 724c7e356d
99 files changed
+515 -305

No files matched your search

+8 -5
View File
@@ -1,17 +1,20 @@
Allows servers to set a preferred language and attempt to load locale files in any resources using the module.
Allows servers to set a preferred language and attempt to load locale files in any resources using the module.
Locale files should use the [ISO Language Code](http://www.lingoes.net/en/translator/langcode.htm) and be saved as `./locales/langcode.json`
To change the preferred language from English, add the convar to your server.cfg
```cfg
```yaml
setr ox:locale en
```
Initialise the locale module in your resource (once).
```lua
lib.locale()
```
Format your strings with the new locale global.
```lua
locale(str, ...)
```
@@ -26,8 +29,8 @@ Additional arguments can be sent to format the locale output.
lib.locale()
SetInterval(function()
print(locale('grand_theft_auto'))
print(locale('suspect_sex', locale('male')))
print(locale('grand_theft_auto'))
print(locale('suspect_sex', locale('male')))
end, 5000)
```
@@ -51,6 +54,6 @@ end, 5000)
```lua title="fxmanifest.lua"
files {
'locales/*.json'
'locales/*.json'
}
```