r2 - 2008-01-22 - 03:21:27 - TWikiContributorYou are here: NTP >  TWiki Web > TWikiI18NDotPm
NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

ntp-4.2.8p15 was released on 23 June 2020. It addresses 1 medium-severity security issue in ntpd, and provides 13 non-security bugfixes over 4.2.8p13.

Please see the NTP Security Notice for vulnerability and mitigation details.

Are you using Autokey in production? If so, please contact Harlan - he's got some questions for you.

Package TWiki::I18N

Support for strings translation and language detection.

ClassMethod available_languages

Lists languages tags for languages available at TWiki installation. Returns a list containing the tags of the available languages.

Note: the languages available to users are determined in the configure interface.

ClassMethod new ($session)

Constructor. Gets the language object corresponding to the current users language. If $session is not a TWiki object reference, just calls Local::Maketext::new (the superclass constructor)

ObjectMethod finish ()

Break circular references.

ObjectMethod maketext ($text) -> $translation

Translates the given string (assumed to be written in English) into the current language, as detected in the constructor, and converts it into the site charset.

Wraps around Locale::Maketext's maketext method, adding charset conversion and checking

Return value: translated string, or the argument itself if no translation is found for thet argument.

ObjectMethod language () -> $language_tag

Indicates the language tag of the current user's language, as detected from the information sent by the browser. Returns the empty string if the language could not be determined.

ObjectMethod enabled_languages () -> %languages

Returns an array with language tags as keys and language (native) names as values, for all the languages enabled in this TWikiSite. Useful for listing available languages to the user.

ObjectMethod fromSiteCharSet ($text) -> $encoded

This method receives $text, assumed to be encoded in {Site}{CharSet}, and converts it to a internal representation.

Currently this representation will be a UTF-8 string, but this may change in the future. This way, you can't assume any property on the returned value, and should only use the returned value of this function as input to toSiteCharSet. If you change the returnd value, either by removing, updating or appending characters, be sure to touch only ASCII characters (i.e., characters that have ord() less than 128).

ObjectMethod toSiteCharSet ($encoded) -> $text

This method receives a string, assumed to be encoded in TWiki's internal string representation (as generated by the fromSiteCharSet method, and converts it into {Site}{CharSet}.

When converting into {Site}{CharSet}, characters that are not present at that charset are represented as HTML numerical character entities (NCR's), in the format &#NNNN;, where NNNN is the character's Unicode codepoint.

See also: the fromSiteCharSet method.

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NTP? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TWikiI18NDotPm