Liquid: What are the suggested best practises for multiple languages?

Right now we are doing this:
{% if globals.country == "EU" %}
{% assign login = "Log in" %}
{% assign userName = "Username" %}
{% assign password = "Password" %}
{% assign rememberMe = "Remember me?" %}
{% assign confirmLogout = "You are now logged out!" %}
{% endif %}
{{login}} would output "Log in"
Another thought would be to have it all in a string with commas and split it, like this:
{% if globals.country == "EU" %}
{% assign strings = "Log in;Username;Password;Remember me?;You are now logged out!" %}
{% assign lang = strings | split: ";" %}
{% endif %}
{{lang[0]}} Would output "Log in".
What are the best practises here?
I would imagine either being slower than the other as well, maybe Adobe have some input?

Hi Machinette,
Use your first option in my opinion:
A webapp where each item would contain a field for each language. i.e.  item 1 name login; en -> Log in; es -> Iniciar sesion. item 2 name logout; en -> Log iout; es -> Cerrar sesion....
Here's an example of my multilingual web apps:
FAQs:
EN Question
JP Question
EN Answer
JP Answer
Testimonials:
Title-NZ
Title-JP
Quote-Preview-NZ
Quote-Preview-JP
Quote-Full-JP
How did you hear about us:
Title_En
Title_JP
Multilingual Text:
Text_En
Text JP
As you can see above, the items in the web apps form the different multilingual text - the different FAQs, the different Testimonials, the different Multilingual Text. The domain name needs to determine the language. Very important. And use a globals.site.countryCode to determine the language.
The key is when you want to reference that item. I think Abhishek was onto it using JSON files, easy to select the text you want. If JSON files don't work, here's what you do:
{module_webapps id="Multilingual Text" filter="i" itemId="4951580"}<!-- login -->
{module_webapps id="Multilingual Text" filter="i" itemId="4951611"}<!-- Try Lesson 1 -->
{module_webapps id="Multilingual Text" filter="i" itemId="4951612"}<!-- Join for free -->
Else place everything into a collection, but I have hundreds of items, so I don't want to collect too many records. Only the ones I need per page.
Finally, here's my code for one of the web apps, FAQs.
{% assign countrycode = globals.site.countryCode -%}
{% case countrycode -%}
{% when 'JP' -%}
<div class="faq-question">
    <h4>{{this['JP Question']}}</h4>
    <div class="faq-details">
        <div class="answer"><p>{{this['JP Answer']}}</p></div>
    </div>
</div>
{% else -%}
<div class="faq-question">
    <h4>{{this['EN Question']}}</h4>
    <div class="faq-details">
        <div class="answer"><p>{{this['EN Answer']}}</p></div>
    </div>
</div>
{% endcase -%}
http://www.samandmelenglish.com/faqs
http://www.samandmelenglish.jp/faqs
Hope this helps.
Stephen - Fuel Design

Similar Messages

  • What Are the Exact Basic rules for Replying a Thread...... -:)   @};-

    Hi Experts,
    After Looking into the forums many days I had a small conclusion about forums,
    SAP Forums are better place I have seen for getting a goo dhelp & Knowledge...
    Why can't we make it a BEST Place.
    This is just a small doubt which I would like to clear myself first,
    I have seen many users In the forums asking for a Basic Questions
    When cleared, But still they want to have a Spoon feeding with a Sample Code.
    When Sample Code Given they will provide the original code and requests for Modifications.
    These always looks to me as crazy.
    I have seen somelong time agin by moderators posting that In SCN there will be no SPOON FEEDING.
    I am not sure whether if still this Rule AVAILABLE or NOT.
    Ok if the task is really difficult let them ask again and again,
    And it was not replied, let them repost, I agree with them.
    And How about a User Registered in SDN very long back and asking for a silly question in below thread,
    [Sendin Email to the recipent list -Need correct FM |Getting the address from shipto partner of Bil. item not directly from C.ma]
    This is one more example, really funny, The thread poster needs the solution at any cost, he doesn't require and Suggetions,,, {He Only needs Solution}
    [Radio Buttons |Radio Buttons;
    [Turning Off Debugger |Turning Off Debugger;
    [Regarding Amount in words|Regarding Amount in words;
    There are 100's of threads like this....Everyone knows this facts.
    Check this who answered this one and who replied correct answer, who copied, finally who was rewarded...!
    [how to validate POsting period |Re: how to validate POsting period]
    Now My Real Problem is....!
    User is always intelligent, Only the weakness is in Contributor, trying to help them,..,
    And I openly say that Someone requesting for basic help is not DUMB, But the Contributor replying forgets
    the basic rules " Why Contributing ?"
    According to me It's not the Requestor to see Rules & Requlations before posting the threads,
    But its responsibilty for the Contributing person to see th Rules & Requlations before replying the threads,
    If we follow the rules and stand on a single word or rule or anything there will be Good Result.
    Major Problem is in US not anyone else.
    Example Some one saying search in the forum,,, then please no replies after that...
    But we are very pity hearted again we post the solution,,,
    But it is not at all enough(for cintribtor's)... they will copy the solution and post again by slight Modifications,
    And Some users are having 500,600,700,800 Posts with 0 points, registered long long back.
    They are completly dependent on forums,,, As they goto office and as they eat, The same they open forums and ask Queries...
    They will never realize what they are doing,, and we will never let them improve better...
    Finally Lets Discuss About this and Correct & Suggest me if I am wrong,
    Is my thoughts are going in the right way or not I am not even sure... Please Aslo Correct me if I did any mistakes.
    Thanks & regards,
    Dileep .C
    Edited by: Dileep Kumar Chinnaiah on Apr 29, 2009 12:33 PM
    Title Changed Form
    "What to do when someone asking for Basic Questions" to "What Are the Exact Basic rules for Replying a Threads...... "

    Hi Stephen,
    Very useful Information,
    First tell me a little something about my self...
    After completion of my certification(as a fresher) I was down the streets hunting the job,
    with the insufficient knowledge and being a non-experienced person, I never got one.
    And mean while when I got my "S-UserID", I used to be proud, To say frankly, I registerd in SDN & SAP all at a time, without even knowing what I can do there..,
    When I got a job afterwords I was doing the job and never seen SDN page for many months,
    when I came to know that of we have doubts we can post at SDN. then started requesting help,
    I posted only a little, I didnot got the proper response. on that day I decided,
    still there are some places where we cannot get help on time and there will be people waiting to get help,
    Why cant I put some of my efforts to help others.
    Then I searched some topic by Topic in SDN topic by Topic I used to read threads just for knowledge.
    when I feel my self comfort for contributing, I started contibuting...!
    If you haven't read it, take a look first, so you can understand where things are now.
    I dont know where things are now. But these in this thread I mentioned clearly what I seen from the day I started contributing.
    I searched with the terms of 'Rules for replying', The results are not as I expected, and this link has subject as
    "O SDN, where art thou?" So it dosent hit my in the list.
    Like everybody until a certain stage I am also rushing for points.
    But I most cases I never tried to copy paste answers. If I done some then that is just to point it myself some day,
    I have no hopes or no intrest on the points...! This was discussed with Rob & Matt, at my inital contribution where my points are 36.
    From that day till date I have changed a lot to myself.
    Everyone cannot change like me because they are not like me & And I dont even expect that...!
    I will be online almost 6-8Hrs a day, Not even getting intrest to see the forums just because of the co-contributors.
    My only point is I am just requesting to a co-contributor,
    Clearly In a example : Lets say contributor has replied to a thread, and if you know that is a correct solution,
    please dont reply any more, If you have a better solution than that, then only reply,
    Even there is one reply in the thread not a matter, if correct answer leave that query.
    If still error persists, Show up with your Idea's...
    Dont let down the contributor, by copying his reply and editing and pasting(edit only if incorrect).
    I am just looking for this one exactly to circulate between ourselfs.
    For this we a little support from moderators to circulate(may be as a rule or may be as a mail to them)
    You may say again how many mails we have to send, It dosent matter, one mail to one person one time,
    and +ve factors will show up definetly.
    A real contributor always understand what I am talking about, but some one who hunts for points will never.
    I am really sorry if I am troubling with my doubts & requests,
    If so, Pleae forgive me,,
    Thanks & regards,
    Dileep .C

  • What are the dependent master data for running MRP

    Hi Experts,
                      My client wants to Run MRP After 8 Months of implementation. Now i want to know
    1) What are the Master Data need to be check. They are Using the Strategy 20.
    2) They have confirmed sales order for few customers. Forecast sales orders for few customers.How to map it in sap.
    3) Where will i get Gross Requirement in SAP. Because  MRP run will generates the net requirements.
    4) Is there any report in SAP displays the Forecast values for the selected material.
    Please help me on the above points.
    Thanks
    Satheesh

    HI Vishwa Upadhyay,
                                     Thank you Once again,
    The first point is cleared. Can you please suggest me on the 2,3& 4 points please. What are the configuration settings needed for the different sales order type( i.e.. confirmed and forecast)
    Thanks
    Satheesh.N

  • What are the minimum system requirements for GB 4?

    What are the minimum system requirements for GB 4? I did search this forum but wasn't able to find a direct answer.
    I'm running version 3.0.4 successfully on a lowly G4 733 but I suspect this is as far as I can go.
    I'm updating to iDvd'08 and was also wondering if I can safely update to GB4 or not (from GB 3.0.7) on a G4 733 mhz Digital Audio. Any help would be sincerely appreciated. My guess is that I cannot but I'd like to confirm prior to attempting any further updates in GB.

    I try my best to play it safely; always. And you were right, everything worked on the ext. FW HD flawlessly ...... truly amazing software!
    (I did happen to check the activity Monitor w/in Utilities and it showed GB4 using about 60-67% of the CPU on a G4 733 ..... I'm assuming this is normal).
    Click Here
    Not sure if there's a correct order to opening these apps as there has been in former versions of iLife ..... however, this (as shown above) is the order in which I opened all apps, and all worked well.

  • What are the suggestions

    I have 3 Quries on the same table  to find which (all paied) and which (Retracted) and the thried is the Conclusion
    What are the suggestions in the report builder for its vertically?
    can make union or union all or other thing?
    all paied:
    SELECT   SUM (amount), safe_name, amount_detial,count(amount_detial),SCHOOL_YEAR_ID,SCHOOL_ACT_YEAR_ID,get_stud_mostweaa(SCHOOL_ACT_YEAR_ID)mostwa,safe_id,MOV_TYPE--,user_stud_id
        FROM std_main_money
        where
        (SCHOOL_ACT_YEAR_ID=:P1 or :p1 is null)
        and  (safe_id=:P2 or :p2 is null)
        and mov_type=1
          and CLOSED=0
        and SCHOOL_YEAR_ID=(select SCHOOL_YEAR_ID from STD_YEAR_STUDY where enabled=1)
    the Retracted :
    SELECT   SUM (amount)amounts, safe_name safe_names, amount_detial amount_detials,count(amount_detial)xx,SCHOOL_YEAR_ID ww,SCHOOL_ACT_YEAR_ID ff,get_stud_mostweaa(SCHOOL_ACT_YEAR_ID)mostwaxx,safe_id aa,MOV_TYPE--,user_stud_id
        FROM std_main_money
        where
        (SCHOOL_ACT_YEAR_ID=:P1 or :p1 is null)
        and  (safe_id=:P2 or :p2 is null)
        and mov_type=2
               and CLOSED=0
        and SCHOOL_YEAR_ID=(select SCHOOL_YEAR_ID from STD_YEAR_STUDY where enabled=1)
    GROUP BY std_cost_id, safe_name,amount_detial,GRADE_STUD,SCHOOL_YEAR_ID,SCHOOL_ACT_YEAR_ID,safe_id,MOV_TYPE
    ORDER BY SCHOOL_ACT_YEAR_ID,MOV_TYPE,amount_detial--,std_cost_id
    Conclusion:
    SELECT   get_sum_costs (school_act_year_id, std_cost_id) x_1, safe_name,
             amount_detial, get_count_costs (school_act_year_id, std_cost_id)countion,
             school_year_id, school_act_year_id,
             get_stud_mostweaa (school_act_year_id) mostwa, safe_id,
             mov_type                                              --,user_stud_id
        FROM std_main_money
       WHERE (school_act_year_id = :p1 OR :p1 IS NULL)
         AND (safe_id = :p2 OR :p2 IS NULL)
         AND mov_type = 1
         AND closed = 0
         AND school_year_id = (SELECT school_year_id
                                 FROM std_year_study
                                WHERE enabled = 1)
    GROUP BY std_cost_id,
             safe_name,
             amount_detial,
             grade_stud,
             school_year_id,
             school_act_year_id,
             safe_id,
             mov_type
    ORDER BY school_act_year_id, safe_id, mov_type 

    I have changed something after looking your code, In query 1 and 2 only mov_type is changing so i have make both as single query and in query 3 you are not using any group function so no need to include group by clause. Try the below and let me know in case of any issues
    SELECT SUM (amount),
           safe_name,
           amount_detial,
           COUNT(amount_detial),
           school_year_id,
           school_act_year_id,
           get_stud_mostweaa(school_act_year_id) mostwa,
           safe_id,
           mov_type
           --,user_stud_id
    FROM std_main_money
    WHERE (school_act_year_id=:P1 OR :p1 IS NULL)
    AND (safe_id=:P2 OR :p2 IS NULL)
    AND (mov_type=1 OR mov_type = 2)
    AND closed=0
    AND school_year_id=(SELECT school_year_id FROM std_year_study WHERE enabled=1)
    GROUP BY std_cost_id, safe_name,amount_detial,grade_stud,school_year_id,school_act_year_id,safe_id,mov_type
    UNION ALL
    SELECT get_sum_costs (school_act_year_id, std_cost_id),
           safe_name,
           amount_detial,
           get_count_costs (school_act_year_id, std_cost_id),
           school_year_id,
           school_act_year_id,
           get_stud_mostweaa (school_act_year_id) mostwa,
           safe_id,
           mov_type
           --,user_stud_id
    FROM std_main_money
    WHERE (school_act_year_id = :p1 OR :p1 IS NULL)
    AND (safe_id = :p2 OR :p2 IS NULL)
    AND mov_type = 1
    AND closed = 0
    AND school_year_id = (SELECT school_year_id
                          FROM std_year_study
                          WHERE enabled = 1)
    ORDER BY school_act_year_id, safe_id, mov_type;

  • What are the Trading Card Games for iPod touch that doesn't requires Internet connection?

    What are the Trading Card Games for iPod touch that doesn't requires Internet connection? Suggestions, please.

    Why not look at the apps and fine out?
    The odds of someone here knowing that are slim to none.

  • What are the master data tables for 'Plant'?

    Hi friends,
    What are the master data tables for 'Plant' that contain below data?:
    PLANT
    NAME1
    NAME2
    LANGUAGE
    HOUSE_NUM_STREET
    PO_BOX
    POSTAL_CODE
    CITY
    COUNTRY_KEY
    REGION
    COUNTRY_CODE
    CITY_CODE
    TIME_ZONE
    TAX_JURISDICTION
    FACTORY_CALENDAR
    Thanks a lot!

    Hi,
    Plz try out following tables for your requirement.
    TOO1W
    ADRC
    J_1IMOCOMP
    T001W :  werks TYPE t001w-werks, "PLANT
            name1 TYPE t001w-name1, "PLANT DESCRIPTION
            adrnr TYPE t001w-adrnr, "PLANT ADDRESS NUMBER
    ADRC:  addrnumber TYPE adrc-addrnumber,  "ADDRESS NUMBER
             str_suppl1 TYPE adrc-str_suppl1,  "STREET2
             str_suppl2  TYPE adrc-str_suppl2, "STREET3
             street TYPE adrc-street,          "STREET
             city1 TYPE adrc-city1,            "CITY
             post_code1 TYPE adrc-post_code1,  "CITY POSTAL CODE
             post_code2 TYPE adrc-post_code2,  "PO Box postal code
             tel_number TYPE adrc-tel_number,  "TELEPHONE NUMBER
             fax_number TYPE adrc-fax_number,  "FAX NUMBER
             str_suppl3 TYPE adrc-str_suppl3,  "STREET4
             location TYPE adrc-location,      "STREET5
             city2 TYPE adrc-city2,  
    For Tax Details :
    J_1IMOCOMP :   werks TYPE j_1imocomp-werks,
                              j_1icstno TYPE j_1imocomp-j_1icstno,
                              j_1ilstno TYPE j_1imocomp-j_1ilstno,
    Hope this will help.
    Regards,
    Archana

  • What are the cause and fix for the following error message? NS_ERROR_FILE_ACCESS_DENIED failure code: 0x80520015

    Every time I close my Firefox browser I receive the following error message (see details below).
    FYI:
    -- I am running the current version of Firefox.
    -- I had no problems with this error message until my computer was recently attacked by 2 viruses:
    ` SystemFix
    ` Win7 Antivirus 2012
    Both viruses have since been cleaned from my computer. However, I am still receiving this error message.
    Here are my questions:
    * What are the cause and fix for this problem?
    * Do I need to uninstall and reinstall Firefox?
    * Is it possible that this error message is related to an add-on and that it has nothing to do with the recent virus attacks?
    I look forward to any feedback and support you might be able to provide.
    Thanks,
    Metta
    Error Message
    NS_ERROR_FILE_ACCESS_DENIED
    Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)
    [nsIFileOutputStream.init]
    File: undefined
    Line: 857
    Stack: undefined

    Every time I close my Firefox browser I receive the following error message (see details below).
    FYI:
    -- I am running the current version of Firefox.
    -- I had no problems with this error message until my computer was recently attacked by 2 viruses:
    ` SystemFix
    ` Win7 Antivirus 2012
    Both viruses have since been cleaned from my computer. However, I am still receiving this error message.
    Here are my questions:
    * What are the cause and fix for this problem?
    * Do I need to uninstall and reinstall Firefox?
    * Is it possible that this error message is related to an add-on and that it has nothing to do with the recent virus attacks?
    I look forward to any feedback and support you might be able to provide.
    Thanks,
    Metta
    Error Message
    NS_ERROR_FILE_ACCESS_DENIED
    Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)
    [nsIFileOutputStream.init]
    File: undefined
    Line: 857
    Stack: undefined

  • What are the scaling co-efficients for Accelerometer input in Daq-mx ?

    hi
    im using daq-mx to take accelerometer input.
    i want to read the raw data and scale it myslef later.
    i want to know what are the scaling co-efficients for the accelerometer input in daq-mx and what is the process of determining them.
    thanks.

    Rahul,
    I've answered your question in another thread you can check using the
    following link:
    http://forums.ni.com/ni/board/message?board.id=250&message.id=14353
    I hope this helps answer your question.
    Jason

  • What are the real minimum requirements for Mountain Lion?

    What are the real minimum requirements for Mountain Lion. Currently running Snow Leopard. I have a late 2006 Model: iMac6,1. Specs: 2.33 GHz Core 2 Duo, 3 GB 667 MHz DDR2, and the optional nVidia GeForce 7600GT c/w 256MB GDDR2. The advertisement is stating a 2007 model as the minumum, however the fastest 2006 Gen Plastic iMac should be faster then the slowest 2007 Gen Aluminum iMac7,1?

    From a previous posting from some else, I saw it was the 32bit versus 64bit video card driver being the issue. I was wondering if the optional video card I have installed also was limited to the 32bit issue. 64bit drivers exist for the 7600 GT GPU.

  • What are the two different rules for organizational data determination

    What are the two different rules for organizational data determination???

    Hi
    1) Rule type Responsibilities
    want to determine organizational data for individual responsibilities
    have not created an organizational model but want to create one
    have a lot of organizational units and must only assign a few attributes
    2) Rule type Organizational Model
    You would use rule resolution using organizational model if you
    have created an organizational model or have distributed a plan to SAP CRM and also want to use this for determining organizational data
    assign a lot of attributes to the organizational units and these are to be evaluated
    Regards
    Manohar

  • What are the video card requirements for running a 23" cinema display

    What are the video card requirements for running a 22" cinema display(clear acrylic case) w/ a PC? My motherbaord is AGP. Thanks to anyone who can help.
    Intel P4 3.0ghz   Windows XP  

    Hi Lionel,
    As a general rule of thumb, the ATI Rage 128 Pro will not support a 20" LCD. That being said, there are reports of it doing just that (possibly the edition that went into the cube).
    I'm not that familiar with the ins and outs of the Cube, so I can't give you authoritative information on it.
    A good place to start looking for answers is:
    http://cubeowner.com/kbase_2/
    Cheers!
    Karl

  • What are the different transaction codes for PGI?

    1. What are the different transaction codes for PGI?
    2. What transaction code should I use for a Group Delivery?
    Regards,
    Nazim.

    Hi
    Go to VL02 and you can do the PGI.
    Regfarding Group Delivery, you can create a batch job and link the program to the batch job so that the job picks up all the orders and create deliveries.
    Creating a Background Job Using the Job Wizard
    •From the main menu select System>Services>Jobs>Define Job (transaction SM36).
    •Press the Job Wizard button and step through the screens as follows:
    •1:Continue
    •2: Enter a name for your job. Continue.
    •3: Continue with ABAP Program Step selected
    •4: Enter the ABAP Program Name and variant name.
    Press the Print Parameters button, specify the required printer and set the "Time of Print" to "Send to Print Spooler for now".
    Press green tick
    Continue
    •5: If more reports need to be added to the job tick the checkbox, press continue and repeat screens 3 and 4.
    •6: Select how the job is to scheduled (eg Date and Time)
    •7: Enter the required scheduling information ( eg Date and Time) and if required tick "Periodic Jobs"
    •8: If "Periodic Job" was selected select the frequency (eg Monthly)
    •9: Check the job details and press Complete
    Hope the above info helps.
    Reward if useful
    Regards

  • What are the permitted compression techniques for PDF/A-1?

    The PDF/A-1 standard does not specify how compression is performed. What are the permitted compression techniques for PDF/A-1?
    The information I have gathered (not sure if all are true)
    LZW should not be used
    JPEG2000 may not be used
    Few say, JPEG can be used but its a lossy compression. (PDF standard clearly states lossy compression can't be used)
    Also, how to figure out whether a particular file is PDF/A-1a or PDF/A-1b and what kind of compressions are used in that file?
    Thanks in advance.

    For better or worse, ISO specifications are written in a language from a parallel universe.    After dealing with ISO standards for a while, you learn what specific words really mean. I should know - I am chair of the ISO PDF/X task force and co-chair of the PDF/VT task force.
    The word should does not specify a requirement. PDF/A does not prohibit lossy compression.
    JPEG is always a lossy compression. There is a mode of JPEG2000 compression that is indeed lossless. Note that JPEG and JPEG2000 are totally different compression schemes. (I believe that PDF/A-1 as well as PDF/X-1a and PDF/X-3, based on older versions of the PDF specification do not permit JPEG2000. PDF/A-2 based on ISO32000-1 and PDF/X-4 based on PDF 1.6 do allow for JPEG2000.)
    ZIP compression is lossless.
              - Dov

  • What are the operating system requirements for installing a trial version of lightroom 4?

    what are the operating system requirements for installing a trial version of lightroom 4?

    http://www.adobe.com/products/photoshop-lightroom/tech-specs.html
    Mylenium

Maybe you are looking for

  • Dual Monitor problem and an idea

    Hey everyone. I use two monitors and when i have iTunes open on the primary one(the laptob monitor) i am able to scroll through my music in iTunes using my mouse wheel. However, when iTunes is opened on the other monitor, scrolling through songs with

  • Cannot install driver due to missing files - BlockSysUs​er and hpzpnp.ice​_suffix

    I have just purchased a new Dell with Windows 7 64-bit and am trying to install the driver for my oldie-but-goodie OfficeJet 6310.  I am having the same problem with BlockSysUser as has appeared numerous times, and have tried all of the posted soluti

  • Kuler .ase file "unknown format" in Illustrator CS6

    Please help, this is so frustrating.  I;m trying to use adobe kuler, but I have not found a way to make it useful other than to Facebook the darn swatches!! It does not open as an .ase file in Adobe Illustrator.  I even opened the Illustrator extensi

  • How can i get rid of a lot of duplicate songs?

    Hi, after the transfer of an itunes librairy on my new imac, my teenaged boy have done the same with his own itunes librairy, but there are a lot of duplicate (more than a thousand). I want to sent them to the trash, but manually it's a tiring and bo

  • N85 RDS radio problem

    There are some RDS stations in my area, the signal level is quite strong so I rarely need to switch frequency, but don't know why the phone will mute for few seconds every minute, I think it is switching to other frequency, but I still see the same f