Skip to content
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

Translations #53

Open
30 tasks
pretzlaw opened this issue Aug 30, 2020 · 1 comment · Fixed by #58
Open
30 tasks

Translations #53

pretzlaw opened this issue Aug 30, 2020 · 1 comment · Fixed by #58

Comments

@pretzlaw
Copy link
Contributor

pretzlaw commented Aug 30, 2020

translations:
  - 'some-dir/with-translations/'
  - 'en_US.single-translation.yaml'

services:
  Foo:
    arguments: '%bar%'

Translation:

# en_GB.yaml

This is a complete sentence: Ok cool

wp-di:
  is:
    great: n1
    huge:
      0: Nothing found.
      1: One found
      ">5": %d found

Possibly related functions to investigate:

  • get_locale
  • get_user_locale
  • translate
  • translate_with_gettext_context
  • __
  • esc_attr__
  • esc_html__
  • _e
  • esc_attr_e
  • esc_html_e
  • _x
  • _ex
  • esc_attr_x
  • esc_html_x
  • _n
  • _nx
  • _n_noop
  • _nx_noop
  • translate_nooped_plural
  • unload_textdomain
  • _get_path_to_translation
  • _get_path_to_translation_from_lang_dir
  • get_translations_for_domain
  • translate_user_role
  • get_available_languages
  • wp_get_installed_translations
  • switch_to_locale
  • restore_previous_locale
  • restore_current_locale
  • is_locale_switched
@pretzlaw pretzlaw added this to the 0.7 milestone Aug 30, 2020
@pretzlaw pretzlaw linked a pull request Sep 10, 2020 that will close this issue
@pretzlaw pretzlaw reopened this Sep 11, 2020
@pretzlaw
Copy link
Contributor Author

Now it is possible to:

services:
  Foo:
    arguments:
      - !__ [ Bar, baz-domain ]

The argument/translation itself will be lazy until needed (service used) or necessary (unused service but a translation needed to be resolved, e.g. for registering things in WordPress).

@ScreamingDev ScreamingDev removed this from the 0.7 milestone Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants