btcpayserver/BTCPayServer/Data
Wouter Samaey d8c1c51a21
Auto-detect language on payment page (#2552)
* Auto-detect language on payment page

based on the requst Accept-Language header, which is the language you configured in your browser/OS and this 99.99% accurate

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Services/LanguageService.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Added loop for all locales in Accept-Language sorted by weight + check if know this language

* New public method so a unit test can be created for it

* Unit test for language detection

* Fix language service when not in browser context

* fall back to default lang

* Auto-detect setting + ?lang=auto support

* Added invoice param "?lang=auto" info to docs

* Using null-coalescing assignment operator

* Reduce complexity and http dependency in language service

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-27 08:17:56 +02:00
..
Payouts Payouts: Detect External OnChain Payouts (#2462) 2021-07-16 09:57:37 +02:00
PullPayments Refactor and decouple Payout logic (#2046) 2021-04-13 17:36:49 +09:00
AddressInvoiceDataExtensions.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
APIKeyDataExtensions.cs GreenField: Switch to Blob for API Keys 2020-04-02 09:32:22 +02:00
HistoricalAddressInvoiceDataExtensions.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
InvoiceDataExtensions.cs Create Metadata property for InvoiceEntity, migrate all data without logic there 2020-08-26 21:36:31 +09:00
PaymentDataExtensions.cs Add callback doc 2020-11-16 12:13:27 +09:00
PaymentRequestDataExtensions.cs Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
StoreBlob.cs Auto-detect language on payment page (#2552) 2021-07-27 08:17:56 +02:00
StoreDataExtensions.cs Fix issue with store payment methods after having payment method that is no longer supported (#2349) 2021-03-10 19:51:51 +09:00
WalletDataExtensions.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
WalletTransactionDataExtensions.cs GreenField API: Wallet API (#2246) 2021-03-11 21:34:52 +09:00
WebhookDataExtensions.cs Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00