Add documentation for new locale information methods #198
+22
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows developers to obtain localisation information of the application and the system via the
App
facade.It adds three new methods to the facade that are proxies for the Electron methods
app.getLocale()
,app.getLocaleCountryCode()
, andapp.getSystemLocale()
(see details on the Electron documentation). This allows developers to improve the localisation of their application, e.g. by automatically setting or suggesting a language that matches the system language when a NativePHP application is first launched.Electron PR: NativePHP/electron#247
Laravel PR: NativePHP/laravel#681
If there's anything you'd like me to tweak or improve in this PR, please let me know. 😊