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

Multi Language Buttons #20

Open
oaragones opened this issue Apr 18, 2018 · 0 comments
Open

Multi Language Buttons #20

oaragones opened this issue Apr 18, 2018 · 0 comments

Comments

@oaragones
Copy link

Hi! I was thinking to improve the multi language grav to this plugins.

Something like adding the file to the root plugin:
languages.yaml

Then inside this files define all the labels can be modifyed by the language site. For example:

es:
  PLUGIN_SNIPCART:
    CARD: Carrito
    ADD_TO_CARD: 'Añadir al carrito'
    DETAIL: 'Detalle'

ca:
  PLUGIN_SNIPCART:
    CARD: Cistell
    ADD_TO_CARD: 'Afegir al cistell'
    DETAIL: 'Detalls'

Then into :
snipcart_detail_item.html

Add the template for the use the Language traductor tag:
{{ "PLUGIN_SNIPCART.ADD_TO_CARD"|t|e }}

in case of the old "Add" static label.

Any ideas or working progress were welcome!

Best regards,

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

No branches or pull requests

1 participant