| 1 | // Copyright 2014 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package languagescip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/ |
| 6 | |
| 7 | // BaseLanguages returns the list of all supported base languages. It generates |
| 8 | // the list by traversing the internal structures. |
| 9 | func BaseLanguagesscip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/BaseLanguages().() []Languagescip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/Language# { |
| 10 | base := make([]Languagescip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/Language#, 0, NumLanguagesscip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/NumLanguages.) |
| 11 | for i := 0; i < langNoIndexOffsetscip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/langNoIndexOffset.; i++ { |
| 12 | // We included "und" already for the value 0. |
| 13 | if i != nonCanonicalUndscip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/nonCanonicalUnd. { |
| 14 | base = append(base, Languagescip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/Language#(i)) |
| 15 | } |
| 16 | } |
| 17 | i := langNoIndexOffsetscip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/langNoIndexOffset. |
| 18 | for _, v := range langNoIndexscip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/langNoIndex. { |
| 19 | for k := 0; k < 8; k++ { |
| 20 | if v&1 == 1 { |
| 21 | base = append(base, Languagescip-go gomod golang.org/x/text . `golang.org/x/text/internal/language`/Language#(i)) |
| 22 | } |
| 23 | v >>= 1 |
| 24 | i++ |
| 25 | } |
| 26 | } |
| 27 | return base |
| 28 | } |