Search the Community
Showing results for tags 'string translation'.
-
I have a javascript animation similar to this codepen here: https://codepen.io/Anthony-Osceola/pen/YPPXwJw My version requires that the string is contained in a const variable. This is what I've tried: ..... .......... const paragraphs = [ <?=__("Here is some text.")?>, <?=__("Here is some more text")?> ]; function buildParagraph(text) {.......... While I've managed to translate the rest of the page, I'm having trouble getting text within javascript tags to work. They show in the admin but the translated text won't display for the JS animation. Would I be better off just creating another template for this translated page? I thought that doing so could be bad for SEO if it's counted as duplicate content. Any advice appreciated.
- 1 reply
-
- translation
- multi-language urls
-
(and 1 more)
Tagged with:
-
Hello, recently i came across this issue. Basically, I am using TemplateEngineBlade module which allows me to use Blade templating engine in my templates. I needed to translate strings like '__(<your string>)', but since the module compiles the templates into its own directory (as highlighted in screenshots), the language translator find the function call in 2 files: Template where the code is written Modules 'compiled'/cache directory where the templates are in their compiled state Now, I actually have to translate the string in its compiled directory else it doesn't work at all. But since that filename changes often it is not usable at all. I tryed prepending all templates with a file (for example _init.php) and getting all translatable strings there which works but not for the use cases where i need to get same string translated in multiple languages in a single page - I would have to create separate variables. Does anyone have any idea which would help me work around my issue? Thanks
- 4 replies
-
- template engine
- string translation
-
(and 1 more)
Tagged with: