-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
gettext: refresh page #16555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
gettext: refresh page #16555
Changes from 12 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
eb63df5
Update gettext.md
KristopherLeads 78c7d1b
Update gettext.md
KristopherLeads ad7e3dc
Update gettext.md
KristopherLeads 8128f93
Update gettext.md
KristopherLeads e65d165
Update pages/common/gettext.md
KristopherLeads b8d56b6
Update pages/common/gettext.md
KristopherLeads e326f4e
Update gettext.md
KristopherLeads 1c155b1
Update pages/common/gettext.md
KristopherLeads 5a4e98e
Update gettext.md
KristopherLeads e5327a0
Update gettext.md
KristopherLeads fc14447
Update gettext.md
KristopherLeads f0e65b5
Update gettext.md
KristopherLeads 031f270
Update gettext.md
KristopherLeads f14a0fb
Update gettext.md
KristopherLeads 6b3e0b2
Merge branch 'main' into gettext-update
KristopherLeads 0036146
Update gettext.md
KristopherLeads c975e7e
Update gettext.md
KristopherLeads bc79a98
Update pages/common/gettext.md
KristopherLeads 10ee5a4
Update pages/common/gettext.md
KristopherLeads 75a9e38
Update pages/common/gettext.md
KristopherLeads c7a7f7b
Update pages/common/gettext.md
KristopherLeads 69f4ad1
Update pages/common/gettext.md
KristopherLeads 865d3da
Update pages/common/gettext.md
KristopherLeads 62c55d2
Update pages/common/gettext.md
KristopherLeads 8d64e83
Update pages/common/gettext.md
KristopherLeads 9c544b5
Update gettext.md
KristopherLeads 4d0c4fa
Update pages/common/gettext.md
KristopherLeads aa357ae
Update pages/common/gettext.md
KristopherLeads e7bfdac
Update gettext.md
KristopherLeads 2537b39
Update gettext.md
KristopherLeads afdcd72
Update gettext.md
KristopherLeads 8236954
Update gettext.md
Managor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,12 +1,25 @@ | ||
# gettext | ||
|
||
> Get string translations. | ||
> Takes a string and tries to return the translated version based on your current language and app settings. | ||
> By default, gettext looks for translations here: '<LOCALEDIR>/<LANG>/LC_MESSAGES/<domain>.mo'. | ||
> For example, gettext would look for a Spanish translation file called asd.mo in 'locale/es/LC_MESSAGES/asd.mo'. | ||
> Note that gettext looks in the global 'messages' domain. If you want to use any other domain, you need to use the 'context' or 'textdomain' optional flags. | ||
> If no translation exists when gettext is invoked, it returns in English. | ||
> See also: `msgfmt`. | ||
> More information: <https://www.gnu.org/software/gettext/manual/html_node/gettext-Invocation.html>. | ||
|
||
- Get the translation of a string or output a default string if it doesn't exist: | ||
- Get the translation of a string, or output a default string if no translation exists: | ||
|
||
`LANGUAGE={{locale}} gettext {{msgid}} {{default_value}}` | ||
|
||
- Use context to disambiguate where you want the string origin to be located (e.g. Open "File" as a menu item, or linguistically as in "file away the burr"?): | ||
|
||
`gettext {{[-c|--context]}} {{context}}` | ||
|
||
- Specify the domain (e.g., package, program, module - the namespace or "filename") you want gettext to look inside for the translation: | ||
|
||
`gettext {{[-d|--domain]}} {{textdomain}}` | ||
|
||
- Display help: | ||
|
||
`gettext {{[-h|--help]}}` |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.