Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    27

    Default Customize Icon URL based on Language

    Hi,

    I am trying to add an icon to my Cpanel that will redirect the user to a different URL based on language.

    Example conf file entry:
    description=>$LANG{'namestring'},url=>[FRENCH-OR-ENGLISH URL DEPENDING ON ACTIVE LANGUAGE HERE]

    So basically how can I get this to work? The way I see it there are two solutions that may work:

    - Make the field url accept the LANG function, so that I could hardcode the link per language in the language file
    - Use some js trigger to force a window.location based on an existing language condition that the js script would be able to read (if this is possible, can you please provide a concrete example how to use this function)
    - point url to an internal cpanel page that would then redirect to a different url based on language (again a language condition would need to be read, would need a specific example on how to do this).

    Finally, perhaps more importantly, how do I go about adding a new language entry? ie. would like to add entry 'namestring' to all existing themes in all languages. Is this done via the WHM, or is there a specific file on the server I can access to edit and add new strings. I noticed WHM has an option to edit existing strings, but not to add new strings (at least as far as I could tell).

    Thanks for your help!
    nCube Solutions powers businesses on the Web

  2. #2
    Member
    Join Date
    Oct 2006
    Location
    Montreal
    Posts
    27

    Default Re: Customize Icon URL based on Language

    I have been doing some more digging around and reading up on Locales, but I find the docs currently available of very limited use. I was looking at cPanel Locales but I don't even understand who the intended audience for these articles are. It looks like these are written for the developers using the API, but what about the end-user wishing to make basic changes to the existing language strings?

    From what I understand, if I want to add one new language variable to the system, with say, key 'example', I would need to download a 6MB english XML locale file, add the entry, then re-upload the entire file into the system? Then repeat for all other affected languages? Seems like overkill. Can someone clear this up for me? Maybe I'm just misunderstanding how this is supposed to work.
    nCube Solutions powers businesses on the Web

Similar Threads & Tags
Similar threads

  1. need Ip based URL for an addon domain
    By crazyaboutlinux in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 06-07-2011, 08:01 PM
  2. problem while viewing a website via IP based URL
    By crazyaboutlinux in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 03-21-2011, 02:15 PM
  3. name-based vs IP-based virtual hosting
    By TomLu in forum New User Questions
    Replies: 1
    Last Post: 03-06-2009, 09:18 AM
  4. Bandwidth not counted on IP based url
    By Incognito969 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 12-22-2003, 01:12 AM
  5. Created name-based account, how do I convert it to IP-based?
    By avara in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-28-2002, 07:23 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube