Skip to content

Commit

Permalink
Add stub for getPhraseLocalized
Browse files Browse the repository at this point in the history
  • Loading branch information
FPtje committed Oct 28, 2023
1 parent 7b5fac6 commit bbce4b7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions gamemode/modules/language/sh_interface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,38 @@ DarkRP.getPhrase = DarkRP.stub{
metatable = DarkRP
}

DarkRP.getPhraseLocalized = DarkRP.stub{
name = "getPhraseLocalized",
description = "Translate a phrase using the language setting of a specific player.",
parameters = {
{
name = "ply",
description = "The player to use the language setting of.",
type = "Player",
optional = false
},
{
name = "phraseName",
description = "The name of the phrase.",
type = "string"
},
{
name = "Phrase parameters",
description = "Some phrases need extra information, like in \"PLAYERNAME just won the lottery!\". Not filling in the phrase parameters will cause errors.",
type = "vararg",
optional = false
}
},
returns = {
{
name = "phrase",
description = "The formatted phrase.",
type = "string"
}
},
metatable = DarkRP
}

DarkRP.getMissingPhrases = DarkRP.stub{
name = "getMissingPhrases",
description = "Get all the phrases a language is missing.",
Expand Down

0 comments on commit bbce4b7

Please sign in to comment.