-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1d2ca7
commit c181730
Showing
6 changed files
with
304 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,294 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { LanguageGroup } from './language-picker'; | ||
import { I18nReact } from '@automattic/react-i18n'; | ||
|
||
export const createLanguageGroups = ( __: I18nReact[ '__' ] ): LanguageGroup[] => [ | ||
{ | ||
id: 'popular', | ||
name: () => __( 'Popular languages' ), | ||
}, | ||
{ | ||
id: 'africa-middle-east', | ||
name: () => __( 'Africa and Middle East' ), | ||
subTerritories: [ '145', '002' ], | ||
countries: [ | ||
'AE', | ||
'AM', | ||
'AO', | ||
'AZ', | ||
'BF', | ||
'BH', | ||
'BI', | ||
'BJ', | ||
'BW', | ||
'CD', | ||
'CF', | ||
'CG', | ||
'CI', | ||
'CM', | ||
'CV', | ||
'CY', | ||
'DJ', | ||
'DZ', | ||
'EA', | ||
'EG', | ||
'EH', | ||
'ER', | ||
'ET', | ||
'GA', | ||
'GE', | ||
'GH', | ||
'GM', | ||
'GN', | ||
'GQ', | ||
'GW', | ||
'IC', | ||
'IL', | ||
'IQ', | ||
'JO', | ||
'KE', | ||
'KM', | ||
'KW', | ||
'LB', | ||
'LR', | ||
'LS', | ||
'LY', | ||
'MA', | ||
'MG', | ||
'ML', | ||
'MR', | ||
'MU', | ||
'MW', | ||
'MZ', | ||
'NA', | ||
'NE', | ||
'NG', | ||
'OM', | ||
'PS', | ||
'QA', | ||
'RE', | ||
'RW', | ||
'SA', | ||
'SC', | ||
'SD', | ||
'SH', | ||
'SL', | ||
'SN', | ||
'SO', | ||
'SS', | ||
'ST', | ||
'SY', | ||
'SZ', | ||
'TD', | ||
'TG', | ||
'TN', | ||
'TR', | ||
'TZ', | ||
'UG', | ||
'YE', | ||
'YT', | ||
'ZA', | ||
'ZM', | ||
'ZW', | ||
], | ||
}, | ||
{ | ||
id: 'americas', | ||
name: () => __( 'Americas' ), | ||
subTerritories: [ '019' ], | ||
countries: [ | ||
'AG', | ||
'AI', | ||
'AR', | ||
'AW', | ||
'BB', | ||
'BL', | ||
'BM', | ||
'BO', | ||
'BQ', | ||
'BR', | ||
'BS', | ||
'BZ', | ||
'CA', | ||
'CL', | ||
'CO', | ||
'CR', | ||
'CU', | ||
'CW', | ||
'DM', | ||
'DO', | ||
'EC', | ||
'FK', | ||
'GD', | ||
'GF', | ||
'GL', | ||
'GP', | ||
'GT', | ||
'GY', | ||
'HN', | ||
'HT', | ||
'JM', | ||
'KN', | ||
'KY', | ||
'LC', | ||
'MF', | ||
'MQ', | ||
'MS', | ||
'MX', | ||
'NI', | ||
'PA', | ||
'PE', | ||
'PM', | ||
'PR', | ||
'PY', | ||
'SR', | ||
'SV', | ||
'SX', | ||
'TC', | ||
'TT', | ||
'US', | ||
'UY', | ||
'VC', | ||
'VE', | ||
'VG', | ||
'VI', | ||
], | ||
}, | ||
{ | ||
id: 'asia-pacific', | ||
default: true, | ||
name: () => __( 'Asia-Pacific' ), | ||
subTerritories: [ '143', '009', '030', '034', '035' ], | ||
countries: [ | ||
'AC', | ||
'AF', | ||
'AQ', | ||
'AS', | ||
'AU', | ||
'BD', | ||
'BN', | ||
'BT', | ||
'BV', | ||
'CC', | ||
'CK', | ||
'CN', | ||
'CP', | ||
'CX', | ||
'DG', | ||
'FJ', | ||
'FM', | ||
'GS', | ||
'GU', | ||
'HK', | ||
'HM', | ||
'ID', | ||
'IN', | ||
'IO', | ||
'IR', | ||
'JP', | ||
'KG', | ||
'KH', | ||
'KI', | ||
'KP', | ||
'KR', | ||
'KZ', | ||
'LA', | ||
'LK', | ||
'MH', | ||
'MM', | ||
'MN', | ||
'MO', | ||
'MP', | ||
'MV', | ||
'MY', | ||
'NC', | ||
'NF', | ||
'NP', | ||
'NR', | ||
'NU', | ||
'NZ', | ||
'PF', | ||
'PG', | ||
'PH', | ||
'PK', | ||
'PN', | ||
'PW', | ||
'QO', | ||
'SB', | ||
'SG', | ||
'TA', | ||
'TF', | ||
'TH', | ||
'TJ', | ||
'TK', | ||
'TL', | ||
'TM', | ||
'TO', | ||
'TV', | ||
'TW', | ||
'UM', | ||
'UZ', | ||
'VN', | ||
'VU', | ||
'WF', | ||
'WS', | ||
], | ||
}, | ||
{ | ||
id: 'eastern-europe', | ||
name: () => __( 'Eastern Europe' ), | ||
subTerritories: [ '151' ], | ||
countries: [ 'BG', 'BY', 'CZ', 'HU', 'MD', 'PL', 'RO', 'RU', 'SK', 'UA' ], | ||
}, | ||
{ | ||
id: 'western-europe', | ||
name: () => __( 'Western Europe' ), | ||
subTerritories: [ '154', '155', '039' ], | ||
countries: [ | ||
'AD', | ||
'AL', | ||
'AT', | ||
'AX', | ||
'BA', | ||
'BE', | ||
'CH', | ||
'DE', | ||
'DK', | ||
'EE', | ||
'ES', | ||
'FI', | ||
'FO', | ||
'FR', | ||
'GB', | ||
'GG', | ||
'GI', | ||
'GR', | ||
'HR', | ||
'IE', | ||
'IM', | ||
'IS', | ||
'IT', | ||
'JE', | ||
'LI', | ||
'LT', | ||
'LU', | ||
'LV', | ||
'MC', | ||
'ME', | ||
'MK', | ||
'MT', | ||
'NL', | ||
'NO', | ||
'PT', | ||
'RS', | ||
'SE', | ||
'SI', | ||
'SJ', | ||
'SM', | ||
'VA', | ||
'XK', | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './language-picker'; | ||
export { default } from './language-picker'; | ||
export * from './constants'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare const __i18n_text_domain__: string; |