• Home
  • Raw
  • Download

Lines Matching +full:locales +full:- +full:all

22  * \brief C++ API: Locale matcher: User's desired locales vs. application's supported locales.
51 * Builder option for whether all desired locales are treated equally or
59 * All desired locales are treated equally.
65 * Earlier desired locales are preferred.
73 * <p>For example: <code>Supported={en, sv} desired=[en-GB, sv]</code>
74 * yields <code>Result(en-GB, en)</code> because
76 * the region distance between the earlier desired locale en-GB and en=en-US.
81 * the typical region difference. (Example: sr-Latn vs. sr-Cyrl)
97 * Builder option for whether to include or ignore one-way (fallback) match data.
104 * the client’s Accept-Language header data.
115 * Locale matching includes one-way matches such as Breton→French. (default)
121 * Locale matching limited to two-way matches including e.g. Danish↔Norwegian
122 * but ignoring one-way matches.
144 * Immutable class that picks the best match between a user's desired locales and
145 * an application's supported locales.
151 …* LocaleMatcher matcher = LocaleMatcher::Builder().setSupportedLocales("fr, en-GB, en").build(erro…
157 * and when regional variants are close, like en-GB and en-AU as opposed to en-US.
159 * <p>If there are multiple supported locales with the same (language, script, region)
160 * likely subtags, then the current implementation returns the first of those locales.
165 * de, de-DE, de-Latn, de-1901, de-u-co-phonebk.
168 * or place it earlier in the list of supported locales.
170 * <p>Otherwise, the order of supported locales may have no effect on the best-match results.
171 * The current implementation compares each desired locale with supported locales
174 * 2. CLDR "paradigm locales" like en-GB and es-419;
175 * 3. other supported locales.
189 * Data for the best-matching pair of a desired and a supported locale.
222 * Returns the best-matching desired locale.
223 * nullptr if the list of desired locales is empty or if none matched well enough.
225 * @return the best-matching desired locale, or nullptr.
231 * Returns the best-matching supported locale.
234 * or if the list of supported locales is empty and no explicit default locale is set.
236 * @return the best-matching supported locale, or nullptr.
242 * Returns the index of the best-matching desired locale in the input Iterable order.
243 * -1 if the list of desired locales is empty or if none matched well enough.
245 * @return the index of the best-matching desired locale, or -1.
251 * Returns the index of the best-matching supported locale in the
252 * constructor’s or builder’s input order (“set” Collection plus “added” locales).
255 * -1 if the list of supported locales is empty or if none matched well enough.
257 * @return the index of the best-matching supported locale, or -1.
263 * Takes the best-matching supported locale and adds relevant fields of the
264 * best-matching desired locale, such as the -t- and -u- extensions.
269 * <p>Example: desired=ar-SA-u-nu-latn, supported=ar-EG, resolved locale=ar-SA-u-nu-latn
271 * @return a locale combining the best-matching desired and supported locales.
337 * Parses an Accept-Language string
338 * (<a href="https://tools.ietf.org/html/rfc2616#section-14.4">RFC 2616 Section 14.4</a>),
339 * such as "af, en, fr;q=0.9", and sets the supported locales accordingly.
341 * Clears any previously set/added supported locales first.
343 * @param locales the Accept-Language string of locales to set
347 Builder &setSupportedLocalesFromListString(StringPiece locales);
350 * Copies the supported locales, preserving iteration order.
351 * Clears any previously set/added supported locales first.
354 * @param locales the list of locale
358 Builder &setSupportedLocales(Locale::Iterator &locales);
361 * Copies the supported locales from the begin/end range, preserving iteration order.
362 * Clears any previously set/added supported locales first.
384 * Copies the supported locales from the begin/end range, preserving iteration order.
386 * Clears any previously set/added supported locales first.
431 * There is no default locale at all (nullptr will be returned instead)
453 * Option for whether all desired locales are treated equally or
463 * Option for whether to include or ignore one-way (fallback) match data.
479 * The matcher will return a match for a pair of locales only if
482 * For example, setMaxDistance(en-US, en-GB) limits matches to ones where the
483 * (desired, support) locales have a distance no greater than a region subtag difference.
488 * Specifying a maximum distance in relative terms via a sample pair of locales
489 * insulates from changes that affect all distance metrics similarly,
491 * different pairs of locales.
535 int32_t thresholdDistance_ = -1;
578 * @return the best-matching supported locale.
584 * Returns the supported locale which best matches one of the desired locales.
590 * @return the best-matching supported locale.
596 * Parses an Accept-Language string
597 * (<a href="https://tools.ietf.org/html/rfc2616#section-14.4">RFC 2616 Section 14.4</a>),
599 * and returns the supported locale which best matches one of the desired locales.
602 * @param desiredLocaleList Typically a user's languages, as an Accept-Language string.
606 * @return the best-matching supported locale.
612 * Returns the best match between the desired locale and the supported locales.
620 * @return the best-matching pair of the desired and a supported locale.
626 * Returns the best match between the desired and supported locales.
628 * the best-matching desired locale. The Result object owns the clone.
634 * @return the best-matching pair of a desired and a supported locale.
640 * Returns true if the pair of locales matches acceptably.
649 * @return true if the pair of locales matches acceptably.
663 * <p>Callers should construct and use a matcher rather than match pairs of locales directly.
696 // These are in preference order: 1. Default locale 2. paradigm locales 3. others.