btcpayserver/BTCPayServer/Controllers/GreenField
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
..
ApiKeysController.cs Plugins: Allow creation of independent DbContexts 2020-11-18 12:27:26 +01:00
GreenFieldUtils.cs Make sure model binder error are returning error 422, use DateTimeOffsetModelBinder 2021-04-26 12:37:56 +09:00
HealthController.cs Enable CORS and fix small doc error 2020-06-30 08:26:19 +02:00
InvoiceController.cs Auto-detect language on payment page (#2552) 2021-07-27 08:17:56 +02:00
LightningNodeApiController.cs Refactor how we handle and validate LN ConnectionStrings (#2314) 2021-03-02 11:11:58 +09:00
LightningNodeApiController.Internal.cs Refactor how we handle and validate LN ConnectionStrings (#2314) 2021-03-02 11:11:58 +09:00
LightningNodeApiController.Store.cs Refactor how we handle and validate LN ConnectionStrings (#2314) 2021-03-02 11:11:58 +09:00
NotificationsController.cs GreenField: Notifications API (#2055) 2020-12-11 23:11:08 +09:00
PaymentRequestsController.cs Plugins: Allow creation of independent DbContexts 2020-11-18 12:27:26 +01:00
PullPaymentController.cs Do not retrieve all payouts in GetPullPayment every time 2021-06-10 18:54:27 +09:00
ServerInfoController.cs Update HWI library, warn users to run newer version (#2544) 2021-06-06 21:02:15 +09:00
StoreLightningNetworkPaymentMethodsController.cs Greenfield: Rename enabledOnly to enabled? 2021-07-26 12:03:11 +02:00
StoreOnChainPaymentMethodsController.cs Greenfield: Rename enabledOnly to enabled? 2021-07-26 12:03:11 +02:00
StoreOnChainWalletsController.cs Add "skip" and "limit" params for onchain txs API endpoint (#2688) 2021-07-10 13:04:01 +09:00
StorePaymentMethodsController.cs Greenfield: Rename enabledOnly to enabled? 2021-07-26 12:03:11 +02:00
StoresController.cs Make Invoice Create Faster And Fix Gap Limit Issue (#1843) 2021-04-07 13:08:42 +09:00
StoreWebhooksController.cs Greenfield: Human friendly error if webhook or delivery not found 2021-04-27 15:38:42 +09:00
TestApiKeyController.cs Plugins: Allow creation of independent DbContexts 2020-11-18 12:27:26 +01:00
UsersController.cs Improve tests and small refactoring 2021-06-04 12:20:45 +02:00