首页 \ 问答 \ OpenCms 8语言支持[关闭](OpenCms 8 language support [closed])

OpenCms 8语言支持[关闭](OpenCms 8 language support [closed])

我正在尝试建立一个多语种网站(德语和英语)。 我的第一个直观方法是在每篇文章和结构元素中使用语言选择器,以便用两种语言创建我的内容。

问题是我不知道如何切换语言。 怎么能告诉OpenCms使用德文版的文章? 我在哪里可以设置默认语言?


I am trying to build a multilingual website (German and English). My first intuitive approach was to use the language selector in each article and structural element in order to create my content in both languages.

The problem is that I don't know how to switch the language. How can tell OpenCms to use the German version of an article? Where can I set the default-language?


原文:
更新时间:2022-04-13 14:04

最满意答案

而不是在点击时将事件附加到您的元素,而是在页面加载时附加它。 由于您已经在使用jquery:

$(function() {
    //Anything you place in here won't be run until the page has loaded
});

所以,在你的情况下,做这样的事情

$(function() {
    jQuery(".gm_popup .email").click(function(){
        var text = jQuery(this).text();
        document.location = "mailto:" + text.trim();
    });  
});

Nailed it

$(document).on('click', '.gm_popup .email', function(){
  var text = jQuery(this).text();
  document.location = "mailto:" + text.trim();
});

相关问答

更多
  • submit();括号submit(); 导致立即执行该功能。 现在,您尝试将submit的返回值分配给onclick属性。 一个有效的解决方案是使用匿名函数来处理事件。 document.getElementById('select_image').onclick = function () { document.upload.submit(); return; } Parentheses in submit(); causes immediate execution of the fu ...
  • 问题是当的父级重新呈现(也就是通过callbackFromApp更新)时,会再次重新执行以下代码片段 let minutes = 1; let totalSeconds = 0; 这会重置计数器,因此在第一次点击后看不到差异。 将这些变量之外,以便在每次更新时不重置它们。 Problem is that when the parent of gets re-rendered (aka updated ...
  • 当我按下提交时,我之前的密码更改页面刷新了整个页面。 出于某种原因,这导致页面被提交两次。 我把事情改成了部分刷新,现在一切运作良好。 不知道为什么刷新不喜欢完全刷新。 但它现在有效。 :) My previous password change page was refreshing the whole page when I pressed submit. For some reason this was causing the page to be submitted twice. I changed ...
  • 在另一个事件处理程序中添加事件处理程序通常是错误的。 在顶层绑定你的$(".options_toggle").click()处理程序。 $(document).ready(function() { $(".options_toggle").click(function(e) { // prevent the dropdown from closing instantly when you click the toggle to open it e.stopPropagation() ...
  • 问题是你的canvasDrawing.js,在“不重要的画布东西”中,会导致javascript错误。 如果它描述的画布实际存在,你的styleForm东西只运行一次。 所以将它添加到您的HTML: 魔术将会发生。 或者,在canvasDrawing文件中,在styleForm之后添加这样的子句: var canvas = document.getElementById('floorplan'); if (!canvas) ...
  • 现在适合我。 我对strip进行了一些修改, split并添加注释# <- here url_base = 'http://sfbay.craigslist.org/search/eby/apa' params = dict(bedrooms=1, is_furnished=1) rsp = requests.get(url_base, params=params) # BS4 can quickly parse our text, make sure to tell it that you're givi ...
  • 哇,谢谢jQuery。 使用html,body作为scrollTop函数的选择器已经成为我们很多人很长一段时间的标准练习,现在它的行为有所不同,我们都有很多工作要做。 甚至WORDPRESS CORE FILES在动画功能上使用html,body 。 简而言之:选择器html,body现在将导致动画函数在jQuery v1.12.3中运行两次,而在以前的版本中,情况并非如此。 编辑感谢Developer107以下的第一个评论 由于Firefox需要html和Chrome等需要body ,修复此问题的方法是使 ...
  • 我想按Enter键会导致CRLF ( \r\n )(在Windows上;在Linux上似乎工作正常),即两个空白字符。 read! 只读取其中一个,下一个read_line调用将返回一个空行(只有\n ( 0x0a )的字符串)。 I guess pressing enter leads to CRLF (\r\n) (on Windows; on Linux it seems to work fine), i.e. two whitespace characters. read! will only re ...
  • 而不是在点击时将事件附加到您的元素,而是在页面加载时附加它。 由于您已经在使用jquery: $(function() { //Anything you place in here won't be run until the page has loaded }); 所以,在你的情况下,做这样的事情 $(function() { jQuery(".gm_popup .email").click(function(){ var text = jQuery(this).text ...
  • 每次单击hoverage元素时,您的单击事件都会冒泡到document ,因此将gallerymake() 和 gallerytake() 。 有关事件的说明,请参阅此页面 。 为了防止这种情况,请使用e.stopPropagation() 。 看一个工作示例的小提琴 。 Your click event bubbles up to the document every time you click the hoverage element, so gallerymake() and gallerytake ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)