
4 - Phrase not found in specified langauge, fallback language not found. It is recommended that you tell the author about the missing string in this situation. This means the phrase the library is looking for hasn't been set. 3 - Phrase not found in both specified langauge and fallback language. If this happens you should report this to the author of the addon. This error will occur if the language your client uses doesn't exist for the addon and its fallback language couldn't be found. 2 - Language not found, fallback language not found.
You should recommend to the author that they set a fallback language for their addon in this instance. This error will happen if the language you are using isn't available for the addon you're using. This is an optional argument.Įrror codes 1 - Language not found, no fallback language set for this addon.
The data should be an associative table with the placeholder being the key and the value being the fallback string. The identifier is the identification string that was used to define the phrase you're trying to get. The language is automatically determined by calling gmodI18n.getLanguageCode(). This function should always return a string. This will return a formed language string from an addon. A: Yes! Feel free to improve on the code, add features to the library or fix any bugs I may not have found.Īddon: getString(identifier :: string, data :: table) :: string. Otherwise, make an issue on this repository and your ideawill be considered. A: If you know how to implement it yourself, feel free to make a pull request with the changes your feature idea requires. Q: I have an idea I'd like to have implemented, where should I post my idea?. Remember, this library is free for you to modify and use to your liking, so don't complain if it takes a long time to fix your problem. A: Make an issue on this repository, clearly describing the issue you are having. Q: I'm having problems with the libary, where can I get help?. print(lang: getString( "helloWorld ",, if this doesn't work, the addon you're using might not have a translation available for your desired language. getAddon( "myTestAddon ") -Cache the translations at the start of the file -Somewhere later in the file.