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 Nov 5, 2023
1 parent 5da36b8 commit 8718285
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions gamemode/modules/language/sh_interface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,39 @@ 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",
optional = false
},
{
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 8718285

Please sign in to comment.