Tornado 5.1 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found Warning: Applications that do not use TLS may be vulnerable to DNS rebinding attacks. This attack is es- pecially relevant to applications that only listen on 127.0.0.1` or other private networks. Appropriate Release 5.1.1 To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale0 码力 | 243 页 | 895.80 KB | 1 年前3Tornado 4.5 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 333 页 | 322.34 KB | 1 年前3Tornado 6.1 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 245 页 | 904.24 KB | 1 年前3Tornado 4.5 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 222 页 | 833.04 KB | 1 年前3Tornado 6.0 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 245 页 | 885.76 KB | 1 年前3Tornado 6.4 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.2 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 260 页 | 1.06 MB | 1 年前3Tornado 6.4 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.3 Documentation
based on the supported locales. For example, if the user’s locale is es_GT, and the es locale is supported, self.locale will be es for that request. We fall back on en_US if no close match can be found localized strings. To load a locale and generate a translated string: user_locale = tornado.locale.get("es_LA") print(user_locale.translate("Sign out")) tornado.locale.get() returns the closest matching locale associated translations. The directory should have translation files of the form LOCALE.csv, e.g. es_GT.csv. The CSV files should have two or three columns: string, translation, and an optional plural0 码力 | 264 页 | 1.06 MB | 1 年前3
共 20 条
- 1
- 2