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

Issue/21 language system changes in 3.2 #38

Conversation

nickvergessen
Copy link
Contributor

@nickvergessen nickvergessen added this to the 3.2.0 milestone May 31, 2015
-------------------------

To load a file from an extension
you need to use ``phpbb\language\language::add_lang_ext()`` which takes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpbb\language\language::add_lang() first argument array of the language files, second argument is the name of the extension

@nickvergessen nickvergessen force-pushed the issue/21-language-system-changes-in-3.2 branch from 6bf972a to dea5b8c Compare June 4, 2015 10:09
@nickvergessen
Copy link
Contributor Author

@CHItA updated


Loading from an extension
-------------------------

To load a file from an extension
you need to use ``phpbb\user::add_lang_ext()`` which takes
you need to use ``phpbb\language\language::add_lang_ext()`` which takes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add_lang() as well for exts, as in the examples below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmpf must have slipped through

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@iMattPro
Copy link
Member

iMattPro commented Jun 4, 2015

Add a bit about the new lang system replacement for LA_KEY by doing {{ lang('KEY')|e('js') }}
Other possible options:
{{ lang('KEY')|escape('js') }}
{{ lang('KEY')|e('addslashes') }}
{{ lang('KEY')|escape('addslashes') }}

addslashes is our own custom func that simply addslashes the string.
js is a native twig function that escapes a string for the JavaScript context.

@nickvergessen
Copy link
Contributor Author

@VSEphpbb since those comments need to go into 3.1 aswell, please create a new issue (and feel free to prepare a patch ;) )

nickvergessen added a commit that referenced this pull request Jun 5, 2015
…ges-in-3.2

Issue/21 language system changes in 3.2
@nickvergessen nickvergessen merged commit 1558cd7 into phpbb:master Jun 5, 2015
@nickvergessen nickvergessen deleted the issue/21-language-system-changes-in-3.2 branch June 5, 2015 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants