
Feature request - Need javascript adaption of language calls
Reported by dleffler | November 10th, 2011 @ 12:50 PM
Need javascript access to the language/translation array and also a method to add phrases in javascript code to the (system) phrase library as found in the php method gettext();
Comments and changes to this ticket
-
expNinja November 17th, 2011 @ 03:11 AM
(from [853926f55f4fc9a5525a3611878b0eefb92fdcd7]) Adds some additional language-izing, including some javascript in the php code like the file manager & menu/page hierarchy [#296] [#394] https://github.com/exponentcms/exponent-cms/commit/853926f55f4fc9a5...
-
dleffler November 18th, 2011 @ 03:34 PM
Still researching a solution...though inside a php or tpl file (server-side processed) we can easily accomplish this with the inline javascript code, it becomes more difficult inside a js file (client-side processed which isn't parsed through php).
I have a locally working version which passes the entire phrase dictionary via json, but this is now an additional 250K (and growing) of code per page. Therefore it'd be better if we could either pass only the few phrases we are using (kinda like php & tpl is done) or cache the dictionary locally.
-
dleffler December 13th, 2011 @ 06:22 PM
- Milestone set to 2.0.4
- State changed from new to open
- Milestone order changed from 121 to 0
-
dleffler January 27th, 2012 @ 11:58 AM
- Milestone changed from 2.0.4 to 2.0.5
- Milestone order changed from 2 to 0
-
dleffler February 25th, 2012 @ 02:12 AM
- Milestone changed from 2.0.5 to 2.0.6
- Milestone order changed from 4 to 0
-
-
dleffler April 23rd, 2012 @ 01:19 PM
Perhaps a usable solution would be to:
- create a js function almost identical to the php gt() function
- parse out js gt() calls into a js language file. This file would hold ALL the js language calls which would make it easier to edit them and only require two language files/libraries per language.
-
dleffler July 30th, 2013 @ 01:20 PM
Perhaps we could ajax/json a call to expLang and get the strings if we had a global javascript gt() function? Might be slow, but we don't have a lot of javascript only files
-
-
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS
Tags
Referenced by
-
296 Upgrade: 'Language-ize' remaining static content (from [853926f55f4fc9a5525a3611878b0eefb92fdcd7]) Adds so...